Skip to content
Permalink
Browse files

stop webtau feature tests from overriding html reports

  • Loading branch information...
MykolaGolubyev committed Jun 11, 2019
1 parent 0e93fd3 commit 11f270dfc994599da185f52bd300a48461c80efb
@@ -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/*
@@ -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())

@@ -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
@@ -10,8 +10,8 @@ class ReportLocation {
.resolve('..')
.resolve('..')
.resolve('webtau-feature-testing')
.resolve('doc-artifacts')
.resolve('reports')
.resolve('examples')
.resolve('scenarios')
.resolve(reportName).toAbsolutePath()
}
}
@@ -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()
@@ -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')
}

@@ -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()

0 comments on commit 11f270d

Please sign in to comment.
You can’t perform that action at this time.