maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manoj Palki (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (SUREFIRE-1230) Issue with config parameter 'redirectTestOutputToFile' when running cucumber parallel tests
Date Tue, 16 Feb 2016 01:05:18 GMT

    [ https://issues.apache.org/jira/browse/SUREFIRE-1230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15147956#comment-15147956
] 

Manoj Palki edited comment on SUREFIRE-1230 at 2/16/16 1:04 AM:
----------------------------------------------------------------

Use the attached project (taken from https://github.com/cucumber/cucumber-java-skeleton) 
for reproducing the issue . I have modifed the project slightly to print more lines during
test run. 

1. Set the surefire config in the pom to 
<forkCount>2</forkCount>
<reuseForks>false</reuseForks>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
and run mvn test.  The test output is redirected to an output file under target/surefire-reports.


2. Then change the config to 
<threadCount>2</threadCount>
<parallel>classes</parallel>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
and run mvn test. You will see that the following lines are printed to stdout and not to the
test output file 
Feature: Belly
Second step
Third step


was (Author: mpalki):
Use the attached project (taken from https://github.com/cucumber/cucumber-java-skeleton) 
for reproducing the issue . 

1. Set the surefire config in the pom to 
<forkCount>2</forkCount>
<reuseForks>false</reuseForks>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
and run mvn test.  The test output is redirected to an output file under target/surefire-reports.


2. Then change the config to 
<threadCount>2</threadCount>
<parallel>classes</parallel>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
and run mvn test. You will see that the following lines are printed to stdout and not to the
test output file 
Feature: Belly
Second step
Third step

> Issue with config parameter 'redirectTestOutputToFile' when running cucumber parallel
tests
> -------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1230
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1230
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.18.1
>            Reporter: Manoj Palki
>         Attachments: cucumber_java_skeleton.tar.gz
>
>
> The config parameter redirectTestOutputToFile behaves differently based on how parallelism
is configured in the surefire plugin. 
> If the config is 
> <forkCount>2</forkCount>
> <reuseForks>false</reuseForks>
> <redirectTestOutputToFile>true</redirectTestOutputToFile>
> then the output from the tests is directed correctly to 'xxxtest-output.txt' file. 
> However, if the config is
> <threadCount>2</threadCount>
> <parallel>classes</parallel>
> <redirectTestOutputToFile>true</redirectTestOutputToFile>
> then the output from the tests is partially directed to the 'xxxtest-output.txt file
and partially to stdout. 
> Also the output files have different names in two cases. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message