Welcome to the JUnit Web Launcher! This project provides a simple way to run JUnit tests from a web browser.
- Run JUnit tests directly from a web browser
- View the running log in real-time
- Lightweight and easy to set up
- Support parallel execution
- Easy integration with existing Java projects
- Java 21 or higher
- Maven
- Clone the repository
- Build the source with
mvn package -Dmaven.test.skip
- Load the source into your IDE, then run
Example.main()
in the test folder - Open http://localhost:8080 in your browser
- Copy the jar to the same folder of your test cases
- Run below command (replace 8080 with your port, replace example.package with your junit package, replace 2 with the number of parallel size)
java -cp * junitweblauncher.App 8080 example.package 2
- Open http://localhost:8080 in your browser
- Add the junit-web-launcher to your pom.xml
- Invoke
junitweblauncher.App.main(new String[]{"8080", "example.package", "2"});
- Open http://localhost:8080 in your browser
In order to make allure @Step @Attachment to work, need to add VM option -javaagent:xxxxxx\repository\org\aspectj\aspectjweaver\1.9.22.1\aspectjweaver-1.9.22.1.jar
when running the test