Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » Is there any way to generalize error when checking within a test case?
Is there any way to generalize error when checking within a test case? [message #1800665] Fri, 04 January 2019 18:43 Go to next message
J Cruz is currently offline J CruzFriend
Messages: 4
Registered: January 2019
Junior Member
I have an RCPTT test where the error logged in the Error log can contain a number in the description that can change, for example, Error occurred (2). That number for a different run could be Error occurred (3).

I have found I need to check the Error log within the test case (error log verification runs after and does not catch it). Is there a way to generalize the error so it can be checked across test runs? So far I have found that the error takes a value that includes the number, for example, I have used (have not included \\syntax):

get-view "Error Log" | get-tree | verify-error {select "Error occurred (2)"}

This will not work in all cases because if the error is instead "Error occurred (3)" it will not be caught.

Is there a way to work around this?
Re: Is there any way to generalize error when checking within a test case? [message #1802028 is a reply to message #1800665] Thu, 31 January 2019 07:22 Go to previous messageGo to next message
Olga Yurchuk is currently offline Olga YurchukFriend
Messages: 245
Registered: September 2014
Senior Member

Hello,

You can use pattern with .* like here:

get-view "Error Log" | get-tree | verify-error {select "Error occurred .*"}

Please, let me know if it helps.


Yours sincerely,
Olga.
Re: Is there any way to generalize error when checking within a test case? [message #1806114 is a reply to message #1802028] Thu, 02 May 2019 20:38 Go to previous message
J Cruz is currently offline J CruzFriend
Messages: 4
Registered: January 2019
Junior Member
Hi Olga,

Yes, that helps!

Thanks much
Previous Topic:How to skip RCPTT test case execution
Next Topic:Invoking MenuDetectListener in a StyledText
Goto Forum:
  


Current Time: Wed Jul 24 21:45:36 GMT 2024

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

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

Back to the top