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

BUG: Test Cases are created for every new run #50

Closed
atodorov opened this issue Apr 15, 2019 · 2 comments
Closed

BUG: Test Cases are created for every new run #50

atodorov opened this issue Apr 15, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@atodorov
Copy link
Member

atodorov commented Apr 15, 2019

For example:

https://tcms.kiwitcms.org/runs/188/
https://tcms.kiwitcms.org/runs/189/

Both have KiwiJsonRpcClientTest.loginWithCorrectCredentialsTest with ID 428 and 431

@atodorov
Copy link
Member Author

More info:
TC with ID: 422-429 were the first to be created at the time when TR-188 was executed. These all look fine. All of these test cases have their tester set to kiwitcms-bot on the TestExecution objects used inside TR.

Then we have TR-189 with test cases 422-426, re-used because they were already in the database. For their test execution counterparts however Tester is set to None.

Next inside TR-189 we have 3 more test cases: 430-432, all of which are duplicating existing objects in the database.
430 duplicates 427
431 duplicates 428
432 duplicates 429

For all of these 3 Tester is again set to kiwitcms-bot as it should be.

@atodorov atodorov changed the title Test Cases are created for every new run BUG: Test Cases are created for every new run Apr 21, 2019
@atodorov atodorov added the bug Something isn't working label Apr 21, 2019
@atodorov
Copy link
Member Author

Note:
The problem is with how this library operates. We have 2 modules containing tests here and we don't loop over all of them at once but rather one after the other.

Once we've added the first few test cases to the TR on the first iteration then the second iteration will look for matching test cases only inside the TR and because the 2nd batch isn't found they will be created again.

This is inside TestDataEmitter.addTestResultsToRun, the first 5 lines before the for loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant