Skip to content

Commit

Permalink
fixed tests for reduce logging (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
tt-marcel committed Mar 6, 2024
1 parent 55f4d17 commit b5ed047
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ abstract class ETContainerTest extends ContainerTest {
ttRunPackage testCasePath: 'test.pkg'
ttRunProject testCasePath: 'test.prj'
def generationReports = ttGenerateReports generatorName: 'HTML', additionalSettings: [[name: 'javascript', value: 'False']]
echo "\${generationReports.reportOutputDir}"
echo "size of returned array: \${generationReports.size()}"
}
}
Expand All @@ -227,8 +228,8 @@ abstract class ETContainerTest extends ContainerTest {
WorkflowRun run = jenkins.buildAndAssertStatus(Result.SUCCESS, job)

then: "expect successful test and upload completion"
StringUtils.countMatches(jenkins.getLog(run), "result: FINISHED") == 2
StringUtils.countMatches(jenkins.getLog(run), "reportOutputDir: ${ET_WS_PATH}/TestReports/test_") == 2
StringUtils.countMatches(jenkins.getLog(run), "Generating HTML report format for report id") == 2
StringUtils.countMatches(jenkins.getLog(run), "-> FINISHED") == 2
StringUtils.contains(jenkins.getLog(run), "size of returned array: 2")
}

Expand All @@ -250,7 +251,6 @@ abstract class ETContainerTest extends ContainerTest {
WorkflowRun run = jenkins.buildAndAssertStatus(Result.SUCCESS, job)

then: "expect successful test and upload completion"
StringUtils.countMatches(jenkins.getLog(run), "result: FINISHED") == 1
StringUtils.countMatches(jenkins.getLog(run), "reportOutputDir: ${ET_WS_PATH}/TestReports/test_") == 1
StringUtils.countMatches(jenkins.getLog(run), "-> FINISHED") == 1
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class TGContainerTest extends ContainerTest {
WorkflowRun run = jenkins.buildAndAssertStatus(Result.SUCCESS, job)

then: "expect successful test and upload completion"
StringUtils.countMatches(jenkins.getLog(run), "-> Successful") == 1
StringUtils.countMatches(jenkins.getLog(run), "-> Uploaded successfully") == 1
StringUtils.countMatches(jenkins.getLog(run), "Report upload(s) successful") == 1
}

Expand Down Expand Up @@ -173,7 +173,8 @@ class TGContainerTest extends ContainerTest {
WorkflowRun run = jenkins.buildAndAssertStatus(Result.SUCCESS, job)

then: "expect successful test but upload failed"
StringUtils.countMatches(jenkins.getLog(run), "Error! Please check your pipeline or test.guide configuration") == 2
StringUtils.countMatches(jenkins.getLog(run), "Report upload for") == 2
StringUtils.countMatches(jenkins.getLog(run), "failed") == 2
StringUtils.countMatches(jenkins.getLog(run),
"Report upload(s) unstable. Please see the logging of the uploads.") == 1
}
Expand Down

0 comments on commit b5ed047

Please sign in to comment.