Menu

support of more than one .jxu file

2001-08-21
2001-08-23
  • Michael Merg

    Michael Merg - 2001-08-21

    Hi all,

    I am very new in using JXUnit and I think it is a nice add-on to JUnit.
    But I have a question regarding usability. Is it possible to have more than one .jxu files in the same directory to support different testcases? How is it possible to structure my testcases?

    Thanx for your help.

     
    • Thomas.P.Varghese

      Hello Michael

      Each Directory can contain only one test.jxu files.But you  can Structure the testCase very well in diffrent directories some thing like this,

      -------------------------------------------
        RootTestDirectory                       
               |
               |---TestDirectory1--
               |                    |--test.jxu
               |
               |---TestDirectory2--
                                    |--test.jxu

      -----------------------------------------   
      On running JXUnit from the rootTestDirectory it will Scan through all the subDirectories for test.jxu files and excecute the testCases.

         If u have multiple TestData for the same testCase u can specify that it in the context file(test.jxuc)

      -----------------------------------------  
      RootTestDirectory
               |
               |---test.jxu
               |---test.jxuc
               |
               |---Tests
                     |---TestData1--
                         |              |--data.txt
                         |
                         |---TestData2--
                                        |--data.txt

      ------------------------------------------
                         
         The sample test.jxuc file for the above senario can be like this

         <jxuc jxuSchema="classpath:///net/sourceforge/jxunit/jxu.qiml">
          <directoryScan dir="tests">
              <includeFiles regexp=".txt$"/>
          </directoryScan>
        </jxuc>

        for test.jxu

      <jxu>
          <absolute name="testfileDir" dir="tests" value="absDataFileName" indirect="true" />
          <subst name="testName" regexp="$" value="/data.txt"/>
          <main class=" ">
              <arg  value=""/>
              <arg  value=""/>
          </main>
      </jxu>
        You can change the testCases as Your Requirement.
      Hope this may help u to get Start :-)
      Thanks

       

Log in to post a comment.