Dynamic Test Cases?

129 views
Skip to first unread message

Daniel Connolly

unread,
Jun 18, 2013, 3:47:26 PM6/18/13
to robotframe...@googlegroups.com
I'm trying to apply a test to all of the members of a group. It works, but not quite the way I would like. I'm using something like this

*** Test Cases ***
All Accounts
    @{allusers}        Get Group Members    ${THE GROUP}
    :FOR   ${auser}  IN  @{allusers}
    \    Run Keyword and Continue on Failure     Account is ok        ${auser}

There are about a thousand members of this group. The issue is that this is represented in the results as one big test case.

Is there a way to dynamically create test cases? So I could create a test case for every member of the group. That way there would be a thousand test cases and I can use the filtering in the report to only show the failed cases.

Daniel

Laurent Bristiel

unread,
Jun 19, 2013, 3:22:13 AM6/19/13
to robotframe...@googlegroups.com
As far as I know there is no way to create dynamically test cases in RF.
But maybe some more experienced people have an idea.

when I want to tets multiple things (accounts for you) in a single test case,
I do like you and use the "Run keyword and continue on failure",
and on every failure I store the information in an object,
so that at the end of the test case, if the object is not empty,
I force test case failure and log the list of items that failed.
Not what you ask, and maybe what you already do, but that might help.

Laurent

Mikko Korpela

unread,
Jun 19, 2013, 3:50:26 AM6/19/13
to lau...@bristiel.com, robotframe...@googlegroups.com
Hello,

I made a test generator some time ago:

There might be others available also or you could make one of your own..

-- 
Mikko Korpela
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ricardo Cardona R

unread,
Jun 19, 2013, 8:37:30 AM6/19/13
to robotframe...@googlegroups.com
In theory it is possible using the new public API for generating and executing tests but i did several tests without success.

Maybe someone can give more examples about it.

Ricardo
Reply all
Reply to author
Forward
0 new messages