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 7725283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:53:56+00:00 2026-06-01T04:53:56+00:00

Im trying to log my tests output to a file as well as running

  • 0

Im trying to log my tests output to a file as well as running them concurrently.
For this Im trying to use the multiprocess plugin and the xunit plugin.

Im aware that they dont work together, xunit doesnt log anything because mutiprocess doesn’t send the output directly.

https://github.com/nose-devs/nose/issues/2

What Im looking for is any alternative that allows me to write down the output to a file.
The reason being is that Im running Selenium Tests, and everytime I get an error, the stacktrace is so large that stdout is basically completely filled out.
Something that alleviates might help out as well, the selenium documentation is pretty scarce about how to configure logging output.

I also tried a pretty basic redirection of stdout:

#nosetests > file.txt

But that doesnt work either.

  • 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-01T04:53:57+00:00Added an answer on June 1, 2026 at 4:53 am

    If you want to use basic redirection from the shell you can do

    nosetests &> output.txt
    

    But based on your question it seems you’d rather do something like:

    $nosetests --processes 4 --with-xunit --xunit-file=test_output.xml
    

    Full example:

    $ls
    test_nose.py    test_nose.pyc
    
    $cat test_nose.py
    
    import sys
    import os
    import time
    
    def setUp():
        pass
    
    def test_1():
        time.sleep(5)
        with open('test_pid_' + str(os.getpid()), 'w') as f:
            f.write(str(os.getpid()) + '\n')
    
    def test_2():
        time.sleep(5)
        with open('test_pid_' + str(os.getpid()), 'w') as f:
            f.write(str(os.getpid()) + '\n')
    
    def test_3():
        time.sleep(5)
        with open('test_pid_' + str(os.getpid()), 'w') as f:
            f.write(str(os.getpid()) + '\n')
    
    def test_4():
        time.sleep(5)
        with open('test_pid_' + str(os.getpid()), 'w') as f:
            f.write(str(os.getpid()) + '\n')
    
    def tearDown():
        pass
    
    $ nosetests --processes 4 --with-xunit --xunit-file=test_output.xml
    ....
    ----------------------------------------------------------------------
    Ran 4 tests in 5.223s
    
    OK
    
    $ ls
    test_nose.py    test_output.xml test_pid_55247  test_pid_55249
    test_nose.pyc   test_pid_55246  test_pid_55248
    
    $ cat test_pid*
    55246
    55247
    55248
    55249
    
    $ xmllint -format test_output.xml 
    <?xml version="1.0" encoding="UTF-8"?>
    <testsuite name="nosetests" tests="0" errors="0" failures="0" skip="0"/>
    

    Looks like it does not work as you said 🙂

    But

    $nosetests --processes 4 &> output.txt
    

    And

    $nosetests --with-xunit --xunit-file=test_output.xml
    

    Do.

    References:

    Redirect stderr and stdout in a Bash script

    $man xmllint
    
    $nosetests -h
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to log the output of tests to a text file. I
I am trying to log the input/output of expect to an open file. The
I'm trying to disable log output from all external libraries in logback-test.xml. Somehow it
I'm trying to show test run log (text file in a windows server) to
I've uploaded an MS powerpoint file to my server, and I'm trying to use
I am trying to get a cronjob to pipe output into a dated file
I am trying to log into google reader using AfNetworking AfHttpClient but I am
I'm trying to log into a site and obtain the code back, but i'm
I am trying to log into a website, then go to a link and
I am trying to log some input values into an array via jquery and

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.