Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions maven/basic/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Java

# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# Maven

target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
55 changes: 55 additions & 0 deletions maven/basic/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Maven Basic Example

This is a simple Maven project using JUnit 4 to demonstrate basic Launchable integration.

## Project Structure

- Simple Maven project with JUnit 4
- Two test classes: `AppTest.java` and `App2Test.java`
- Basic "Hello World" application

## Running Tests

```sh
# Run all tests
mvn test
```

## Recording Test Results

```sh
# Record build
BUILD_NAME=my-build-$(date +%s)
launchable record build --name ${BUILD_NAME} --source .

# Run tests
mvn test

# Record test results
launchable record tests --build ${BUILD_NAME} maven surefire ./target/surefire-reports
```

## Subsetting Test Runs

```sh
# Set up variables
BUILD_NAME=my-build-$(date +%s)
TARGET="80%"

# Record build
launchable record build --name ${BUILD_NAME} --source .

# Request subset
launchable subset --target ${TARGET} --build ${BUILD_NAME} maven surefire ./target/surefire-reports > subset.txt

# Run only the subset
mvn test -Dtest=$(cat subset.txt | tr '\n' ',')

# Record the subset results
launchable record tests --build ${BUILD_NAME} maven surefire ./target/surefire-reports
```

## Learn More

- [Launchable Documentation](https://www.launchableinc.com/docs/)
- [Maven Surefire Plugin](https://maven.apache.org/surefire/maven-surefire-plugin/)
File renamed without changes.
39 changes: 39 additions & 0 deletions maven/test-exclusion/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Java

# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# Maven

target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
Loading