This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 129488

Summary: Using JUnit tests with comp apps
Product: soa Reporter: Jun Qian <jqian>
Component: JBI Test DriverAssignee: Venkat Chellasamy <vchellasamy>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Jun Qian 2008-03-07 00:47:59 UTC
I think incoming and outgoing BC's would make it quite cumbersome because it would need to deal with every BC component
we have.

Have you looked at the JBIMockTestingFramework?
http://wiki.open-esb.java.net/Wiki.jsp?page=JBIMockFramework

I imagine that it should be possible to integrate this with CASA somehow so that you could right-click on a
ServiceEngine SU in CASA and "generate unit test" which would build the test case and deploy a small SU which
communicates "direct" to the 'provides' port of the SU you want to unit test. I guess that UnitTest SU would need to be
deployed to a special BC or somewhere in Glassfish so that it can communicate to the NMR to invoke the SU to be unit tested.

I agree that it would be very useful so that it would be possible to unit test both SU's and SA's which do not include a
SOAP/HTTP endpoint.

Jason B


> There does not appear to be any way to write custom unit tests inside a composite application.  I think we need a
"built-in" way to write more controlled JUnit / in-container tests and should include a Test Packages folder in our
Composite App project for consistency with other NB projects for writing / running these tests.
>
> The use case is that I have a BPEL process that reads from and writes to File and I want to write unit tests to
automate the movement of files and assert the expected output.  The existing comp app testcase functionality seems to be
limited to SOAP / HTTP input and does not support a file binding.  I think we need a couple of things here:
>
> * build on the existing comp app functionality to allow simple input/output test cases for different bindings
> * a way to run standard unit tests for the user to test against the deployed comp app i.e. user can initially write
code to copy files around and read the output and assert it manually
>
> Regards,
> Louis