Xi 张熹
Xi 张熹

Reputation: 11071

Run junit test cases from multiple class files (Robotium)

I am actually using Robotium testing framework for Android, but I believe it's based on JUnit. I am new to JUnit as well as TDD.

I want to create different test class files based on features, like "LoginTest.java", "EditProfileTest.java", and each file contains some test cases for that feature.

The question is that, when I run it within Eclipse by clicking F11, only one file will run. I don't want to put all test cases in a single file. Is there a way to run multiple files at once? Or other ways to solve this problem.

Upvotes: 3

Views: 1896

Answers (1)

Brian Yarger
Brian Yarger

Reputation: 1975

You can either create a JUnit Test Suite, or if you just want to run all tests in all the classes in a particular java package you can do that in Eclipse by right clicking on the package, choosing Run As, and Android JUnit Test.

Upvotes: 4

Related Questions