-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add Ant build support for code coverage #279
Conversation
…ge_stderr # Conflicts: # test/xspec-bat.cmd # test/xspec.bats
…ge_stderr # Conflicts: # test/xspec.bats
…ge_stderr # Conflicts: # test/xspec-bat.cmd # test/xspec.bats
…ge_stderr # Conflicts: # test/xspec-bat.cmd # test/xspec.bats
…ge_stderr # Conflicts: # build.xml
…ge_stderr # Conflicts: # test/saxon-custom-options/config.xml # test/saxon-custom-options/test.xspec # test/xspec-bat.cmd # test/xspec.bats
Although labelled as
So, in short, I hope this PR get merged asap and move forward :) |
@AirQuick: this is the next pull request to review on my list. I'll try to review by the end of this week, please bear with me for few days. |
@AirQuick: I tried to run it on the command line and on oXygen but I got inconsistent coverage reports, I'm not sure if it is an issue in my configuration and want to double check with you first. Command line ant -buildfile build.xml -lib /home/cirulls/Documents/programming/saxon-9ee/saxon9ee.jar -Dxspec.xml=tutorial/escape-for-regex.xspec -Dxspec.coverage.enabled=true I get this coverage report: This is what I expected and it's the same coverage report I would get via xspec.sh -c. So far so good. oXygen I followed your instructions for setting the transformation scenario, here is my setting: However, I get a different coverage report: I would expect the same report but instead I get no missing target (i.e. nothing is highlighted in red). Could you double check if you get the same report at your end? I initially suspected that Saxon EE was not picked up in my transformation scenario settings but a) I could not see any option in the transformation scenario to specify which Saxon processor to use; b) I would expect the transformation scenario to fail in case Saxon HE is used by default. Can you see any obvious mistake on my oXygen settings? Could you share your configuration? |
That difference comes from the Saxon version difference. |
Thanks for your comments, it makes sense now. I tried the same with the tutorial files for code coverage you committed in #299 and I got identical code coverage reports on both the command line and oXygen 20.0 so this is good. I'll finish off my review and keep you posted, I expect to merge this soon into |
I'll merge this if no concern arises in the next 72 hours. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Sorry for the wait, I finished the review yesterday but didn't have time to post it. As discussed on the pull request thread, I was able to run this successfully and consistently on both the command line and oXygen 20 using the coverage demo files in #299. I also inspected the files changed and ran the test suite locally on Linux, all tests are green.
After #299 is merged and the demo files for code coverage are added to master
, I think it would be useful to update the documentation for both Code Coverage and Ant (maybe adding a paragraph on how to run the code coverage via Ant). If you want, you can add now documentation for the parameter xspec.coverage.enabled
in Ant.
I'm merging this into master
.
@AlexJitianu and @yamahito: you may be interested in this for the oXygen harmonisation.
Done: |
Looks good, thanks for updating the documentation. |
This pull request derives from #269. So needs to be handled after that.
Closes #147
This pull request allows to generate the code coverage report using Ant build script.
The new property
xspec.coverage.enabled
controls that. (defaultfalse
)How to use
Command line
-Dxspec.coverage.enabled=true
to your usual command line. For example,*-coverage.html
will be generated in thexspec
subdirectory.Oxygen
/test/xspec/
..xspec
file./test/xspec/
in Working directory.xspec.project.dir
=/test/xspec/
xspec.coverage.enabled
=true
.xspec.coverage.html
=${cfd}/${cfn}-coverage.html
.${cfd}/${cfn}-coverage.html
in Open.==> XSpec Ant begins collecting code coverage. Oxygen will open the coverage report in your default browser.
Test
Using the files in #197, I manually verified that this pull request generated the same HTML file as the current master.
No automated tests for now. It should be addressed by #195.
Further work
xspec.coverage.enabled
in Wiki.(
xspec.coverage.html
should be kept undocumented unlessxspec.result.html
is documented...)