https://github.com/colinzhu/junit-web-launcher
Launch JUnit test from a browser
https://github.com/colinzhu/junit-web-launcher
junit junit-launcher junit5-launcher launcher
Last synced: 3 months ago
JSON representation
Launch JUnit test from a browser
- Host: GitHub
- URL: https://github.com/colinzhu/junit-web-launcher
- Owner: colinzhu
- Created: 2024-09-14T01:23:52.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-01-11T13:30:03.000Z (5 months ago)
- Last Synced: 2025-01-15T07:31:09.519Z (5 months ago)
- Topics: junit, junit-launcher, junit5-launcher, launcher
- Language: Java
- Homepage:
- Size: 151 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# junit-web-launcher
Welcome to the JUnit Web Launcher! This project provides a simple way to run JUnit tests from a web browser.
## Features
- [x] Run JUnit tests directly from a web browser
- [x] View the running log in real-time
- [x] Lightweight and easy to set up
- [x] Support parallel execution
- [x] Easy integration with existing Java projects## Usage
### Prerequisites
- Java 21 or higher
- Maven### Installation
- Clone the repository
- Build the source with ```mvn package -Dmaven.test.skip```### Try with the embedded example
- Load the source into your IDE, then run ```Example.main()``` in the test folder
- Open http://localhost:8080 in your browser### Run as standalone jar
- 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)
```shell
java -cp * junitweblauncher.App 8080 example.package 2
```
- Open http://localhost:8080 in your browser### Run as a dependency of your project
- 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### NOTE
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