I have a class that I made for some unit tests. Everything was going swimmingly until I changed the name of the class to match the class that I was testing suffixed with TestCase. All of a sudden every time I tried to run the test case in Eclipse I get a "There is no input configuration for this type".
Someone then suggested that there is a 30 character length limit on the name of the class. I had a look at the class name and it was 32 characters long. I then deleted two characters off the end and tried again and everything worked. I put them back and it stopped working.
Is there an explanation for this?
EDIT:
In response to some of the comments. It is Galileo, using Windows XP, JUnit 4.4.
EDIT 2:
Sorry guys. I guess I was wrong. The pattern seems to be that JUnit/Eclipse does not like my class name being TestCase. As soon as I take the TestCase part away it works. It works with a massively long string, short strings and everything in between. The name can be anything like ABCTestCase it just CANNOT be for some reason TestCase.
By default I believe the JUnit runners are set to look for *Test files, so it will filter out TestCase. People often use *TestCase as a base class without any tests of its own. Not sure if that's what you're running into. If so, it's configurable in the runner.
Turns out that it was because I was extending TestCase which makes the JUnit runner think it is still version 3. Even if you tell it to use version 4.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With