Hi Egor,
well, there is definitely room for improvement, I recently modified
jersey poms to include cobertura do to code coverage and we can see that
not everything is covered as we would like.
But! For example, jersey-core does not have much unit tests in itself
included, but you can find jersey-core related tests in jersey-tests module.
If you want to see test coverage for jersey, you can test it by yourself
or wait for a week or so, I plan to publish them on project page or
somewhere visible.
"script" you can use to generate test coverage report with cobertura
(don't execute it unless you know what you are doing):
svn co svn cp
https://svn.java.net/svn/jersey~svn/trunk/jersey
cd jersey
rm -rf ./osgi # we don't care about this, its just duplicate of jersey-tests
mvn clean install -Dmaven.test.skip=true -Dcobertura
find . -d -name src | sed 's/src/pom.xml/' | while read X ; do mvn clean
cobertura:cobertura -Dcobertura -DforkMode=never
-Dnet.sourceforge.cobertura.datafile=./cobertura.ser -f "$X" ; done
rm ../cobertura*
rm ./cobertura_final.ser
mkdir ../sources
find . | grep src/main/java$ | while read X ; do cp -r "$X"/*
../sources/ ; done
I=1; find . | grep cobertura.ser$ | while read X ; do cp "$X"
../cobertura$I.ser ; I=$(($I+1)) ; done;
cobertura-merge.sh --datafile ./cobertura_final.ser ../cobertura*
rm -rf ../report
cobertura-report.sh --datafile ./cobertura_final.ser --destination
../report --format html ../sources/
Best think you should do now is:
- create new tests which will improve test coverage
- create new issue on issue tracker, add your diff as a patch to it
Others might add something; nevertheless, we are looking forward to
hearing for you again and it would be really goof if you'll be able to
contribute!
Thanks in advance,
Pavel
On 02/17/2011 11:52 AM, egor_at_technoparkcorp.com wrote:
> I'm a using Jersey for the last year in a few projects of my company.
> The framework is great, but according to what we see in its source code
> repository there is a lack of unit tests for key modules, like
> jersey-api, jersey-core, etc.
>
> I'm willing to contribute to the project and create missing unit tests,
> which will increase entire project coverage. I already filled my SCA.
> Please help me to do this. Thanks!
>
>