Skip to content

Commit

Permalink
stop webtau feature tests from overriding html reports
Browse files Browse the repository at this point in the history
  • Loading branch information
MykolaGolubyev committed Jun 12, 2019
1 parent 0e93fd3 commit 11f270d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -6,6 +6,7 @@ target
node_modules
webtau.*report*.html
webtau-report-*.html
*-webtau-report.html
.webtau.cache.json
.vertx
webtau-http-groovy/doc-artifacts/*
Expand Down
Expand Up @@ -65,8 +65,10 @@ class WebTauEndToEndTestRunner implements StepReporter, StandaloneTestListener {
StepReporters.add(this)
StandaloneTestListeners.add(this)

def reportPath = 'examples/' + testFileName.replace('.groovy', '-webtau-report.html')

try {
def args = ['--workingDir=examples', '--config=' + configFileName]
def args = ['--workingDir=examples', '--config=' + configFileName, '--reportPath=' + reportPath]
args.addAll(Arrays.asList(additionalArgs))
args.add(testPath.toString())

Expand Down
Expand Up @@ -110,23 +110,18 @@ class WebTauRestFeaturesTest {

@Test
void "crud"() {
runCli('springboot/customerCrud.groovy', 'springboot/webtau.cfg',
"--url=$customersBaseUrl",
'--reportPath=doc-artifacts/reports/webtau-report-crud.html')
runCli('springboot/customerCrud.groovy', 'springboot/webtau.cfg', "--url=$customersBaseUrl")
}

@Test
void "crud separated"() {
runCli('springboot/customerCrudSeparated.groovy', 'springboot/webtau.cfg',
"--url=$customersBaseUrl",
'--reportPath=doc-artifacts/reports/webtau-report-crud-separated.html')
runCli('springboot/customerCrudSeparated.groovy', 'springboot/webtau.cfg', "--url=$customersBaseUrl")
}

@Test
void "crud separated missing method"() {
runCli('springboot/customerCrudSeparatedMissingMethod.groovy', 'springboot/withSpec.cfg',
"--url=$customersBaseUrl",
'--reportPath=doc-artifacts/reports/webtau-report-crud-separated-missing-method.html')
"--url=$customersBaseUrl")
}

@Test
Expand Down
Expand Up @@ -10,8 +10,8 @@ class ReportLocation {
.resolve('..')
.resolve('..')
.resolve('webtau-feature-testing')
.resolve('doc-artifacts')
.resolve('reports')
.resolve('examples')
.resolve('scenarios')
.resolve(reportName).toAbsolutePath()
}
}
Expand Up @@ -4,7 +4,7 @@ import static com.twosigma.webtau.WebTauGroovyDsl.*
import static pages.Pages.*

scenario('http calls') {
report.open('webtau-report-crud.html')
report.open('rest/springboot/customerCrud-webtau-report.html')
report.selectTest('CRUD operations for customer')

report.selectHttpCalls()
Expand Down
Expand Up @@ -4,7 +4,7 @@ import static com.twosigma.webtau.WebTauGroovyDsl.*
import static pages.Pages.*

scenario('summary view') {
report.open('webtau-report-crud-separated-missing-method.html')
report.open('rest/springboot/customerCrudSeparatedMissingMethod-webtau-report.html')
browser.doc.capture('report-summary')
}

Expand All @@ -14,7 +14,7 @@ scenario('customer update test summary') {
}

scenario('customer update http calls') {
report.open('webtau-report-crud-separated.html')
report.open('rest/springboot/customerCrudSeparated-webtau-report.html')
report.selectTest('customer update')

report.selectHttpCalls()
Expand Down

0 comments on commit 11f270d

Please sign in to comment.