{"id":16697037,"url":"https://github.com/seratch/testgenerator","last_synced_at":"2025-07-26T11:11:39.228Z","repository":{"id":1711552,"uuid":"2441132","full_name":"seratch/testgenerator","owner":"seratch","description":"Scala test generator sbt plugin","archived":false,"fork":false,"pushed_at":"2013-11-23T12:27:51.000Z","size":11250,"stargazers_count":10,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-24T04:22:35.625Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seratch.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-09-23T00:37:06.000Z","updated_at":"2019-08-13T14:50:35.000Z","dependencies_parsed_at":"2022-08-22T22:31:13.907Z","dependency_job_id":null,"html_url":"https://github.com/seratch/testgenerator","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seratch%2Ftestgenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seratch%2Ftestgenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seratch%2Ftestgenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seratch%2Ftestgenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seratch","download_url":"https://codeload.github.com/seratch/testgenerator/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248147149,"owners_count":21055484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T17:45:54.459Z","updated_at":"2025-04-10T02:52:41.168Z","avatar_url":"https://github.com/seratch.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scala test generator sbt plugin \n\n## How to setup\n\n### Add this plugin to project/plugins.sbt\n\nDelete project/plugins directory if it exists and edit project/plugins.sbt as follows:\n\n```scala\naddSbtPlugin(\"com.github.seratch\" %% \"testgenerator\" % \"1.1.1\")\n```\n\n### Add the settings to built.sbt\n\n```scala\ntestgeneratorSettings\n```\n\n## Run sbt\n\nSee also: [https://github.com/harrah/xsbt/wiki/Setup](https://github.com/harrah/xsbt/wiki/Setup)\n\n### Specify a filename\n\nsrc/main/scala/com/example/models.scala:\n\n```scala\npackage com.example\ncase class Staff(id: Long, name: String, ...)\ncase class Company(id: Long, name: String, ...)\ncase class Stock(id: Long, itemId: Long, ...)\n```\n\nAnd specify the above file:\n\n```sh\n$ sbt\n\u003e test-gen com/example/models.scala\n\"com.example.StaffSpec\" already exists.\n\"com.example.CompanySpec\" already exists.\n\"com.example.StockSpec\" created.\n```\n\n### Specify a class name\n\nIf you specify a class name, it must be the name of the source file.\n\n\"com.example.MyApp\" will be translated as \"src/main/scala/com/example/MyApp.scala\".\n\n```sh\n$ sbt\n\u003e test-gen com.example.MyApp\n\"com.example.MyAppSpec\" created.\n```\n\n### Specify a directory\n\n\"test-gen\" will search targets recursively under the directory.\n\n```sh\n$ sbt\n\u003e test-gen com/example\n```\n\n### Specify a package name\n\nThe same as specifying a directory.\n\n```sh\n$ sbt\n\u003e test-gen com.example\n\"com.example.MyAppSpec\" created.\n\"com.example.util.MyUtilSpec\" created.\n```\n\n## Configuration\n\nPlease add the following line at the top of your buid.sbt:\n\n```scala\nimport testgenerator.SbtKeys._\n```\n\nand then,\n\n```scala\ntestgeneratorSettings\n\ntestgeneratorEncoding in Compile := \"UTF-8\"\n\ntestgeneratorTestTemplate in Compile := \"scalatest.FlatSpec\"\n\ntestgeneratorScalaTestMatchers in Compile := \"ShouldMatchers\"\n\ntestgeneratorWithJUnitRunner in Compile := false \n\ntestgeneratorLineBreak in Compile := \"LF\"\n```\n\n### testgeneratorTestTemplate\n\n- [\"scalatest.FunSuite\"](http://www.scalatest.org/scaladoc/1.6.1/#org.scalatest.FunSuite)\n- [\"scalatest.Assertions\"](http://www.scalatest.org/scaladoc/1.6.1/#org.scalatest.Assertions)\n- [\"scalatest.Spec\"](http://www.scalatest.org/scaladoc/1.6.1/#org.scalatest.Spec)\n- [\"scalatest.WordSpec\"](http://www.scalatest.org/scaladoc/1.6.1/#org.scalatest.WordSpec)\n- [\"scalatest.FlatSpec\"](http://www.scalatest.org/scaladoc/1.6.1/#org.scalatest.FlatSpec) (default)\n- [\"scalatest.FeatureSpec\"](http://www.scalatest.org/scaladoc/1.6.1/#org.scalatest.FeatureSpec)\n- [\"specs.Specification\"](http://code.google.com/p/specs/wiki/DeclareSpecifications)\n- [\"specs2.Specification\"](http://etorreborre.github.com/specs2/guide/org.specs2.guide.QuickStart.html#Quick+Start)\n\n### testgenScalaTestMatchers\n\n- [\"ShouldMatchers\"](http://www.scalatest.org/scaladoc/1.6.1/#org.scalatest.matchers.ShouldMatchers) (default)\n- [\"MustMatchers\"](http://www.scalatest.org/scaladoc/1.6.1/#org.scalatest.matchers.MustMatchers)\n- \"\" (empty)\n\n\n## Happy Testing! :)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseratch%2Ftestgenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseratch%2Ftestgenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseratch%2Ftestgenerator/lists"}