Friday, October 8, 2010

JUnit in JDeveloper 11g

JUnit is a simple, open source framework to write and run repeatable tests. It is supported in JDeveloper 11g as an extension. In this article, we'll show how to setup JUnit extension within JDeveloper 11g.

Where to Get JDeveloper 11g?

You can download JDeveloper 11g from here. For example, I've downloaded the following version for Windows:
How to Get JUnit Extension?

JUnit is an extension in JDeveloper as shown below.

However, it's not bundled in your downloaded JDeveloper 11g. So, you need to install it by the following steps:
  • Help -> Check for Updates-> install the Junit extensions
If your machine is sitting behind the firewall, you will get an "Unable to Connect" dialog. Then you need to setup proxy as well:

At "Step 3 of 5", select "JUnit Integration":
Libraries and ClassPath

To start using JUnit framework, you need to include JUnit library in your "Libraries and ClassPath." Follow the steps below:
  • Project Properties -> Libraries and Class -> Add Library...
  • Select "JUnit 4 Runtime"

Create New Tests
After adding the JUnit extension, you can use JDeveloper to create:
  • Test Case
  • Test Fixture
  • Test Suite

1 comment:

Tani said...

Its a good idea of providing downloads over blogs. This can help many learners to get it soon and easily.Thanks for providing it here and describing the steps also.

sap support packs