How to execute tests as per their tag such as smoke or regression using pabot?

Viewed 338

I have many testcases written in Robot Framework for our android application.

For ex.

Verify Login functionality.

[Tags]  TC-1  Login.

Given Landing on Home page.

When Enter Login cred and passowrd.

Then User Lands on Homepage.

I use the pabot command to run this on 2 different devices at the same time: pabot --argumentfile1 config-one.txt --argumentfile2 config-two.txt test.txt

All these times the pabot runs all the testcases present in the test.txt file whereas i only want to run those testcases which have 'login' tag.

Any idea how can i run only certain test cases using pabot which have a particular tag such as 'login'?

2 Answers

pabot supports all robot command-line options, so you can use --include option (Selecting Test Cases - By Tag Names) to include only tests with a specific tag.

pabot --include login --argumentfile1 config-one.txt --argumentfile2 config-two.txt test.txt

I don't know if that's exactly right - your example code shows a tag of Login but the body of the question mentions a tag named login (no trailing ".")

I think, pabot options have to come before robot options. In your example the order should be:

pabot --argumentfile1 config-one.txt --argumentfile2 config-two.txt --include login test.txt

Related