authorjapps / authorjapps/zerocode

No CSV report files being generated (java 17 and Gradle 7.4.2)

Open
#473 9 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Java
Stars
1k
Forks
453
Avg merge
7d 2h
Merged PRs (30d)
5

Description

I'm using gradle and the ZeroCodeMultiLoadRunner to run some load tests and the tests execute correctly but no csv files are being generated in the target folder, only target/logs/zerocode_rest_bdd_logs.log and the regular junit output in build/test-results. What am I missing?

This is part of my gradle file - I'm running the tests in a separate source config:

~~~
sourceSets {
loadTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDirs = ["src/loadTest/java"]
}
resources {
srcDirs = ["src/loadTest/resources"]
}
}
}

configurations {
loadTestImplementation.extendsFrom testImplementation
}

dependencies {
... various deps ...
loadTestImplementation "org.jsmart:zerocode-tdd:1.3.+"
}

task loadTest(type: Test, group: "verification") {
include '**/*LoadTest.class'
testClassesDirs = sourceSets.loadTest.output.classesDirs
classpath = sourceSets.loadTest.runtimeClasspath
outputs.upToDateWhen { false }

systemProperty 'zerocode.junit', 'gen-smart-charts-csv-reports'
}
~~~

Here is the load test class:

~~~
@LoadWith("load-config.properties")
@TestMappings({
@TestMapping(testClass = CounterRecorderTest.class, testMethod = "whenRecordIsCalledThenCounterIsIncremented"),
@TestMapping(testClass = DistributionSummaryRecorderTest.class, testMethod = "whenRecordIsCalledThenTimingsAreRecorded"),
@TestMapping(testClass = TimerRecorderTest.class, testMethod = "whenRecordIsCalledThenTimingsAreRecorded")})
@RunWith(ZeroCodeMultiLoadRunner.class)
public class RecorderLoadTest {
}
~~~

Contributor guide

Open the contributing guide

Research direction

Start with the Gradle loadTest task and its `zerocode.junit` system property, then trace how `RecorderLoadTest` invokes `ZeroCodeMultiLoadRunner` with `load-config.properties`. Check the load-test resources and the report-generation entry point to determine why the expected CSV files are absent while logs and JUnit results exist. Done means the load test produces the CSV reports in the intended target folder.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.