diff --git a/tests/e2e/main.go b/tests/e2e/main.go index 5a1ee681e0..2cf0f33a6f 100644 --- a/tests/e2e/main.go +++ b/tests/e2e/main.go @@ -277,7 +277,7 @@ func parseArguments() (err error) { type testStepsWithConfig struct { config TestConfigType - steps []Step + steps StepChoice } func getTestCases(selectedPredefinedTests, selectedTestFiles TestSet, providerVersions, @@ -316,13 +316,12 @@ func getTestCases(selectedPredefinedTests, selectedTestFiles TestSet, providerVe log.Fatalf("Step choice '%s' not found.\nsee usage info:\n%s", tc, getTestCaseUsageString()) } - testSteps := stepChoices[tc].steps if testConfig == "" { testConfig = stepChoices[tc].testConfig } tests = append(tests, testStepsWithConfig{ config: testConfig, - steps: testSteps, + steps: stepChoices[tc], }, ) } @@ -351,7 +350,11 @@ func getTestCases(selectedPredefinedTests, selectedTestFiles TestSet, providerVe tests = append(tests, testStepsWithConfig{ config: testConfig, - steps: testCase, + steps: StepChoice{ + name: testFileName, + steps: testCase, + description: fmt.Sprintf("Steps from file %s", testFileName), + }, }) } diff --git a/tests/e2e/test_runner.go b/tests/e2e/test_runner.go index 7c02dd6d2d..c3ced5ab61 100644 --- a/tests/e2e/test_runner.go +++ b/tests/e2e/test_runner.go @@ -19,7 +19,7 @@ const ( // It sets up the test environment and the test driver to run the tests type TestRunner struct { config TestConfig - steps []Step + stepChoice StepChoice testDriver TestCaseDriver target ExecutionTarget verbose bool @@ -86,7 +86,7 @@ func (tr *TestRunner) Run() error { } tr.testDriver = GetTestCaseDriver(tr.config) - err = tr.testDriver.Run(tr.steps, tr.target, tr.verbose) + err = tr.testDriver.Run(tr.stepChoice.steps, tr.target, tr.verbose) if err != nil { tr.result.Failed() // not tearing down environment for troubleshooting reasons on container @@ -118,13 +118,13 @@ func (tr *TestRunner) Setup(testCfg TestConfig) error { return nil } -func CreateTestRunner(config TestConfig, steps []Step, target ExecutionTarget, verbose bool) TestRunner { +func CreateTestRunner(config TestConfig, stepChoice StepChoice, target ExecutionTarget, verbose bool) TestRunner { return TestRunner{ - target: target, - steps: steps, - config: config, - verbose: verbose, - result: TestResult{Status: TEST_STATUS_NOTRUN}, + target: target, + stepChoice: stepChoice, + config: config, + verbose: verbose, + result: TestResult{Status: TEST_STATUS_NOTRUN}, } } @@ -133,8 +133,10 @@ func (tr *TestRunner) Info() string { return fmt.Sprintf(` ------------------------------------------ Test name : %s +Config: %s Target: %s ------------------------------------------`, + tr.stepChoice.name, tr.config.name, tr.target.Info(), ) @@ -144,12 +146,14 @@ func (tr *TestRunner) Report() string { return fmt.Sprintf(` ------------------------------------------ Test name : %s +Config: %s Target: %s - Status: %s - Result: %s - Duration: %s - StartTime: %s ------------------------------------------`, + tr.stepChoice.name, tr.config.name, tr.target.Info(), tr.result.Status,