Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 10:15 Go to next message
Ionescu Alexandru is currently offline Ionescu AlexandruFriend
Messages: 1
Registered: December 2020
Junior Member
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 10:06 Go to previous messageGo to next message
Markus Modzelewski is currently offline Markus ModzelewskiFriend
Messages: 5
Registered: September 2018
Junior Member
+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 12:32 Go to previous message
Victor Dulepov is currently offline Victor DulepovFriend
Messages: 9
Registered: December 2014
Junior Member
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 Feb 27 18:26:33 GMT 2024

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

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

Back to the top