junit and ant issue. Cannot start test -


When I'm running a junior test from the ant, I always get:

  D: \ Metrics & gt; Ant test Buildfile: build.xml init: compile: test: [junit] running jmt.test.TestCodeBase [junit] Testuite: jmt.test.TestCodeBase [Junior] Test run: 1, failures: 1, errors: 0, time pass It has been: 0,046 seconds [Junior] Test runs: 1, failures: 1, Errors: 0, time passed: 0,046 seconds [Junior] [Junior] Test case: Warning (Junior.Fr framework TestSite $ 1): FAILED [Jr] No exam found in Jmt.test. Testcodebase [janit] janit.framework.Security field error: jmt No test was found in the test. Test codebase [junior] [junior] [junior] test jmt.test.TestCodeBase FAILED  

This is an ant file:

   & Lt; Pathelement location = "library / junior 3.8.1 / juniti.jar" /> & Lt; / Classpath & gt; & Lt; Formatter type = "abbreviated" usefile = "false" /> & Lt; Formatter type = "xml" /> & Lt; Batchtest Tudor = "Target / Test-result" & gt; & Lt; Fileset dir = "target / classes" includes = "** / TestCodeBase.class" /> & Lt; / Batchtest & gt; & Lt; / JUnit & gt; & Lt; / Target & gt;  

But when I run the test manually, the Johnnit Test works:

  D: Metrics & gt; CD Target D: \ Metrics \ Target & gt; CD class D: \ Metrike \ target \ classes \ gt; Jmt.test.TestCodeBase fatsource.jar eclapsed: 22 9 7 ms at all: 22 9 7 ms include 3073 class and 3700 referenced classes, 35 9 68 referenced methods, 22351 reference area includes memory usage: 21326 KB Post GC-Memory usage : 19506 KB contains 3073 classes and 3700 referenced classes, 35968 reference methods, 22351 referenced fields, can anyone tell me what I am doing is wrong? I was trying to fix it all day, but I could not find the solution. 

1) What is the Jmt.test.TestCodeBase TestCase extension (junit.framework.TestCase)?

If not, it will need to be picked up by the junior ant function.

2) Is the class written as a genetic testes, or is it simply called the main method? For an example of writing simple tests in Junit3 style see Junit4, just add @Test Above Methods.

3) Do the methods of examination in Junit 3 style (starts with each method test) or the old style (in each method there is a @ test above it)?

If you go June 3, you will be better off. If Junior 4, you need to include Junior 4 testing library in its ant Campus, instead Junit 3.8.1.


Comments