From jbosstools-commits at lists.jboss.org Thu Oct 2 12:22:13 2008 Content-Type: multipart/mixed; boundary="===============3562866770519435315==" MIME-Version: 1.0 From: jbosstools-commits at lists.jboss.org To: jbosstools-commits at lists.jboss.org Subject: [jbosstools-commits] JBoss Tools SVN: r10633 - trunk/seam/docs/reference/en/modules. Date: Thu, 02 Oct 2008 12:22:12 -0400 Message-ID: --===============3562866770519435315== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: ochikvina Date: 2008-10-02 12:22:12 -0400 (Thu, 02 Oct 2008) New Revision: 10633 Modified: trunk/seam/docs/reference/en/modules/testng.xml Log: https://jira.jboss.org/jira/browse/JBDS-430 - making a conclusion for the S= eam tools guide. Modified: trunk/seam/docs/reference/en/modules/testng.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/seam/docs/reference/en/modules/testng.xml 2008-10-02 15:30:48 UTC= (rev 10632) +++ trunk/seam/docs/reference/en/modules/testng.xml 2008-10-02 16:22:12 UTC= (rev 10633) @@ -6,173 +6,254 @@ JBoss Developer Studio JBDS testNG - + Using TestNG project With the help this chapter you will get to know with TestNG.
- What is TestNG? - TestNG ("Testing, the Next Generat= ion") is a Java unit testing framework that aims to overcome many limi= tations of JUnit. = - TestNG introduces some new functionalities that make it more p= owerful and easier to use, such as: - - JDK 5 Annotations (JDK 1.4 is also supported with Ja= vaDoc annotations) - Flexible test configuration - Support for data-driven testing (with @DataProvid= er) - Support for parameters - Allows distribution of tests on slave machines - Powerful execution model (no more TestSuite) - Supported by a variety of tools and plug-ins (Ecl= ipse, IDEA, Maven, etc...) - Embeds BeanShell for further flexibility - Default JDK functions for runtime and logging (no= dependencies) - Dependent methods for application server testing<= /para> - - = - More information can be found on home page: www.testng.org -
+ What is TestNG? + TestNG ("Testing, the Next Generat= ion") is a + Java unit testing framework that aims to overcome many limitat= ions of JUnit. TestNG + introduces some new functionalities that make it more powerful= and easier to use, such + as: + + + JDK 5 Annotations (JDK 1.4 is also supported with Ja= vaDoc annotations) + + + Flexible test configuration + + + Support for data-driven testing (with @DataProvider)= + + + Support for parameters + + + Allows distribution of tests on slave machines + + + Powerful execution model (no more TestSuite) + + + Supported by a variety of tools and plug-ins (Eclips= e, IDEA, Maven, + etc...) + + + Embeds BeanShell for further flexibility + + + Default JDK functions for runtime and logging (no de= pendencies) + + + Dependent methods for application server testing + + + + More information can be found on home page: www.testng.org +
Other relevant resources on the topic - Next-Generation Testing with TestNG (An Interview with Cedric Beust) - TestNG: The next generation of unit testing - Test Categorization Techniques with TestNG - TestNG makes Java unit testing a breeze - In pursuit of code quality: JUnit 4 vs. TestNG + + Next-Generation Testing + with TestNG (An Interview with Cedric Beust) + + + TestNG: + The next generation of unit testing + + + Test + Categorization Techniques with TestNG + + + TestNG makes + Java unit testing a breeze + + + In + pursuit of code quality: JUnit 4 vs. TestNG +
How to use the generated Seam-test project to run Seam test= s? - = + - Create a new Seam Web Project with EAR deploym= ent using the New Seam Project wizard. + + Create a new Seam Web Project with EAR deployment us= ing the New Seam Project + wizard. + - = + - After a project is created you will have the g= enerated Seam-test project that is setup to run TestNG directly against the= proper libraries and server runtime libraries. + + After a project is created you will have the generat= ed Seam-test project that + is setup to run TestNG directly against the proper lib= raries and server runtime + libraries. + - = +
Seam-test Project - = +
- = + - Add Seam Action to your project via = File > New > Seam Action. + + Add Seam Action to your project via File > New > Seam + Action. + - = +
Seam Action Creation - = +
- = + - Fill out the wizard fields. New Seam Action wi= zard will create resources and place them in the appropriate folders depend= ent on EAR project structure. + + Fill out the wizard fields. New Seam Action wizard w= ill create resources and + place them in the appropriate folders dependent on EAR= project structure. + - = +
New Seam Action Wizard - = +
- = + - When Action is created you will see = actionPage.xhtml in Package Explorer view. ActionBean.= java will be automatically opened in Java Editor. + + When Action is created you will see action= Page.xhtml in + Package Explorer view. ActionBean.java will be + automatically opened in Java Editor. + - = +
Created Action - = +
- = - = + + - Select ActionLocalTest.xml in Seam-test project and run the test with right click Run As > TestNG Suite. + + Select ActionLocalTest.xml in S= eam-test project and run + the test with right click Run As >= TestNG + Suite. + - = +
Running TestNG - = +
- = + The test process will start and its output will be written i= n Console View. - = +
Test is Finished - = +
- = - = + + - After running TestNG you will have the test re= sults in test-output folder in Se= am-test project (press F5 to refresh the Package Explorer view). = - Open index.html file with Web Browser= or simply use the TestNG view. + + After running TestNG you will have the test results = in + test-output + folder in Seam-test project (press F5 to r= efresh the Package + Explorer view). Open index.html f= ile with Web Browser or + simply use the TestNG view. + - = + The below view shows a successful run of the test. - = +
Viewing the Test Results - = +
- = - = + + You can see the test results in Web Browser. - = +
Test Results in Browser - = +
- = - After clicking on ActionLocal Tests link you will see the Results for ActionLocal Tests. - = + + After clicking on + ActionLocal Tests + link you will see the Results for ActionLocal Test= s. +
Test Information - = +
- = - Select a result on the left-hand pane and its details will b= e displayed on the right-hand one. - = + + Select a result on the left-hand pane and its details will b= e displayed on the + right-hand one. +
ActionLocal Test Details - = +
- = - = + + Thus with Seam tooling you can easily take advantage of Test= NG framework. As you can + see, it generates its own TestNG project as a separate module = within which you can + easily monitor the tests execution and their output.
- + + In conclusion, the main goal of this document is to get you know= with a full featureset + that JBoss Tools provides to support Seam dev= elopment. Thus if you have + some questions, comments or suggestions on the topic, please fell = free to ask in the JBoss + Tools Forum. You can also influence on how you want to= see JBoss Tools docs in + future leaving your vote on our page here. + = + A set of movies on Seam tooling is available here. + --===============3562866770519435315==--