5 Replies Latest reply on Oct 30, 2007 10:51 AM by dheerajsega

    Error TestNG  in seam application

    dheerajsega

      I have tried to ant test for my application but it returns me the error ..
      [testng] You need to specify at least one testng.xml or one class...

      I tried to specify one test class in testng.xml but even then it throws the same error.

      In my application i m trying to test the login page for which I have used authenticator class and authenticator action class.

      Can anyone help me solving this problem.


      Thanks,
      dheeraj[img][/img][/img][img][/img]

        • 1. Re: Error TestNG  in seam application

          The testNG file name should end with *Test i.e. RegistrationServiceTest.xml

          • 2. Re: Error TestNG  in seam application
            taskin.tas

            Hi,
            In your ant file you have to specify the path of your testng.xml file in the testng tag.

            There must be a similiar code fragment in your ant file as below in order to run TestNG based tests.
            Test mechanism needs this declaration to find testng.xml.
            You have to fill the <xmlfileset dir= property correctly.

            <testng outputdir="output_directory_of_test_results">
             .....
             .....
             ......
             <xmlfileset dir="*****PATH OF testng.xml***" includes="testng.xml"/>
            </testng>


            You can find an example of testng.xml below.
            <!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
            <suite name="Tester" verbose="2" parallel="false">
             <test name="Test Intact">
             <classes>
             <class name="TestIntact"/>
             </classes>
             </test>
            </suite>
            


            TestIntact is the class name which you write your tests.

            Best Regards.

            • 3. Re: Error TestNG  in seam application
              dheerajsega


              hi,
              I was succefully able to test it but..there starts another problem.
              It returns me the error at the end ...


              [testng] [WARNING]: No test suite found.Nothing to run.



              Can anyone explain what exactly it means? and what should be done to solve this problem?

              thanks,
              dheeraj

              • 4. Re: Error TestNG  in seam application
                thejavafreak

                You must create a test suite in your *Test.xml

                Go read the testng doc here: http://testng.org/doc/documentation-main.html

                One example is as such:

                <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
                
                <suite name="Suite1" verbose="1" >
                 <test name="Regression1" >
                 <packages>
                 <package name="test.sample" />
                 </packages>
                 </test>
                </suite>
                


                • 5. Re: Error TestNG  in seam application
                  dheerajsega

                  Thanks,
                  it worked...
                  I used the suite earlier but it was in right way....
                  so i modified it and it worked....


                  IS there any example(not a simple one as in TESTNG.org documentation) that shows how the results of a complex example something like real world application test results look like......