CleanCut / green

Green is a clean, colorful, fast python test runner.
MIT License
785 stars 75 forks source link

Junit report document time #225

Closed bkmd11 closed 4 years ago

bkmd11 commented 4 years ago

The junit report now shows time for each test case. I had to add test_time into the methods called by addProtoTestResult in order to make it work. I made it an optional argument with the hopes of not breaking them if they get called without a test_time.

bkmd11 commented 4 years ago

No worries on taking time to get back, I just assumed things were busy for you. I am glad you figured out the problem with your computer.

I have written tests for the changes I made, and I believe I fixed the files I changed. I also removed my changes to .gitignore, as if that is best practice it would be good for me to get in the habit of not changing that file. I had also made some changes per the advice of @jeansaad and made the report capture total time taken for the test suite to run. For some reason I do not see that showing up under this pull request. Do I need to open up another pull request for that change? I am fairly new to contributing on gitHub and am not entirely sure about the whole process.

Also, this may be better posted in the issue section, but when I try to run green on my personal green repository it always gets stuck in an infinite loop. This prevented me from using it to check for 100% coverage. Any suggestions on something I might be doing wrong?

CleanCut commented 4 years ago

For some reason I do not see that showing up under this pull request. Do I need to open up another pull request for that change?

As long as you make the commits on that same junit branch of your fork and then push them to your fork of the repository on GitHub, they ought to show up here.

CleanCut commented 4 years ago

Also, this may be better posted in the issue section, but when I try to run green on my personal green repository it always gets stuck in an infinite loop. This prevented me from using it to check for 100% coverage. Any suggestions on something I might be doing wrong?

Are you using the "g" script? You can't test the development version of green with an installed version of green -- they both try to monkey-patch things and everything gets weird. In fact, I advise unistalling green entirely from the Python environment you're using to work on green itself. Or just use a virtualenv, either way. Then you can run things like ./g -j somefile.xml -r green

bkmd11 commented 4 years ago

Are you using the "g" script?

I did not know that was a thing I could do. That makes life a lot easier!

bkmd11 commented 4 years ago

I am currently working on fixing the issues. It was an oversight on my end for using the wrong attribute names and not including <testsuite>. Thank you for helping me with this.

bkmd11 commented 4 years ago

I believe I have resolved the issues

CleanCut commented 4 years ago

Included in Green 3.2.0 (just released).