File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
more clarification on @beforeclass
Joined: Jan 01, 2013
Aug 09, 2013 12:32:35
i am new to
, i have been told that in @beforeclass we should write code to put data into databse can anybody tell why and how ?
Joined: May 26, 2003
Aug 09, 2013 15:08:38
@BeforeClass runs once (vs @Before which runs once per
.) More costly operations that can be shared are good to put there. In the case of integration tests, that is common data setup.
Remember to clean up the data in @AfterClass. I also like to have my setup call the teardown first in case the database isn't a good state.
How To Ask Questions The Smart Way
Blogging on Certs:
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
I agree. Here's the link:
subject: more clarification on @beforeclass
Security Exception: signature file
Loading Common Data for testing using Junit
wrong @BeforeClass behaviour
Deprecated method SetReturnValue() in 2.4
Testng is skipping @Before annotation from junit
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014