Comments (7)
Hi @MarkEWaite could you assign me to this issue? Appreciate any initial pointers for working on this as a first time contributor. Thanks in advance.
from embeddable-build-status-plugin.
@adamtkac I'm delighted that you're willing to contribute. There is enough work on this topic that I don't bother to assign it to a single person. You can start the work and submit a pull request. See the Jenkins gitter Hacktoberfest chat channel for a recent discussion about assessing test coverage of a plugin and writing new unit tests based on that result.
The steps are:
- Identify larger Java classes with very little test coverage from the ci.jenkins.io test coverage report (look at the line coverage report to identify the larger classes with low coverage
- Install the necessary tools (git, Java 11, Apache Maven) as described in "Preparing for plugin development"
- Checkout a local copy of the repository with
git clone https://github.com/jenkinsci/embeddable-build-status-plugin.git
- Build and run automated tests locally with
mvn -P enable-jacoco clean install jacoco:report
- Review the locally generated coverage report in
target/site/jacoco/index.html
to identify untested classes and statements - Use your integrated development environment (Visual Studio Code, Apache Netbeans, IntelliJ, or Eclipse) to generate test stubs for one of the untested classes
- Add test details to one of the stubs, delete the other stubs
- Run the test and confirm that the test compiles and that it passes
- Submit a pull request so that it can be reviewed and improved if necessary
from embeddable-build-status-plugin.
Thank you for your answer. It is possible to divide issue to partial issues, depending on parts of code which needs to be covered first? I will start do my best as soon as I can.
from embeddable-build-status-plugin.
Thank you for your answer. It is possible to divide issue to partial issues, depending on parts of code which needs to be covered first? I will start do my best as soon as I can.
Yes, you're welcome to create additional issues that track specific classes where you are focusing implementation.
from embeddable-build-status-plugin.
mvn -P enable-jacoco clean install jacoco:report
ran successfully for me once, on subsequent runs I've been getting the following error (w/o any change), mvn test
also produced the same sort of error. i have java 11, macos 12.3, jenkins 2.361.4, wonder if anyone seen this before.
[ERROR] Failures: [605/1944]
[ERROR] PublicBuildStatusActionTest.testDoIconBuildAfter:104
Expected: a string containing "<svg "
but: was "<html><body>
<h1>404 Not Found</h1>
<p>Stapler processed this HTTP request as follows, but couldn't find the resource to consume the request
<pre>
-> evaluate(<hudson.model.Hudson@22513da2> :hudson.model.Hudson,"/buildStatus/icon")
-> evaluate(((StaplerProxy)<hudson.model.Hudson@22513da2>).getTarget(),"/buildStatus/icon")
-> evaluate(<hudson.model.Hudson@22513da2>.getDynamic("buildStatus",...),"/icon")
[email protected]("buildStatus",...)==null. Back tracking.
-> evaluate(((StaplerFallback)<hudson.model.Hudson@22513da2>).getStaplerFallback(),"/buildStatus/icon")
-> evaluate(<hudson.model.AllView@65ca8da2[view/all/]> :hudson.model.AllView,"/buildStatus/icon")
-> evaluate(<hudson.model.AllView@65ca8da2[view/all/]>.getDynamic("buildStatus",...),"/icon")
hudson.model.AllView@65ca8da2[view/all/].getDynamic("buildStatus",...)==null. Back tracking.
<font color=red>-> No matching rule was found on <hudson.model.AllView@65ca8da2[view/all/]> for "/buildStatus/icon"</font>
</pre>
<p><hudson.model.AllView@65ca8da2[view/all/]> has the following URL mappings, in the order of preference:<ol>
<li> If path ends without '/' insert it
from embeddable-build-status-plugin.
I've not seen that failure before. I don't have access to a macOS machine, but I confirmed that the tests run as expected multiple times on a FreeBSD 13.1 machine (closest thing I have to macOS). The web response is definitely a Jenkins response. I don't know why it would report that the resource cannot be found.
from embeddable-build-status-plugin.
Thanks Mark, I thought it might be related to SECURITY-595, because I did also run into 404 with badge/text
where I had to add the whitelisting to stapler-whitelist.txt for it to work:
method org.jenkinsci.plugins.badge.actions.RunBadgeAction doText
But I'm not sure where to add this while running unittest...Im gonna try couple things see if I can get it working..
from embeddable-build-status-plugin.
Related Issues (20)
- Parameter name with spaces HOT 4
- copy build status URL from Jenkins branch/job page HOT 6
- Instructions on how to add a link with query parameters
- RFC: support for ENV to filter out PR builds HOT 2
- Support API Token in query params
- Badge examples incorrect for some jobs if opened directly from URL HOT 1
- Display the image on the build information page HOT 1
- Hello would HOT 1
- Badge in build from pull request shows wrong badge
- Unprotected URL and self-signed SSL HOT 1
- Question: setup badge width HOT 3
- Create Jenkins
- Create Bug-Report
- Unprotected URLs work for Anonymous user even without ViewStatus permission HOT 1
- Running selector on boolean build param
- builtin variables "description" does not get value HOT 1
- Build status for pipeline building multiple projects and branches HOT 2
- Update appears to have broken github readme links displaying "not run" HOT 2
- Announcement: ci.jenkins.io badges will be deactivated HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from embeddable-build-status-plugin.