maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [maven-surefire] Tibor17 edited a comment on issue #234: (doc) add static modifier to signatures
Date Sun, 26 May 2019 19:24:27 GMT
Tibor17 edited a comment on issue #234: (doc) add static modifier to signatures
URL: https://github.com/apache/maven-surefire/pull/234#issuecomment-496024381
 
 
   @pzygielo 
   You are wrong. The `@Before` must not be static. Every test method must be isolated due
to a new object of the test is created every time the test method is called. The data across
test instances must not be shared. That's important detail in unit tests. That's why `setUp`
and `tearDown` methods are not static. The same works in JUnit4 and the same works in POJO.
IMO our implementation shares data which is a bug but another bug. The TestNG breaks this
paradighm and there is one instance. So if you like sharing data and having random behavior
then I would recommend using TestNG.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message