cancel
Showing results for 
Search instead for 
Did you mean: 

JUNIT and DCs

Former Member
0 Kudos

I would like to test my classes of my Development components with JUnit. Unfortunately I cant import the junit.jar in my DC project. So is there any other possibility to use JUnit with DCs?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

We were able to import external jars by doing the following.

Create a new java DC project.

Expand all the contents of the jar file (winzip) into a folder.

In DC MetaData, set add this folder to packages.

Create a public part.

Select 'Folder Tree' and bind it to the folder that was expanded.

This essentially recreates the jar file for use. Reference it with your other DCs. In the case of the jUnit jar, set it to be a compilation only public part ( not assembly ) and it won't get packaged.

Former Member
0 Kudos

> I would like to test my classes of my Development

> components with JUnit. Unfortunately I cant import

> the junit.jar in my DC project.

I have the same question. Although I can manage to add a junit jar file on the Java perspective, "Package Explorer" view and use "organize imports" as expected, when building the DC (on view "Java DC explorer") the compiler cannot find the required lib I just added.

Am I stupid or is the program?

Regards

Klaus

Former Member
0 Kudos

As far as I know it is not possible to use external jars in DCs. At least at the moment. I think SAP is planning this for the future.

I will try to import the java source code of junit to see if this works.