Skip to content

colinzhu/junit-web-launcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 

Repository files navigation

junit-web-launcher

Welcome to the JUnit Web Launcher! This project provides a simple way to run JUnit tests from a web browser.

image

Features

  • 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

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)
java -cp * junitweblauncher.App 8080 example.package 2

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

Releases

No releases published

Packages

No packages published