Skip to content
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

Dynamic Tagging Issue #413

Open
rprabhu2503 opened this issue Jul 23, 2019 · 6 comments
Open

Dynamic Tagging Issue #413

rprabhu2503 opened this issue Jul 23, 2019 · 6 comments

Comments

@rprabhu2503
Copy link

Hi,
We are using dynamic tagging for multiple tests.
For e.g.
@feature("TestType1")
@category("Integration")
Void test1()
{}

@feature("TestType1")
@category("Integration")
Void test 2()
{}

In AngularJS when we access items in rootTags by rootTags[N].nodeName(), we get Tags like "Integration", "Feature", where as we are expecting "Integration", "TestType1" & TestType2".

Could you please help us how to find dynamic tag names in AngularJS when we used different values for same Tag Category.

Would appreciate a quick response as we are in the critical path of our project.

Thanks
Rajesh

@rprabhu2503
Copy link
Author

Would really appreciate if someone can help by replying to the query ASAP. Its critical for us to make progress.
Thanks

@janschaefer
Copy link
Contributor

I must admit, I do not really understand your question. Why do you want to access the tags in AngularJS? What do you want to achieve with this?

@rprabhu2503
Copy link
Author

Hi, here is what we want to achieve. As a test scenario can be executed multiple times the count against "all scenarios"/success/failed/pending is currently based on its count of execution. For e:g say a scenario was executed thrice and all were success then the count shown against success and "all scenario" is 3. What we would want to show is only 1 which is based on the its last execution status. So if there are 500 scenarios and all are executed multiple times then we want the "all scenarios" count to be 500 and this count should be spread across success/failed/pending based on there's last execution status only. As we have these scenarios spread across features the tag is required to categorize them across features in same manner. Hope it clarifies. Would appreciate your help. Thanks

@janschaefer
Copy link
Contributor

Ok, I think I understood what you want to do, but it is still unclear why you want to do that. You typically execute a scenario multiple times with different values, so each scenario execution is in fact a different scenario. You do not repeat the same scenario with the same values multiple times. Thus it also does not make much sense to me to just use the last execution status. Why should the others be ignored? I have the feeling that you are using JGiven in a way that it is not meant to be used.

Regarding your original question with the tags. The tags have a 'subTags()' function that you can call to get the subtags. These should contain the values.

@rprabhu2503
Copy link
Author

Hi thanks a lot for the prompt response. I fully agree with your point on considering a scenario execution with different arguments to be counted uniquely. However a scenario with same argument can be executed multiple times. In this only it's last execution status matters and therefore count as 1. I think this point didn't come out clearly in my earlier query. Do you still think it's not logical and therefore not a right approach of counting. Look forward to hearing from you. Thanks

@janschaefer
Copy link
Contributor

Ok, you have scenarios that sometimes fail so you repeat them. And if the repeated run passes, you do not want to see that the previous ones failed, right? Which test runner are you using and how do you repeat the scenario? Maybe this a general issue that should be fixed in JGiven.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants