Get the name of a testcase by ECL command (i.e. by variable substitution) [message #1722058] |
Tue, 02 February 2016 14:25 |
Christian Bruckner Messages: 1 Registered: February 2016 |
Junior Member |
|
|
Hi all,
our AUT creates log files during the test run. These are copied from the workspace, gathered in one folder, and finally added by the Jenkins job to its build artifacts. In order to associate the log files to their corresponding test case, it would be helpful to label them with the name of the testcase.
Our first attempt resulted in the following workaround:
let [val testName "SomeTestCase.test"]
[val timeStamp [get-time | format-time -format "YYYMMdd_hhmmss"]] {
// some test steps
copy-file
-source [substitute-variables "${workspace_loc}/projectName/target/file_to_copy.log]
-destination "/tmp/testresults"
-name [concat $timeStamp "_" $testName ".log"]
}
However, this workaround is very prone to errors, for example when a test gets renamed.
Is there a way to get the name of a testcase directly (i.e. by variabel substitution)?
Thanks in advice,
Christian
[Updated on: Wed, 11 May 2016 13:50] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03657 seconds