Skip to main content



      Home
Home » Archived » Jubula » possible to define / use conditions?
possible to define / use conditions? [message #1464420] Fri, 07 November 2014 09:35 Go to next message
Eclipse UserFriend
Is it possible to define conditions inside a testcase?

For example:
i want to test the login feature inside a webpage, but only if the user is not logged in already.
The logic in rough could be desribed as:
If there is element "login here" existing, perform the steps to login; otherwise let it.

Currently i did not find a way to solve that.
Re: possible to define / use conditions? [message #1464422 is a reply to message #1464420] Fri, 07 November 2014 09:40 Go to previous messageGo to next message
Eclipse UserFriend
Hi Michael,

You can do this using event handlers. For examples like this, you can use the "retry" option to achieve, e.g.

- check whether login is not there
--- if it is there (check failed), perform it (as part of the event handler), then retry the failed check.

There are examples of modules that do similar things on the portal:
http://testing.bredex.de/deal-with-occasional-dialog.html
http://testing.bredex.de/wait-for-status-text-to-change.html

Hope that helps!
Alex
Re: possible to define / use conditions? [message #1464710 is a reply to message #1464422] Fri, 07 November 2014 15:27 Go to previous messageGo to next message
Eclipse UserFriend
Good question,

Hi Alex,

but if the Retry check will fail again, and again.... because the Login will not be there... i think that Michael need just one "IF".

The test case always will finished with error check.

Have some work around for this?

thanks,


Plínio
Re: possible to define / use conditions? [message #1481216 is a reply to message #1464710] Thu, 20 November 2014 16:26 Go to previous message
Eclipse UserFriend
Plinio Froener wrote on Fri, 07 November 2014 15:27
but if the Retry check will fail again, and again.... because the Login will not be there... i think that Michael need just one "IF".

The trick is, the check needs to be that it passes if the login is NOT there. If the login IS there, then the check fails, and the event handler executes. The event handler deals with the login so that it is no longer there when the check is retried, and so the check passes on the retry.
Previous Topic:Easiest way to debug an AUTAgent?
Next Topic:Sharing a testcase among different AUTs under the same project
Goto Forum:
  


Current Time: Sat Jul 19 10:16:49 EDT 2025

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

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

Back to the top