-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On Thu, Jun 10, 2010 at 09:53, Misha Koshelev <[email protected]> wrote: > On Wed, 2010-06-09 at 22:31 -0600, Jason Porter wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: RIPEMD160 >> >> On Wed, Jun 9, 2010 at 22:09, Misha Koshelev <[email protected]> wrote: >> > Dear All: >> > >> > Thank you for a great product! >> > >> > Just wondering... I have some code (disabling certain logging output) >> > that I'd like to be run before _all_ tests... >> > >> > I do not see any such examples for JUnit/Groovy testing in the samples >> > directory... is there a good/correct place to put such code? >> >> If you're using a more recent version of JUnit / TestNG this would go >> in a @BeforeSuite method. >> >> > Thank you! >> > >> > Misha >> > >> > p.s. I am using the 0.9 preview 3 version. >> > >> > >> > --------------------------------------------------------------------- >> > To unsubscribe from this list, please visit: >> > >> > http://xircles.codehaus.org/manage_email >> > >> > >> > >> >> >> >> - -- >> Jason Porter >> http://lightguard-jp.blogspot.com >> http://twitter.com/lightguardjp >> >> Software Engineer >> Open Source Advocate >> >> PGP key id: 926CCFF5 >> PGP key available at: keyserver.net, pgp.mit.edu >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG/MacGPG2 v2.0.12 (Darwin) >> >> iEYEAREDAAYFAkwQao4ACgkQEEbDm5Jsz/VALACgwG9LPHzt5sNIE3LdxmW0dKBg >> qHkAoKoa2BNiRNx4HtEtcpmrKx7u10nm >> =lJjq >> -----END PGP SIGNATURE----- >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> > > Thank you. I was not able to find a @BeforeSuite method in JUnit. > > However, I have followed instructions here: > http://stackoverflow.com/questions/82949/before-and-after-suite-execution-hook-in-junit-4x > > and created a Test class from which my other tests derive: > > import org.junit.BeforeClass > import static org.junit.Assert.* > > /** > * Test class > * > * @author Misha Koshelev > */ > class Test { > /** > * Events that occur before all tests > */ > �...@beforeclass public static void beforeClass() { > println "test" > } > } > > I would be interested in: > (a) actually having a suite or > (b) using TestNG
TestNG I know has the @BeforeSuite annotation > but would be great to have a detailed example with gradle as for: > (a) I don't understand how to have gradle run the _suite_ rather than > unit tests If you define a suite it should run it (I'm not a JUnit guru though > (b) I didn't see any groovy examples for TestNG at all (?) There's nothing special here. Groovy supports annotations so it's really just the same as Java. > Thank you! > > Misha > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > - -- Jason Porter http://lightguard-jp.blogspot.com http://twitter.com/lightguardjp Software Engineer Open Source Advocate PGP key id: 926CCFF5 PGP key available at: keyserver.net, pgp.mit.edu -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) iEYEAREIAAYFAkwRLcUACgkQEEbDm5Jsz/XD6gCgzZ7biup7gJu0hhlvnpU/djaM V+gAn03HYvpCT5vfYNwpj5A8YP4ZzhNH =J2G/ -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
