Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-800

redirectTestOutputToFile is not taken into account in all cases with JUnit47 provider

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.10
    • 2.13
    • None
    • all

    Description

      With the following class:

      public class Test0 {
      
        public Test0(){
          System.out.println("Constructor");
        }
      
        @Test
        public void testT0() throws Exception {
          System.out.println("testT0");
        }
      
        @Test
        public void testT1() throws Exception {
          System.out.println("testT1");
        }
      
        @BeforeClass
        public static void setUpBeforeClass() throws Exception {
          System.out.println("setUpBeforeClass");
        }
      
        @AfterClass
        public static void tearDownAfterClass() throws Exception {
          System.out.println("tearDownAfterClass");
        }
      
        @Before
        public void setUp() throws Exception {
          System.out.println("setUp");
        }
      
        @After
        public void tearDown() throws Exception {
          System.out.println("tearDown");
        }
      }
      

      Some elements of the output are not redirected with JUNit47.

      Concurrency config is parallel='none', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
      setUpBeforeClass
      Constructor
      Constructor
      tearDownAfterClass
      Running Test0
      Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec
      

      While it's ok with with JUNit4:

      -------------------------------------------------------
       T E S T S
      -------------------------------------------------------
      Running Test0
      Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.09 sec
      

      Attachments

        1. 800.v1.patch
          8 kB
          Nicolas Liochon

        Issue Links

          Activity

            People

              krosenvold Kristian Rosenvold
              nkeywal Nicolas Liochon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: