Mulan logo Mulan: A Java Library for Multi-Label Learning

Running Unit Tests

In this section you will find instructions on how to run unit tests

Running Unit Tests in Eclipse

Let's suppose that you have extended mulan with a new learner and that you have created a new test class extending the MultiLabelLearnerTestBase class. To make sure that your learner qualifies for mulan you have to run the tests and check that all the tests pass.

In this example we will assume that your new learner is MLkNN and that you have already implemented the test class and placed it in the correct package mulan.classifier.lazy as shown in Figure 1

tests image 1

In order to run the tests for this learner you right-click on and you select Run As -> JUnit Test
After that, the JUnit tab will show up, displaying the progress of the tests. The tests will take some time to be completed depending on the learner's complexity.


If your learner passes all the tests as shown in the example below then it is ready for mulan. Otherwise you have to fix failed tests. For details on the purpose of each test, please refer to the Javadoc API of

junit Logo