-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Excel input files: unable to execute tests by tag #60
Comments
I have myself always encounter the same issue as @joergschultzelutter . If you want a quick solution you can used the exclude option which work but it's pretty annoying as you need to exclude all except the one tag you need to use :-/ |
Some additional thoughts - I think that the root cause might be twofold:
I don't know if this issue can be solved by using RF"s listeners but for now, I don't see any workarounds which would enable me to run Excel-based tests based on their |
https://github.com/Snooz82/robotframework-datadriver#filtering-with-tags Have you read this in the docs? To select tests by There is also an option when using DataDriver to configure how tags from the template are added to the generated TestCases. *** Settings ***
Library DataDriver handle_template_tags=NoTags Allowed Values
You can configure how to handle tags from the template in generated tests:
|
Yes, I did read the documentation :-) However, based my initial question, @ddufrasn 's comment and other inquiries related to the same topic I suggest enhancing the documentation on this issue as it was not really clear to all of us how this option really works. For completeness sake, here is an updated version of my original example RF test suite. The additional *** Settings ***
Library DataDriver file=datadriver.xlsx handle_template_tags=DefaultTags
Test Template DataDriver Demo Test Main
Default Tags check update modify world_domination
*** Variables ***
${JSON_BODY} ${EMPTY}
*** Test Cases ***
DataDriver Demo Test Call '${API_CALL}'
[Documentation] Run the test cases for method ${API_CALL}
*** Keywords ***
DataDriver Demo Test Main
[arguments] ${API_CALL} ${VAR1} ${VAR2}
Run Keyword DataDriver_Demo_Test_${API_CALL} ${API_CALL} ${VAR1} ${VAR2}
DataDriver_Demo_Test_Call_One
[arguments] ${API_CALL} ${VAR1} ${VAR2}
Log To Console Call One
DataDriver_Demo_Test_Call_Two
[arguments] ${API_CALL} ${VAR1} ${VAR2}
Log To Console Call Two
|
I have this very simple Robot Test which uses an Excel sheet (datadriver.xlsx) as data source:
The Excel text file contains multiple
![xls](https://user-images.githubusercontent.com/76180229/135073246-fa29ec91-f7f9-4060-87ed-6e21730c0b6a.JPG)
tags
per test case.RF recognises these tags and lists them correctly in the test's associated report file.
![rf](https://user-images.githubusercontent.com/76180229/135071589-be0c7923-2bbe-4aa3-8b13-2a9b07895d9b.jpg)
However, if I try to run a single test based on its
tags
value, the test cannot be found.My assumption is that this is a limitation with the Excel input file digestion as the
-i
option is triggered before you can actually examine the Excel input file and get the tags from there. I have consulted this article but can't really see an error with my code. Am I missing something here?The text was updated successfully, but these errors were encountered: