Does JUnit have a character limit of 30 characters per name of your class?

I have a class that I made for some unit tests. Everything went smoothly until I changed the class name to match the class I tested with TestCase certification. Suddenly, every time I tried to run a test case in Eclipse, I get "There is no such input configuration for this type."

Then someone suggested that there is a length limit of 30 characters for the class name. I looked at the class name and it was 32 characters. Then I deleted two characters from the end and tried again and it worked. I put them back and he stopped working.

Is there any explanation for this?

EDIT:

In response to some comments. This is Galileo using Windows XP, JUnit 4.4.

EDIT 2:

Sorry guys. I guess I was wrong. It seems that the JUnit / Eclipse template does not like it when my class name is TestCase. As soon as I remove the TestCase part, it works. It works with a massive long string, short strings and everything in between. The name may be something like ABCTestCase, it simply CANNOT be for some reason TestCase.

+3
source share
4 answers

It turns out that this is due to the fact that I was expanding TestCase, which makes the JUnit runner think that this is still version 3. Even if you tell him to use version 4.

+1
source

, JUnit * , TestCase. * TestCase - . , , . , .

+1

, - , :

  • , .
  • - .
    , :

alt text

QuickTip: JUnit:

Eclipse IDE, , eclipse.

. → →


( , , ) (org.eclipse.jdt.core.tests.performance).

, Windows:

  • 32767 CreateProcess. UNICODE_STRING. CreateProcess - , , Win32, , . CreateProcess , , , .
  • 8192 CMD.EXE.
  • 2048 - INTERNET_MAX_URL_LENGTH ( 2048), ShellExecute/Ex. ( Windows 95, MAX_PATH.)
  • 32767 ( )

, javac command JUnit Java, , ( )

0

"" → ""... . "-".

0
source

Source: https://habr.com/ru/post/1718171/


All Articles