This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Wrong method's test order | ||
---|---|---|---|
Product: | java | Reporter: | Corisco |
Component: | JUnit | Assignee: | Yulia Novozhilova <ynov> |
Status: | CLOSED INVALID | ||
Severity: | normal | CC: | Corisco, jskrivanek |
Priority: | P1 | ||
Version: | 7.0 | ||
Hardware: | PC | ||
OS: | Windows 7 x64 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Corisco
2011-04-16 21:54:47 UTC
In fact, i discovered that the test are been made in a ramdon way. It's worse! I executed the same test on version 6.9.1 and it doesn't happen. It is a nature of JUnit that test cases are not executed in any particular order. Use @Before annotation or some other technique. http://junit.sourceforge.net/doc/faq/faq.htm#tests_2 I saw de link you've posted and everything seems right, but why i don't have this behavior in another versions of Netbeans. I am using the same project in nb 7 rc2 and nb 6.9.1. In nb 6.9.1, i donĀ“t need to use @Before or anything else. The methods are executed in the same order they apeear in the class test. I don't know if there are some changes in execution in NetBeans7.0. NetBeans 7.0 rc2 uses JUnit 4.8.2 while NetBeans 6.9.1 uses 4.5 version of JUnit. I suppose this may cause the difference. Anyway, this is not a bug, so closing. (In reply to comment #6) > NetBeans 7.0 rc2 uses JUnit 4.8.2 while NetBeans 6.9.1 uses 4.5 version of > JUnit. I suppose this may cause the difference. Anyway, this is not a bug, so > closing. It may not be a bug of nb 7 rc2 but you have to agree with that it is a piece of shit! They could implement a way to make a choice about what version of JUnit you want to use. I don't know but i think that i already saw this type of thing in older version of netbeans. Anyway, thanks! |