Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9189265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:12:06+00:00 2026-06-17T20:12:06+00:00

My TestSuite is running during the build using ant target. I would like, in

  • 0

My TestSuite is running during the build using ant target.
I would like, in my suite, to access the TestResult and do some actions if the tests succeed or not.
Is there a way to retrieve the object in the tear down method?
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T20:12:07+00:00Added an answer on June 17, 2026 at 8:12 pm

    With jUnit3 I’d try subclassing Test and overwrite the run method. That would provide me with access to the TestResult instance. Something like this:

    public class MyTest extends Test {
      @Overwrite
      public void run(TestResult result) {
        super.run(result);
        doSomethingWithResults(result);
      }
    
      // ...
    }
    

    With jUnit4 I’d look into implementing a TestRunner (based on the standard runner). It sounds difficult but actually isn’t. Subclass the default one and simply add the @RunWith annotation to use your own runner (that can do something with the results)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ant task set up like so: <target name=unit-test description=unit tests depends=compile-tests>
I am having a problem in running an aggregated test suite of selenium tests
I'm refactoring a test suite built on Test::Class , and would like to take
I am running Junit tests from Maven. The ant script has <junit failureproperty=failproperty errorproperty=errorproperty>
I'm running phpunit tests with zendframework using netbeans but the reports are not being
I'm remotely running a JUnit test suite with Ant from my local machine to
I am building an automation test suite which is running on multiple machines, all
When running an applications test suite I want to promote all Perl compile and
I have a test suite to perform smoke tests. I have all my script
I have a test suite to perform smoke tests. I have all my script

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.