• 4
    • 5
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Please make it possible to have code coverage reports in Bamboo for html, text, lcov and cobertura formats.

            [BAM-13180] Code coverage reports in Bamboo for Cobertura

            Aaron Yang added a comment - - edited

            +1000000000 for pytest!

            I found a workaround for this:

            1. First we get both XML and HTML code coverage report.
              python3 -m pytest --cache-clear --junitxml ./test_results.xml --cov=my_package --cov-report=xml:code_coverage.xml --cov-report=html:code_coverage_html my_package/
              
            2. Transter the XML report to Clover format with the python module "coverage2clover".
              python3 -m pip install coverage2clover
              coverage2clover -i code_coverage.xml -o code_coverage_fclover.xml
            3. Parse the xml report with Bamboo.
              In Job configuration > Other:
              • Tick "Collect code coverage data for this job"
              • Select "I already integrated a code coverage tool in this job." at "Integration options"
              • Fill in the "Coverage report" with the Clover XML filename, in my case it's "code_coverage_fbamboo.xml"
            4. Create Artifact:
              1. Name: Code Coverage Report
              2. Copy pattern: code_coverage_html/*
            5. Make Bamboo shows the artifact HTML report like a static website.
              1. Bamboo administration > SECURITY > Security settings > Global security and permission properties
              2. Tick the "Allow artifacts to be embedded in Bamboo pages"

             In this way, with a little bit sacrifice on the security, we can have both Clover report and a HTML full report for the Bamboo build.

             

             

            Aaron Yang added a comment - - edited +1000000000 for pytest! I found a workaround for this: First we get both XML and HTML code coverage report. python3 -m pytest --cache-clear --junitxml ./test_results.xml --cov=my_package --cov-report=xml:code_coverage.xml --cov-report=html:code_coverage_html my_package/ Transter the XML report to Clover format with the python module "coverage2clover". python3 -m pip install coverage2clover coverage2clover -i code_coverage.xml -o code_coverage_fclover.xml Parse the xml report with Bamboo. In Job configuration > Other: Tick "Collect code coverage data for this job" Select "I already integrated a code coverage tool in this job." at "Integration options" Fill in the "Coverage report" with the Clover XML filename, in my case it's "code_coverage_fbamboo.xml" Create Artifact: Name: Code Coverage Report Copy pattern: code_coverage_html/* Make Bamboo shows the artifact HTML report like a static website. Bamboo administration > SECURITY > Security settings > Global security and permission properties Tick the "Allow artifacts to be embedded in Bamboo pages"  In this way, with a little bit sacrifice on the security, we can have both Clover report and a HTML full report for the Bamboo build.    

            +1

            shyster added a comment -

            +100

            shyster added a comment - +100

            +1, we would also need a cobertura plugin for bamboo.

            Thomas Rogge-Solti added a comment - +1, we would also need a cobertura plugin for bamboo.

            As I am leaving the company that does Atlassian in 2 days, I just want to follow up with you guys, how we solved our problem: We switched to git/grunt native and open source build tools and every dev tests on his own (CI/CD/Unit) before merging into main branch. But since on some systems tests run slow, this is no definite solution, so I highly suggest everybody look into Codeship or Travis.

            Deleted Account (Inactive) added a comment - As I am leaving the company that does Atlassian in 2 days, I just want to follow up with you guys, how we solved our problem: We switched to git/grunt native and open source build tools and every dev tests on his own (CI/CD/Unit) before merging into main branch. But since on some systems tests run slow, this is no definite solution, so I highly suggest everybody look into Codeship or Travis.

            +1, we are using pytest and it only generate cobertura outputs. And I cannot find bamboo plugin that accepts cobertura coverage reports.

            Cedric Zhuang added a comment - +1, we are using pytest and it only generate cobertura outputs. And I cannot find bamboo plugin that accepts cobertura coverage reports.

            yes please add support for cobertura reports

            constantinofernandez added a comment - yes please add support for cobertura reports

            +1 We would need this for Istanbul Coverage Tester.

            Deleted Account (Inactive) added a comment - +1 We would need this for Istanbul Coverage Tester.

            + 1 This would also be of great help for me as our projects use nose and python.

            Guyverthree added a comment - + 1 This would also be of great help for me as our projects use nose and python.

            Bill Wang added a comment -

            @Krystian Brazulewicz

            The link https://bitbucket.org/i386/bamboo-cobertura-plugin is gone, do you know where can I download the plugin?

            Bill Wang added a comment - @Krystian Brazulewicz The link https://bitbucket.org/i386/bamboo-cobertura-plugin is gone, do you know where can I download the plugin?

              Unassigned Unassigned
              ssetayeshfar Sepideh Setayeshfar (Inactive)
              Votes:
              77 Vote for this issue
              Watchers:
              62 Start watching this issue

                Created:
                Updated: