Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » Super Context and expectation of failure
Super Context and expectation of failure [message #1780105] Wed, 17 January 2018 12:34 Go to next message
Kev James is currently offline Kev JamesFriend
Messages: 22
Registered: November 2014
Junior Member
Hi all,

I've just started using RCPTT and I've come across a situation I can't find a solution to - looking for help :)

Basically, I have built a test that works fine with my app - briefly, it takes some credentials and calls a web service to get some other information back.

I'd like to run the same test with correct and incorrect credentials, and expect the second run to cause an error. I've set up a super context with two sets of parameters; the correct parameters work fine, but I can't figure out how to tell the test to expect the second set of parameters to fail.

I guess it would be possible to duplicate the test and modify the second copy to check for the failure, but that just feels wrong somehow, I now have two places to maintain essentially the same code.

Is there a way to do this? I had a look through the docs but I couldn't find anything.

Cheers,
KEv.
Re: Super Context and expectation of failure [message #1780264 is a reply to message #1780105] Fri, 19 January 2018 12:10 Go to previous messageGo to next message
Viktoria Dlugopolskaya is currently offline Viktoria DlugopolskayaFriend
Messages: 124
Registered: March 2017
Senior Member
Hi Kev,

Try to put different code parts for credentials check-up into two identically named procedures and put each procedure into a new 'ecl script' context.
Then create two group contexts: one for valid credentials case and one for invalid credentials case. Each group context should contain 'parameters' context and 'ecl script' context.
Add a call fo the procedure into the main test. Replace super parameters context with super group context and run the text. Each instance of the test will call its own procedure implementation.
Hope it helps!
Re: Super Context and expectation of failure [message #1780306 is a reply to message #1780264] Fri, 19 January 2018 17:47 Go to previous messageGo to next message
Kev James is currently offline Kev JamesFriend
Messages: 22
Registered: November 2014
Junior Member
That sounds exactly what I'm looking for, thanks! I'll try it and report back
Re: Super Context and expectation of failure [message #1780308 is a reply to message #1780306] Fri, 19 January 2018 18:06 Go to previous message
Kev James is currently offline Kev JamesFriend
Messages: 22
Registered: November 2014
Junior Member
Works perfectly, in case anyone else finds this..
Previous Topic:Jars in the pom aut Injection
Next Topic:get-menu, text includes filepath
Goto Forum:
  


Current Time: Sat Jul 27 15:24:46 GMT 2024

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

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

Back to the top