Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 2.75 KB

File metadata and controls

47 lines (32 loc) · 2.75 KB

Run with Jacoco Agent

To build the application:

mvn package -DskipTests

First download Jacoco at https://www.eclemma.org/jacoco/. Actually we only need jacocoagent.jar and jacococli.jar in lib.

This application relies on a database, which is available at heidelberg.oshdb. I downloaded a copy on Mar 29, 2023: My copy

Run the application with Jacoco Agent with this command. Replace /home/rkh/Downloads/share/lib/jacocoagent.jar with your jacocoagent.jar and 6300 is the Jacoco agent's port. Provide db= with your local database copy.

java -Djdk.attach.allowAttachSelf=true -javaagent:/home/rkh/Downloads/share/lib/jacocoagent.jar=output=tcpserver,port=6300,destfile=jacoco.exec  -jar target/ohsome-api-1.9.0-SNAPSHOT.jar --database.db=/home/rkh/Downloads/heidelberg.oshdb.mv.db

This application comes with 3 OpenAPI specifiactions for its 3 modules, I combined them into one ohsome-combined.json to facilitate the testing.

The service should be running at port 8080. Change server.port in src/main/resources/application.properties to set an alternative port. Use jacococli's report or Jacoco Live to fetch the coverage data from 6300.

This spec is viewable at http://localhost:8080/swagger-ui.html. You can also use this webpage to send REST requests to check if it is running.

Run with Aster Agent

Same steps to build the project and download the database.

Set up necessary env vars:

export jacocoAgentPort=8000
export projectTargetPath=$(pwd)/target/
export projectPackage=org/heigit/ohsome

Run the service:

java -Djdk.attach.allowAttachSelf=true -javaagent:"${EMB_BASE}/realtime-jacoco-agent-1.0-SNAPSHOT.jar" -jar target/ohsome-api-1.9.0-SNAPSHOT.jar --database.db=/home/rkh/Downloads/heidelberg.oshdb.mv.db

The service should be running at port 8080 with jacoco agent on 8080. Change server.port in src/main/resources/application.properties to set an alternative port.

This spec is viewable at http://localhost:8080/swagger-ui.html. You can also use this webpage to send REST requests to check if it is running.

Start EvoMaster in black-box mode (change the seed 105 and the 105 in outputFolder if necessary):

"/usr/lib/jvm/java-8-openjdk-amd64/jre/"/bin/java -Xms1G -Xmx4G -jar evomaster.jar --blackBox true --maxTime 3600s --bbSwaggerUrl ./ohsome-combined.json --bbTargetUrl http://localhost:8080/ --seed 105 --showProgress=true --testSuiteSplitType=NONE  --outputFormat JAVA_JUNIT_4 --outputFolder "/home/rhuang329/aster-exp/bb/tests/ohsome-api_evomaster_bb_v2__S105_11890"