Call Testcase “Stop on Failure” is not working. Kindly check the below sample scenario for details.
My Query is, In callTestcase, Why is the 2_TC is executing while 1_TC is failed.
Call Testcase “Stop on Failure” is not working. Kindly check the below sample scenario for details.
My Query is, In callTestcase, Why is the 2_TC is executing while 1_TC is failed.
I tried to reproduce your case, but I couldn’t. I mean, 1_TC
failed and 2_TC
was not executed.
In the screenshot you shared, I found a curious message:
Handling exception for method callTestCase
I believe this message is emitted by your code somewhere. I guess your Test Listener has a try { } catch() {}
clause, and mangles the exception raised in the 1_TC
. Review your code.
Thanks @kazurayam for your prompt reply. I am using your Hightlight Keyword. Could you help me resolve this issue.
Just stop using it.
Or edit this:
@Keyword
public void pandemic(List<String> keywordsToAdd = []) {
this.markKeywords(keywordsToAdd)
Set<String> influencedKeywords = this.getHighlightingKeywords()
WebUiBuiltInKeywords.metaClass.'static'.invokeMethod = { String name, args ->
if (name in influencedKeywords) {
TestObject to = (TestObject)args[0]
HighlightElement.on(to)
}
def result
try {
result = delegate.metaClass.getMetaMethod(name, args).invoke(delegate, args)
} catch(Exception e) {
System.out.println("Handling exception for method $name")
}
return result
}
}
to:
@Keyword
public void pandemic(List<String> keywordsToAdd = []) {
this.markKeywords(keywordsToAdd)
Set<String> influencedKeywords = this.getHighlightingKeywords()
WebUiBuiltInKeywords.metaClass.'static'.invokeMethod = { String name, args ->
if (name in influencedKeywords) {
TestObject to = (TestObject)args[0]
HighlightElement.on(to)
}
return delegate.metaClass.getMetaMethod(name, args).invoke(delegate, args)
}
}