Klika-Tech / tm4j_reporter_robot

MIT License
5 stars 1 forks source link

Pabot compatibility #15

Closed lubosjerabek closed 3 years ago

lubosjerabek commented 3 years ago

Hi all,

I absolutely love this! We use pabot for parallel test execution and this listener seem to create new test cycle whenever a thread starts (in my case it's a test suite.) Usage: pabot --pabotlib --artifactsinsubfolders --processes 4 --listener tm4j_reporter_robot.TM4JRobotListener:{{api_key}}:{{project_name}}:{{test_cycle_name}} //path/to/tests/

Would it be possible to avoid creation of new test cycle if the one with passed name already exists? I didn't want to create a PR to potentially go against your design and stuff. Let me know if I can help.

Yurasb commented 3 years ago

Hey @lubosjerabek ! First of all, thanks for feedback! Here in KlikaTech we're glad that our work helps other developers.

With regard of your case, I will think about it and let you know in short time. That's a good case.

lubosjerabek commented 3 years ago

Let me know if I/we can help please. :)

Yurasb commented 3 years ago

Hey @lubosjerabek Sorry for long response. Work with parallel running is not so easy as I thought :) If you have any vision for solution, please go ahead and share.

lubosjerabek commented 3 years ago

@Yurasb I was thinking processing the output xml file instead or only updating existing test cycle if it already is one with the same name. I think we might be writing something from scratch using the first option.

Yurasb commented 3 years ago

@lubosjerabek my first idea was checking existence of test cycle through API. But this will not work properly in parallel running, аnd also requires a lot of additional logic. Option with parsing XML doesn't fit our initial approach, we wanted to get rid of file parsing first of all. The best solution seems to handle this through multiprocessing since pabot uses it, but I still wasn't able to succeed :( The problem is that lock doesn't work because processes were launched by pabot, not by listener. I will continue trying. Maybe, we'll come up with separate listener.

Yurasb commented 3 years ago

@lubosjerabek hey! Sorry for delay, but I was busy with work, and didn't have much time to find a proper solution. But, good news, seems like I've found it, at least it works while I'm testing :) Could you please try to install listener from branch issue_15 (e.g. with pip: pip install git+https://github.com/Klika-Tech/tm4j_reporter_robot.git@issue_15 ) and test on your side before we merge into master? Thank you in advance!

lubosjerabek commented 3 years ago

No worries at all, I'll check that out today. :)

lubosjerabek commented 3 years ago

Works like a charm!

Yurasb commented 3 years ago

Works like a charm!

Good news! Soon we'll merge it to master. Thanks again for interesting case!