Loading ...
Sorry, an error occurred while loading the content.

AW: [junit] Making successfull test more explicit....

Expand Messages
  • Ilja Preu?
    Redefine the name() method of TestCase like for example: public String name() { return super.name() + : + fileName; } ciao, Ilja
    Message 1 of 1 , Mar 28, 2001
    View Source
    • 0 Attachment
      Redefine the name() method of TestCase like for example:

      public String name() {
      return super.name() + ": " + fileName;
      }

      ciao, Ilja

      > -----Ursprungliche Nachricht-----
      > Von: tsmets@... [mailto:tsmets@...]
      > Gesendet: Donnerstag, 29. Marz 2001 08:57
      > An: junit@yahoogroups.com
      > Betreff: [junit] Making successfull test more explicit....
      >
      >
      >
      >
      > My current test case relying on a Array of file names defines
      > on an interfaces. This currently means the Test suite is fine
      > but there isn't much feed back to know the difference
      > between, say the "testCreatingRuleFromFile" run on the 1st
      > file & on the 20th.... unless it fails.
      >
      > Do I have a possibility to Label a Test other then with the
      > method name ?
      >
      > Thomas,
      >
      > ======================
      >
      > <pre>
      > /**
      > * This <code>Test</code> creation creates first the test
      > * & then sets the file before adding the test to the
      > * <code>suite</code>.
      > */
      > public static Test suite()
      > {
      > TestSuite suite = new TestSuite();
      >
      > TestRule2 TR_AR = null;
      > TestRule2 TR_CR = null;
      > TestRule2 TR_FR = null;
      > TestRule2 TR_RV = null;
      >
      > for (int i = 0; i < RuleFiles.length; i++)
      > {
      > TR_CR= new TestRule2("testCreatingRuleFromFile");
      > TR_CR.setFileName(RuleFiles[i], null);
      >
      > TR_FR = new TestRule2("testCreateFileReader");
      > TR_FR.setFileName(RuleFiles[i], null);
      >
      > TR_RV = new TestRule2("testValidateRule");
      > TR_RV.setFileName(RuleFiles[i], null);
      >
      > TR_AR= new TestRule2("testAccessCreatedRule");
      > TR_AR.setFileName(RuleFiles[i], null);
      >
      > suite.addTest(TR_AR);
      > suite.addTest(TR_CR);
      > suite.addTest(TR_FR);
      > suite.addTest(TR_RV);
      > }
      >
      > return suite;
      > }
      > </pre>
      >
      >
      >
      > ------------------------ Yahoo! Groups Sponsor
      > ---------------------~-~>
      > Do you have 128-bit SSL encryption server security?
      > Get VeriSign's FREE Guide, "Securing Your
      > Web Site for Business." Get it now!
      > http://us.click.yahoo.com/EVNB7A/c.WCAA/bT0EAA/N0AVlB/TM
      > --------------------------------------------------------------
      > -------_->
      >
      > To unsubscribe from this group, send an email to:
      > junit-unsubscribe@yahoogroups.com
      >
      >
      > Your use of Yahoo! Groups is subject to
      > http://docs.yahoo.com/info/terms/
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.