Home » Archived » Buckminster » Hudson/Buckminster: Separate Build and Test Job with Emma
| |
Re: Hudson/Buckminster: Separate Build and Test Job with Emma [message #631130 is a reply to message #631103] |
Wed, 06 October 2010 09:41 |
Marcel Hoetter Messages: 28 Registered: July 2009 |
Junior Member |
|
|
Hi Johannes,
separating a build in multiple smaller build and test jobs is a pretty common setup. See:
http://wiki.eclipse.org/Teneo/Teneo_Build_Setup#Understandin g_Buckminster
http://wiki.hudson-ci.org/display/HUDSON/Splitting+a+big+job +into+smaller+jobs
In our project we manage a hand full of subsystems. Each of them has to be unit/component tested to
certain coverage, then integrated and integration-tested.
I am talking about the unit/component tests here. Reusing the build-artifacts is straightforward in
a simple JUnit test approach:
-Create a p2 update site in the build job.
-materialize the plug-ins from the p2 site in the test job.
-build & run Junit tests
With emma, though, the to-be-tested plug-ins have to be available as projects in the buckminster
workspace. And, as far as i know, the sources have to be there, too. At least, in the Eclipse IDE,
one cannot select packages to generate coverage for if the sources are not present. And Emma wont
compile coverage for binary-jars in an OSGi environment (class files have to be instrumented in place).
My question is, does anyone know about a clean and simple approach to reuse the build artifacts of
the build job without the need for a rebuild in the Test Job?
Mybe by using the eclipse.import reader to import the project with sources into the workspace?
Thanks,
Marcel
Am 06.10.2010 10:20, schrieb Johannes Utzig:
> Hi Marcel,
>
> your setup sounds rather complicated to me.
> Why do you want to build first and then test instead of the other way around?
> If this is about integration tests and you want to test the final product, then code coverage is not
> quite as useful as a metric anyway as it would be for actual unit tests.
>
> Best regards,
> Johannes
>
|
|
| |
Re: Hudson/Buckminster: Separate Build and Test Job with Emma [message #631142 is a reply to message #631131] |
Wed, 06 October 2010 10:29 |
Marcel Hoetter Messages: 28 Registered: July 2009 |
Junior Member |
|
|
Hi, thanks for your answer.
The test-objects (that is, the to-be-tested plug-ins) have to be present (build) before the tests
can be build and run.
This can be done explicitly in the same or an upstream job; or it is done implicitly when the tests
themselves are build (which, of course, depend on the test-objects).
Cheers,
Marcel
Am 06.10.2010 11:48, schrieb Johannes Utzig:
> Am 06.10.2010 11:41, schrieb Marcel Hoetter:
>> Hi Johannes,
>>
>> separating a build in multiple smaller build and test jobs is a pretty
>> common setup. See:
>>
>> http://wiki.eclipse.org/Teneo/Teneo_Build_Setup#Understandin g_Buckminster
>> http://wiki.hudson-ci.org/display/HUDSON/Splitting+a+big+job +into+smaller+jobs
>>
>
> I agree that it makes sense to split a job in several subtasks, but I would say the other way is the
> easier setup since it gives you out of the box what you're looking for:
> 1. Job - run unit tests + code coverage without building anything
> 2. Job - Build the artifacts
> 3. Job (optionally) - use the artifacts of 2. to do integration testing (code coverage is probably
> less important here)
>
> Best regards,
> Johannes
|
|
|
Re: Hudson/Buckminster: Separate Build and Test Job with Emma [message #631152 is a reply to message #631142] |
Wed, 06 October 2010 11:05 |
Johannes Utzig Messages: 329 Registered: July 2009 |
Senior Member |
|
|
Hi Marcel,
Am 06.10.2010 12:29, schrieb Marcel Hoetter:
>
> The test-objects (that is, the to-be-tested plug-ins) have to be present
> (build) before the tests can be build and run.
> This can be done explicitly in the same or an upstream job; or it is
> done implicitly when the tests themselves are build (which, of course,
> depend on the test-objects).
I don't know, maybe I am simply misunderstand you, but:
to execute unit tests with buckminster you do not have to build the
actual plugins. Unit testing with Buckminster works exactly the same way
you unit test in your IDE. You start a unit test launch config just like
you do it in the IDE and that's it. That works for both 'plain' junit
tests and 'plug-in unit tests', the launch configuration decides.
That is the way you usually use unit tests with buckminster and it
makes it very easy to integrate code coverage. If however you still want
to test on binary bundles instead and compute code coverage for these
binaries, then I fear you will have to do the instrumentation by hand
(maybe somebody knows a better way).
Best regards,
Johannes
|
|
| |
Goto Forum:
Current Time: Fri Apr 26 19:16:59 GMT 2024
Powered by FUDForum. Page generated in 0.03910 seconds
|