Skip to main content



      Home
Home » Eclipse Projects » RCP Testing Tool » Running command/script at the end of a test(Run after test)
Running command/script at the end of a test [message #1835393] Wed, 02 December 2020 05:15 Go to next message
Eclipse UserFriend
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 #1855176 is a reply to message #1835393] Fri, 30 September 2022 06:06 Go to previous messageGo to next message
Eclipse UserFriend
+1 if this would be implemented :)
Workaround may be available using a try block around your whole scenario. For example:
try {
[...] <your Scenario> [...]
} -finally {
    <After block>
}

but in all scenarios this may be overkill
Re: Running command/script at the end of a test [message #1857175 is a reply to message #1855176] Sat, 21 January 2023 07:32 Go to previous message
Eclipse UserFriend
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.
Previous Topic:not able to install rcptt.ide-2.5.4-win32.win32.x86_64
Next Topic:Use RCP TT on old Eclipse versions
Goto Forum:
  


Current Time: Tue Apr 29 08:31:41 EDT 2025

Powered by FUDForum. Page generated in 0.03414 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top