junit munit setup in anypoint studio

6
Junit & Munit Setup in Anypoint Studio

Upload: sunil-komarapu

Post on 22-Jan-2017

226 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Junit munit setup in anypoint studio

Junit & Munit Setup in Anypoint Studio

Page 2: Junit munit setup in anypoint studio

JUnit Plugin Setup in Anypoint Studio

There is no specific plugin required to set up Junit.

We can directly use java code to write functional test cases.

While creating the unit test cases for java classes in the project, we need to mock the interfaces instead of connecting to the real systems.

To mock the end systems, need to import the jar by downloading mockito-all-1.8.5.jar or add a dependency in maven

<dependency><groupId>org.mockito</groupId><artifactId>mockito-all</artifactId><version>1.8.5</version>

</dependency>

Page 3: Junit munit setup in anypoint studio

MUnit Plugin Setup in Anypoint Studio

The steps to be followed to install MUnit plugin in Anypoint Studio

1. Verify that your version of Studio is 5.2.0 or above.

2. Add the MUnit update site

3. Go to Help → Install New Software.

4. Studio displays the Available Software window. In the Work with: field, paste the MUnit update site: http://studio.mulesoft.org/r4/munit

Page 4: Junit munit setup in anypoint studio

5. Select the Plugin to download and click on Next.

Page 5: Junit munit setup in anypoint studio

7. Click Next, then complete the installation wizard. MUnit automatically adds a new folder, src/test/munit, to your project as below

Page 6: Junit munit setup in anypoint studio

Thank You