Code coverage statistics for OpenJDK
Mani Sarkar
sadhak001 at gmail.com
Tue Feb 3 07:22:27 UTC 2015
There's also a simple example of how to write your first test (OpenJDK) for
a Java class in the same document I mentioned earlier.
Its worth going through the index and updating yourself about various
topics thereunder.
Cheers,
Mani
On Tue, Feb 3, 2015 at 7:07 AM, Mani Sarkar <sadhak001 at gmail.com> wrote:
> HI Richard,
>
> Great question - I don't the figures of how much of these are community
> contributed but OpenJDK has been public since sometime and I believe there
> would be contributions from the community. A couple of years ago we had
> TestFest in London and a number of us contributed to the test suite.
>
> Test patches are always welcome as long as they don't duplicate another
> test, bring value and exhibit good coverage - above all written in the
> OpenJDK protocol (using JTReg, TestNG, etc...).
>
> To get started have a look at the tests, first get familiar with the test
> suites in the respective repos:
>
> │ ├── ./hotspot/test
> │ ├── ./jaxp/test
> │ ├── ./jdk/test
> │ ├── ./langtools/test
> │ ├── ./nashorn/test
>
> (Not all repos have a test folder)
>
> I have also an detailed section *How to use JTReg… - Java Regression Test
> Harness* on tests in the Adopt OpenJDK Intermediate & Advance experiences
> document: http://bit.ly/1ckphOl,
>
> Use both these are a route to get started.
>
> Also there's a thread on how to get JCov coverage when running JTReg tests
> -
> http://mail.openjdk.java.net/pipermail/adoption-discuss/2015-January/000542.html
>
> You will need to make sure you download the latest JTReg built on our
> Cloudbees farm, see
> https://adopt-openjdk.ci.cloudbees.com/view/OpenJDK%20code-tools/, this
> build has jcov embedded in it. This along with the above changes to your
> jdk/test/Makefile should give you a local build with coverage reports.
>
> Identify a class or package that is simple and interesting ==> look for
> all the relevant test suites ==> check the coverage and find the gaps, if
> any ==> write test(s) ==> get coverage report by running tests (make test)
> ==> iterate!
>
> When your test patches are ready for submission, announce here and we can
> help you further with your submissions (there is a section in the guide
> about patch submissions as well).
>
> I hope this helps.
>
> Regards,
> Mani
>
> On Tue, Feb 3, 2015 at 5:45 AM, Richard Kolb <rjdkolb at gmail.com> wrote:
>
>> Hi Mani,
>>
>> How does one get involved in something this awesome ?
>>
>> What percentage of these tests are written by the community ?
>>
>> thanks,
>> Richard.
>>
>> On 3 February 2015 at 00:26, Mani Sarkar <sadhak001 at gmail.com> wrote:
>>
>>> And it can only get better with everyone's involvement. ;)
>>>
>>> On Mon, Feb 2, 2015 at 12:52 PM, Richard Kolb <rjdkolb at gmail.com> wrote:
>>>
>>>> Awesome results for a non tdd program!
>>>> On 1 Feb 2015 12:45, "Martijn Verburg" <martijnverburg at gmail.com>
>>>> wrote:
>>>>
>>>> > Hi all,
>>>> >
>>>> > Recently, one of our Adopt OpenJDK incubator projects (for reference,
>>>> these
>>>> > projects are outside of OpenJDK proper, the wiki holds the full list)
>>>> > managed to get some what we think are accurate code coverage stats for
>>>> > OpenJDK (jdk9-dev) tests. Thanks to Jonathan Gibbons from code-tools
>>>> > (jtreg/jcov) and Adopt's John Oliver for getting this out!
>>>> >
>>>> > I think this is potentially useful for the OpenJDK quality group to
>>>> report
>>>> > alongside the existing weekly tests passing that Balchandra kindly
>>>> pushes
>>>> > out. It can also be useful to OpenJDK contributors to have a guide on
>>>> > making a change -> writing a test -> seeing code coverage improve.
>>>> >
>>>> > Obviously we want to:
>>>> >
>>>> > * Make sure the numbers are correct.
>>>> >
>>>> > * Make it clear in the report that this does not represent how well
>>>> OpenJDK
>>>> > / Java is actually tested (internally Oracle and others run a far more
>>>> > comprehensive test suite).
>>>> >
>>>> > Do people feel this is this a good idea? If so, who's the right
>>>> > person/people to analyse our results and ensure we're using jtreg and
>>>> jcov
>>>> > correctly?
>>>> >
>>>> > Cheers,
>>>> > Martijn
>>>> >
>>>>
>>>
>>>
>>>
>>> --
>>> @theNeomatrix369 <http://twitter.com/theNeomatrix369>* | **Blog
>>> <http://neomatrix369.wordpress.com>** | *LJC Associate & LJC Advocate
>>> (@adoptopenjdk & @adoptajsr programs)
>>> *Meet-a-Project - *MutabilityDetector
>>> <https://github.com/MutabilityDetector>* | **Bitbucket
>>> <https://bitbucket.org/neomatrix369>* * | **Github
>>> <https://github.com/neomatrix369>* * | **LinkedIn
>>> <http://uk.linkedin.com/pub/mani-sarkar/71/a77/39b>*
>>> *Come to Devoxx UK 2015:* http://www.devoxx.co.uk/
>>>
>>> *Don't chase success, rather aim for "Excellence", and success will come
>>> chasing after you!*
>>>
>>
>>
>
>
> --
> @theNeomatrix369 <http://twitter.com/theNeomatrix369>* | **Blog
> <http://neomatrix369.wordpress.com>** | *LJC Associate & LJC Advocate
> (@adoptopenjdk & @adoptajsr programs)
> *Meet-a-Project - *MutabilityDetector
> <https://github.com/MutabilityDetector>* | **Bitbucket
> <https://bitbucket.org/neomatrix369>* * | **Github
> <https://github.com/neomatrix369>* * | **LinkedIn
> <http://uk.linkedin.com/pub/mani-sarkar/71/a77/39b>*
> *Come to Devoxx UK 2015:* http://www.devoxx.co.uk/
>
> *Don't chase success, rather aim for "Excellence", and success will come
> chasing after you!*
>
--
@theNeomatrix369 <http://twitter.com/theNeomatrix369>* | **Blog
<http://neomatrix369.wordpress.com>** | *LJC Associate & LJC Advocate
(@adoptopenjdk & @adoptajsr programs)
*Meet-a-Project - *MutabilityDetector
<https://github.com/MutabilityDetector>* | **Bitbucket
<https://bitbucket.org/neomatrix369>* * | **Github
<https://github.com/neomatrix369>* * | **LinkedIn
<http://uk.linkedin.com/pub/mani-sarkar/71/a77/39b>*
*Come to Devoxx UK 2015:* http://www.devoxx.co.uk/
*Don't chase success, rather aim for "Excellence", and success will come
chasing after you!*
More information about the adoption-discuss
mailing list