Running command/script at the end of a test [message #1835393] |
Wed, 02 December 2020 05:15  |
Eclipse User |
|
|
|
Hello!
I would like to know if there is any way of running a command(any rcptt command, including "exec-process" ) after a test succeeds or fails.
I was thinking something along the lines of a context, but run AFTER the test,
For example: I have a test suite with 4 tests - test1,test2,test3,test4
After test1 runs and succeeds, run command
After test2 runs and fails, do nothing.
After test3 runs and fails, do nothing.
After test4 runs and succeeds, run command.
Thanks!
|
|
|
|
Re: Running command/script at the end of a test [message #1857175 is a reply to message #1855176] |
Sat, 21 January 2023 07:32  |
Eclipse User |
|
|
|
I do something similar by adding a procedure call at the very end of each test.
It's the last line, so if the test fails, it is not executed.
I put all the success-teardown actions in that procedure, like logging a successful TestCaseEnd, or just anything. The procedure itself is declared inside a global context used by all testcases, so you don't have to add its code into each testcase.
|
|
|
Powered by
FUDForum. Page generated in 0.03414 seconds