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

Measuring code coverage of integration tests #67

Closed
donsizemore opened this issue May 28, 2019 · 10 comments
Closed

Measuring code coverage of integration tests #67

donsizemore opened this issue May 28, 2019 · 10 comments
Assignees

Comments

@donsizemore
Copy link
Contributor

à la http://guides.dataverse.org/en/latest/developers/testing.html#measuring-coverage-of-integration-tests

@pdurbin
Copy link
Member

pdurbin commented Sep 19, 2019

@donsizemore IQSS/dataverse#6186 was merged so I guess my new docs looked ok. I think we may need to work on #65 a bit too.

@djbrooke djbrooke moved this from IQSS Team Dev 💻 to Community Dev 💻❤️ in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Oct 17, 2019
@pdurbin pdurbin changed the title jacoco test coverage Measuring code coverage of integration tests Nov 15, 2019
@pdurbin
Copy link
Member

pdurbin commented Nov 15, 2019

@donsizemore and I talked about this issue on Wednesday.

I just gave it a new title.

In IQSS/dataverse#6272 I cleaned up the buttons at the bottom of the README for dataverse. In my head, I left space for a button called "API Test coverage". That is to say, it's the last thing that isn't done:

Unit Tests Integration Tests
Status shown (pass vs. fail) DONE DONE
Code coverage measured DONE TODO

gdcc/dataverse-kubernetes#84 is related and as I said @poikilotherm has ideas of how we can use Maven instead of Pete's script to put the extra jar in the war file. The place to work on Maven stuff is IQSS/dataverse#6124

For this issue (Ansible stuff) we could either work with what we have now, the scripts and docs at http://guides.dataverse.org/en/latest/developers/testing.html#measuring-coverage-of-integration-tests or we could defer and make it all fancier with Maven first.

@pdurbin pdurbin removed this from To do list for donsizemore in pdurbin Nov 15, 2019
@donsizemore
Copy link
Contributor Author

@pdurbin pom.xml changes may be the way, but for now I took a baby step and enabled this in Jenkins: https://jenkins.dataverse.org/job/IQSS-dataverse-develop/297/jacoco/

feedback, positive or negative, welcome.

@pdurbin
Copy link
Member

pdurbin commented Jan 3, 2020

@donsizemore as we just discussed on Zoom, this is looking great! Go, go, go! Thank you!

@donsizemore
Copy link
Contributor Author

@pdurbin just so you know I haven't forgotten, here's where I am currently:

TASK [dataverse : deploy dataverse.war] ****************************************
fatal: [default]: FAILED! => {"changed": true, "cmd": "nohup /usr/local/glassfish4/bin/asadmin deploy /tmp/dvinstall/dataverse.war", "delta": "0:00:27.796465", "end": "2020-01-28 16:04:02.369505", "msg": "non-zero return code", "rc": 1, "start": "2020-01-28 16:03:34.573040", "stderr": "remote failure: Error occurred during deployment: Exception while deploying the app [dataverse] : org/jacoco/agent/rt/internal_c13123e/Offline. Related annotation information: annotation [@javax.ejb.TransactionAttribute(value=REQUIRES_NEW)] on annotated element [void edu.harvard.iq.dataverse.workflow.WorkflowServiceBean.unlockDataset(edu.harvard.iq.dataverse.workflow.WorkflowContext) throws edu.harvard.iq.dataverse.engine.command.exception.CommandException] of type [METHOD]. Please see server.log for more details.", "stderr_lines": ["remote failure: Error occurred during deployment: Exception while deploying the app [dataverse] : org/jacoco/agent/rt/internal_c13123e/Offline. Related annotation information: annotation [@javax.ejb.TransactionAttribute(value=REQUIRES_NEW)] on annotated element [void edu.harvard.iq.dataverse.workflow.WorkflowServiceBean.unlockDataset(edu.harvard.iq.dataverse.workflow.WorkflowContext) throws edu.harvard.iq.dataverse.engine.command.exception.CommandException] of type [METHOD]. Please see server.log for more details."], "stdout": "Command deploy failed.", 
Caused by: org/jacoco/agent/rt/internal_c13123e/Offline. Related annotation information: annotation [@javax.ejb.TransactionAttribute(value=REQUIRES_NEW)] on annotated element [void edu.harvard.iq.dataverse.workflow.WorkflowServiceBean.unlockDataset(edu.harvard.iq.dataverse.workflow.WorkflowContext) throws edu.harvard.iq.dataverse.engine.command.exception.CommandException] of type [METHOD]

@donsizemore
Copy link
Contributor Author

@pdurbin @scolapasta and I tried bumping Jacoco to 0.8.5:

"remote failure: Error occurred during deployment: Exception while deploying the app [dataverse] : org/jacoco/agent/rt/internal_43f5073/Offline. Related annotation information: annotation [@javax.ejb.TransactionAttribute(value=REQUIRES_NEW)] on annotated element [public void edu.harvard.iq.dataverse.DatasetServiceBean.deleteHarvestedDataset(edu.harvard.iq.dataverse.Dataset,edu.harvard.iq.dataverse.engine.command.DataverseRequest,java.util.logging.Logger)] of type [METHOD]. Please see server.log for more details.", "stderr_lines": ["remote failure: Error occurred during deployment: Exception while deploying the app [dataverse] : org/jacoco/agent/rt/internal_43f5073/Offline. Related annotation information: annotation [@javax.ejb.TransactionAttribute(value=REQUIRES_NEW)] on annotated element [public void edu.harvard.iq.dataverse.DatasetServiceBean.deleteHarvestedDataset(edu.harvard.iq.dataverse.Dataset,edu.harvard.iq.dataverse.engine.command.DataverseRequest,java.util.logging.Logger)] of type [METHOD]. Please see server.log for more details."], "stdout": "Command deploy failed.", "stdout_lines": ["Command deploy failed."]}

@pameyer
Copy link

pameyer commented Jan 29, 2020

@donsizemore - not sure if this is the problem you're running into or not; but in my hands glassfish needed a restart after adding the jacoco agent, before deploying dataverse.

@donsizemore
Copy link
Contributor Author

@pameyer I'm placing the agent before I start glassfish; different jacoco version cause deployment to die in different classes.

@pdurbin
Copy link
Member

pdurbin commented Jan 29, 2020

I took a quick look at the stacktrace and b75122e but I'm not sure what's going on. I don't think anyone but the three of us have messed with this stuff. @poikilotherm might have some ideas for instrumenting the war with Maven rather than Ansible. I might even see him on Friday. I'll ask him what's in focus. 😄

donsizemore added a commit that referenced this issue Jan 31, 2020
@donsizemore
Copy link
Contributor Author

@Purbin fixed =) though it's time for the gym. will doctor up later.

donsizemore added a commit that referenced this issue Feb 4, 2020
donsizemore added a commit that referenced this issue Feb 11, 2020
donsizemore added a commit that referenced this issue Feb 12, 2020
donsizemore added a commit that referenced this issue Feb 13, 2020
donsizemore added a commit that referenced this issue Feb 21, 2020
#67 merge jacoco.exec files, generate report from result
donsizemore added a commit that referenced this issue Feb 24, 2020
donsizemore added a commit that referenced this issue Feb 24, 2020
#67 merge both jacoco.exec files
@donsizemore donsizemore self-assigned this Apr 30, 2020
pallinger pushed a commit to dsd-sztaki-hu/dataverse-ansible-deprecated that referenced this issue Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants