Forum Discussion
It is because, you can do the assertions in groovy script by using "assert" statement.
For example:
def val = 10
assert 9 == val, "Val is not 9"
Just have a groovy script with above two statements and you would see it failed, which is shown in red colored.
So far you might not have experienced this because, no assertions are present in the script.
Hope this helps.
- erickyi8 years agoNew Contributor
tnx Rao
I have done code assertion on failure but that itself only show failure (red icon). It does not solve my visual inspection that the test step is run (I need some form of visual indication e.g. if the icon color changes).
- erickyi8 years agoNew Contributor
I searched a bit more .. looks like there was an internal change request on something similar but there does not seemed to be any progress on the change request.
[Reg] icon color of "run testCase" based on execution statusI tried further using a custom property "myStatus"in the testStep
testRunner.testCase.setPropertyValue("status", "testCase-done"); // setting a custom property of a test case works
def testStep = testRunner.testCase.testSteps["Step1"]
testStep.setPropertyValue("myStatus", "NONE"); // no error
log.info("|start status=" + testStep.getPropertyValue("myStatus"));
testStep.setPropertyValue("myStatus", "FINISHED"); // no error
log.info("|finish status=" + testStep.getPropertyValue("myStatus"));
The logs showed
Sat Jun 25 10:19:29 EST 2016:INFO:step1
Sat Jun 25 10:19:29 EST 2016:INFO:testrunnner.status=RUNNING
Sat Jun 25 10:19:29 EST 2016:INFO:|start status=null
Sat Jun 25 10:19:29 EST 2016:INFO:|finish status=null
Conclusion: the properties on a test step is read only. Bummer. there goes my attempt. :(