You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by S G <sg...@gmail.com> on 2015/02/25 00:15:44 UTC

Ant output of solr tests

Hi,

I want to print some information in a Solr test.
But I am unable to get it to print on console or file.

I have tried System.out.println and log.error but the output is not coming
anywhere.
log4j.properties also looks ok to me.

Command run:
    ant test -Dtestcase=CloudSolrClientTest

Can someone help me point in the right direction?

Thanks
Sachin

Re: Ant output of solr tests

Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
Uwe's answer really nails it (please do use ant test-help -- it's for
you after all!) but wanted to add a note about this question:

> I think the output is logged to a file somewhere, but I do not know where.

The raw output of a JVM process running tests is logged for internal
purposes only, you should't look at it or need it -- it doesn't
contain any information about which test dumped what output, for
example (this demarcation is kept separately). If you wish to see all
test and all of the sysouts they've made then "ant test-help" gives
you all the information about the report files:

     [help] # Output test files and reports.
     [help] ${tests-output}/tests-report.txt    - full ASCII tests report
     [help] ${tests-output}/tests-failures.txt  - failures only (if any)
     [help] ${tests-output}/tests-report-*      - HTML5 report with results
     [help] ${tests-output}/junit4-*.suites     - per-JVM executed suites
     [help]                                       (important if job stealing).

Dawid

On Wed, Feb 25, 2015 at 1:50 AM, Shawn Heisey <ap...@elyograg.org> wrote:
> On 2/24/2015 4:15 PM, S G wrote:
>> Hi,
>>
>> I want to print some information in a Solr test.
>> But I am unable to get it to print on console or file.
>>
>> I have tried System.out.println and log.error but the output is not
>> coming anywhere.
>> log4j.properties also looks ok to me.
>>
>> Command run:
>>     ant test -Dtestcase=CloudSolrClientTest
>>
>> Can someone help me point in the right direction?
>
> If the test passes, the output will not normally be seen.  I think the
> output is logged to a file somewhere, but I do not know where.  If you
> want to see the output in your console, just force the test to fail.
> That should show you everything.
>
> In the org.junit.Assert class, there is a fail() method that you should
> be able to temporarily insert at the end of your test so that all test
> output will be shown.
>
> Thanks,
> Shawn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Ant output of solr tests

Posted by Shawn Heisey <ap...@elyograg.org>.
On 2/24/2015 4:15 PM, S G wrote:
> Hi,
>
> I want to print some information in a Solr test.
> But I am unable to get it to print on console or file.
>
> I have tried System.out.println and log.error but the output is not
> coming anywhere.
> log4j.properties also looks ok to me.
>
> Command run:
>     ant test -Dtestcase=CloudSolrClientTest
>
> Can someone help me point in the right direction?

If the test passes, the output will not normally be seen.  I think the
output is logged to a file somewhere, but I do not know where.  If you
want to see the output in your console, just force the test to fail. 
That should show you everything.

In the org.junit.Assert class, there is a fail() method that you should
be able to temporarily insert at the end of your test so that all test
output will be shown.

Thanks,
Shawn


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


RE: Ant output of solr tests

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,

 

„ant test-help“ shows you everything you need:

 

[help] # Include additional information like what is printed to

[help] # sysout/syserr, even if the test passes.

[help] # Enabled automatically when running for a single test case.

[help] ant -Dtests.showSuccess=true test

 

Uwe

 

-----

Uwe Schindler

H.-H.-Meier-Allee 63, D-28213 Bremen

http://www.thetaphi.de <http://www.thetaphi.de/> 

eMail: uwe@thetaphi.de

 

From: S G [mailto:sg.online.email@gmail.com] 
Sent: Wednesday, February 25, 2015 12:16 AM
To: dev@lucene.apache.org
Subject: Ant output of solr tests

 

Hi,

 

I want to print some information in a Solr test.

But I am unable to get it to print on console or file.

 

I have tried System.out.println and log.error but the output is not coming anywhere.

log4j.properties also looks ok to me.

 

Command run:

    ant test -Dtestcase=CloudSolrClientTest

 

Can someone help me point in the right direction?

 

Thanks

Sachin