using RIDE, having trouble with "skip tests with this tag"

429 views
Skip to first unread message

JamO Luhrsen

unread,
Dec 11, 2013, 5:38:17 PM12/11/13
to robotframe...@googlegroups.com
Hi all, (new to the group),

I'm just getting started in Robot framework and using RIDE currently.  One thing that I can't figure
out is how to use the "skip tests with this tag" feature.  I have a test case with "[Tags] NOTREADY"
but it is executing even though I have the checkbox and field configured as I would expect in the 
RIDE GUI.

Is this feature not working, or probably I'm doing something wrong.  

I'm running RIDE 1.2.2 on unbuntu desktop 13.04

Thanks,
JamO

Laurent Bristiel

unread,
Dec 11, 2013, 8:58:03 PM12/11/13
to robotframe...@googlegroups.com
Hello,

welcome to the group!

I would try to do the same thing outside of Ride to see if the problems comes from RIDE or Robot itself.
On command line, try "pybot --exclude NOTREADY" and see if your test is run or not.
If exclusion is not working, then maybe there is a problem with your test I guess
If eclusion if working, then problem is in Ride and you could try to see what is the command that is launched and copy/paste it here (I think the command is written in a temporary file)

HTH,
Laurent

JamO Luhrsen

unread,
Dec 12, 2013, 1:32:04 PM12/12/13
to robotframe...@googlegroups.com
Thanks for the quick response Laurent,

I think my issue was understanding what "exclude" does.  The results are the same on the 
cmd line and RIDE.  Those cases are skipped, but they are marked as PASS.

Does Robot have the ability to mark a test as something other than PASS or FAIL?  I wanted
to stub out all my test cases but some will be No Op's for a while, and I don't want to see those
as PASS.

Thanks,
JamO

Laurent Bristiel

unread,
Dec 12, 2013, 1:54:24 PM12/12/13
to robotframe...@googlegroups.com
> Those cases are skipped, but they are marked as PASS.
I am very surprised, skipped test should not appear at all in the report, log and any output.
could you share the command line that is run?


> Does Robot have the ability to mark a test as something other than PASS or FAIL?
no, but you should be able to deal with most situations with that 2 status

Laurent

JamO Luhrsen

unread,
Dec 13, 2013, 6:09:36 PM12/13/13
to robotframe...@googlegroups.com
Ah, my problem was case sensitivity.   My test case used a tag "NOTREADY".  But, pybot ignored it when I
used the same case.  Using lower case on the command line works.  

Looks like pybot only uses lower case for exclude arguments?


for completeness, here is my example:

$ cat doesSkipWork.txt 
*** Settings ***

*** Test Case ***
This test should run
[Tags] READY
Log Running test case run

This test should not run
[Tags] NOTREADY
Log Running test case skip

$ sudo pybot --exclude notready doesSkipWork.txt 
==============================================================================
doesSkipWork                                                                  
==============================================================================
This test should run                                                  | PASS |
------------------------------------------------------------------------------
doesSkipWork                                                          | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================

$ sudo pybot --exclude NOTREADY doesSkipWork.txt 
==============================================================================
doesSkipWork                                                                  
==============================================================================
This test should run                                                  | PASS |
------------------------------------------------------------------------------
This test should not run                                              | PASS |
------------------------------------------------------------------------------
doesSkipWork                                                          | PASS |
2 critical tests, 2 passed, 0 failed
2 tests total, 2 passed, 0 failed
==============================================================================




JamO

Kevin O.

unread,
Dec 14, 2013, 4:49:47 PM12/14/13
to robotframe...@googlegroups.com
Its not that pybot only uses lower case, its that logical operators can be embedded in the tag names and are only recognized if they are in upper case.
NOT is normally used like tag1NOTtag2, so I'm guessing RF sees NOTREADY as exclude tests with an empty string tag that do not have the tag READY (would probably never match). Since tag names are not case sensitive for --include, --exclude, etc., it is best to always use lower case for the tag names so you do not get tripped up again.
This behavior is documented in the user guide as well as the command line help.

JamO Luhrsen

unread,
Dec 17, 2013, 7:10:22 PM12/17/13
to robotframe...@googlegroups.com
Thanks for those details, Kevin.
Reply all
Reply to author
Forward
0 new messages