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

ISSUE-58 #Codecov configuration to check code coverage #119

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ sudo: false

jdk:
- oraclejdk8
script: "mvn cobertura:cobertura"

after_success:
- bash <(curl -s https://codecov.io/bash)
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,19 @@ Who uses Zerocode?
--------------------
+ [HSBC Bank](https://www.hsbc.co.uk/) - MuleSoft APIs Load/Stress aka Performance testing, Consumer Contract testing and E2E Integration Testing
+ [Home Office(GOV.UK)](https://www.gov.uk/government/organisations/home-office) - Micro-Services Contract Testing, HDFS/Hbase REST end point testing


Code Coverage Report
--------------------
Link to see the coverage : http://please-provide-the-link-here
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls provide link for live coverage report please. That's the purpose.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link is not generic one. Once you merge this PR, we need to update this link as per zerocde code coverage report.
e.g. link could be similar to - https://codecov.io/gh/aghorpade/zerocode


using codecov open source tool to generate report for code coverage in unit testing.
How do we integrate it with GitHub?
Sign up in codecov.io via your GitHub account

Choose the repository you want to apply the coverage for. After applying codecov report will be generated as below
<img width="697" alt="codecov" src="https://user-images.githubusercontent.com/5318345/44539006-9d05df80-a720-11e8-9dbe-723e3f5180f1.PNG">


## REST BDD Testing Framework

Develop and test applications with TDD and BDD approach while easily building up your regression suites.
Expand Down
27 changes: 27 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
coverage:
precision: 2
round: nearest
#range - below minimum range, coverage badge (we'll get to badges in a sec) will be red, and as approching to 100% it will become greener
range: "40...70"
#ignore tag- all files which are not "meant" to be unit-tested, like GUI and constants-files
# so coverage percent won't be reduce by this code.
ignore:
- "zerocode/src/main/java/org/jsmart/zerocode/converter/SoapMocker.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/domain/builders/HighChartColumnHtmlBuilder.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/domain/Assertions.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/domain/Body.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/domain/QueryParams.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/domain/Request.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/verify/SmartJUnitNavigatorVerification.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/verify/SmartPackagedVerification.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/zzignored/env/EnvVarReader.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/zzignored/mocking/WireMockJsonContentTesting.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/zzignored/trick/JacksonCsv.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/zzignored/trick/JSON2CSV.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/zzignored/trick/LogHello.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/zzignored/trick/NotifierFuncMain.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/zzignored/ZeroCodeException.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/AddService.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/httpclient/ssl/CorporateProxyNoSslContextHttpClient.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/httpclient/ssl/SslTrustCorporateProxyHttpClient.java"
- "zerocode/src/main/java/org/jsmart/zerocode/core/httpclient/ssl/SslTrustHttpClient.java"
29 changes: 29 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,21 @@
<target>${java-compiler-target.version}</target>
</configuration>
</plugin>

<!-- code cov plugin to generate report on code coverage-->
<plugin>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just check, do we need the cobertura plugin for local profile? If not, then keep only for release profile

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to check code coverage on local machine,we will need it in local profile. If there is no need then we can remove it

<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
<formats>
<format>html</format>
<format>xml</format>
</formats>
<check />
</configuration>
</plugin>

</plugins>
</build>
</profile>
Expand Down Expand Up @@ -315,6 +330,20 @@
<goals>deploy</goals>
</configuration>
</plugin>
<!-- code cov plugin to generate report on code coverage-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
<formats>
<format>html</format>
<format>xml</format>
</formats>
<check />
</configuration>
</plugin>

</plugins>
</build>

Expand Down

This file was deleted.