{"id":25776600,"url":"https://github.com/traas-stack/auto-unit-test-case-generator","last_synced_at":"2026-01-17T02:35:38.561Z","repository":{"id":56770903,"uuid":"522797067","full_name":"traas-stack/auto-unit-test-case-generator","owner":"traas-stack","description":"Auto-Unit-Test-Case-Generator automatically generates high-level code-coverage JUnit test suites for Java,  widely used within the ANT Group.","archived":false,"fork":false,"pushed_at":"2023-10-30T07:11:42.000Z","size":179875,"stargazers_count":265,"open_issues_count":10,"forks_count":84,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-07-06T09:02:08.610Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/traas-stack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-09T04:07:29.000Z","updated_at":"2025-05-22T00:35:40.000Z","dependencies_parsed_at":"2023-02-08T08:31:22.414Z","dependency_job_id":null,"html_url":"https://github.com/traas-stack/auto-unit-test-case-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/traas-stack/auto-unit-test-case-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traas-stack%2Fauto-unit-test-case-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traas-stack%2Fauto-unit-test-case-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traas-stack%2Fauto-unit-test-case-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traas-stack%2Fauto-unit-test-case-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/traas-stack","download_url":"https://codeload.github.com/traas-stack/auto-unit-test-case-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traas-stack%2Fauto-unit-test-case-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28492328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"online","status_checked_at":"2026-01-17T02:00:07.808Z","response_time":85,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-02-27T06:01:27.388Z","updated_at":"2026-01-17T02:35:38.506Z","avatar_url":"https://github.com/traas-stack.png","language":"Java","funding_links":[],"categories":["测试"],"sub_categories":[],"readme":"[中文README传送门](https://github.com/TRaaSStack/auto-unit-test-case-generator/blob/main/README_CN.md)\n# Using LLM for test case generation\nNow you can use LLM for test case generation!  Welcome to visit our project: [TestAgent](https://github.com/codefuse-ai/Test-Agent) , try out the revolution of LLM in the field of test case generation.\n\n\n# What is Auto-Unit-Test-Case-Generator\nAuto-Unit-Test-Case-Generator generates JUnit test suites for Java class just as its name. During test generation, Auto-Unit-Test-Case-Generator aims to generate high code-coverage (e.g., Branch Coverage and Line Coverage) unit test suites with full automation. This tools is widely used in ANT Group, supports automatic generation of unit tests for more than 1000 projects. \nAdvantages of Auto-Unit-Test-Case-Generator:\n\n- High coverage and assertion level\n\nThe average line coverage within Ant Group by using the generator is over 60%\nThe unit test  generated by this tool is highly effective assertions during the practice in Ant Group\n\n- Easy to use\n\nThe process of generation of this tool is fully automated. \n\n# Main Features\nAuto-Unit-Test-Case-Generator is developed based on EvoSuite. In Auto-Unit-Test-Case-Generator, we optimized several algorithms to achieve higher code coverage, more efficiency and effectiveness, better structure of test case.\nMain Features of Auto-Unit-Test-Case-Generator:\n\n- Suitable for Spring Framework\n\nIn Auto-Unit-Test-Case-Generator, we can generate complete mock statements for autowired fields to form meaningful test case,  avoid throwing NullPointerException.\n\n- More efficiency and effectiveness\n\nLike EvoSuite, Auto-Unit-Test-Case-Generator also use the Search Based Software Testing(SBST)  as main algorithm framework. However, random search algorithm will encounter performance problems when class under test uses lots of String which has almost infinite search space. In Auto-Unit-Test-Case-Generator, we proposed and achieved accutare search algorithm to achieve higher efficiency and effectiveness.\n\n- Better structure of test case\n\nIn Auto-Unit-Test-Case-Generator, the optimal call sequence algorithm is used through the initialization, insertion, modification and deletion of test case statements, so that the structure of test case is more readable and logical.\n\n\n# Building Auto-Unit-Test-Case-Generator\nTo install Auto-Unit-Test-Case-Generator by using Maven, run:\n```shell\nmvn clean install -Dmaven.test.skip=true\n```\nCopy smartut.jar to your own Execution path, for example, current path.\n```shell\ncp ${user.home}/.m2/repository/org/smartut/smartut-master/1.1.0/smartut-master-1.1.0.jar smartut.jar\n```\n\n\n# Using Auto-Unit-Test-Case-Generator\n## Prepare dependencies\nBefore using smartut.jar to generate cases, You need to execute the following commands to prepare dependencies in project under test.\n```shell\nmvn clean compile\nmvn clean install -Dmaven.test.skip=true\nmvn dependency:copy-dependencies\n```\n## Setup\nTo generate unit test suites, the generator needs to be set up by project classpath first.\n```shell\njava -jar ./smartut.jar -setup example/target/classes/ example/target/dependency/*.jar\n```\n## Generate for a specific class\nYou can run this command to generate unit test suites for a specific class\n```shell\njava -jar ./smartut.jar -class com.alipay.test.example\n```\n## Generate for entire folder\nYou can run this command to generate unit test suites for all classes in `classes` folder:\n```shell\njava -jar ./smartut.jar -target example/target/classes/\n```\n\n\n# Contact us\nIf you encounter any problems during use this generator, please contact us via email: smartunit_opensource@service.alipay.com\n\nAlso, Auto-Unit-Test-Case-Generator is providing Software-as-a-Service (SaaS). It supports the full lifecycle/evolution of unit test cases, including test case generation, execution,iteration and regression analysis . All stages are triggered automatically by simply providing [Github](https://github.com/) or [Gitee](https://gitee.com/) link. You can visit our SaaS website through https://smartunit.opentrs.com.\n\n# \n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraas-stack%2Fauto-unit-test-case-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftraas-stack%2Fauto-unit-test-case-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraas-stack%2Fauto-unit-test-case-generator/lists"}