allure-python: Can't use allure report with pytest under mac

Hi, I’m having trouble with allure reports using pytest. It seems allure command is recognized but somehow when I add it in the pytest command as a parameter it causes an error and exits. Maybe I’m missing something, here’s command line:

pytest.main("--maxfail=50 /Users/distiller/project/tests --alluredir=/Users/distiller/project/tests/build/reports") If I use --junitxml instead it works.

I’m triggering tests under a remote Mac using CircleCi tool. Here’s mac build configuration:

version: 2
jobs:
  build:
    macos:
      xcode: "10.1.0"
    steps:
      - checkout
      - run:
          halt_build_on_fail: false
          name: Setup environment for test
          command: |
             xcodebuild -version
             pip install -U selenium
             pip install --upgrade pip
             pip install -U webium
             pip install pytest
             pip install -U pytest-allure-adaptor
             pip install pytest-html
             pip install pyperclip==1.5.27
             pip install seleniumwrapper
             pip install pycrypto
             pip install requests
             pip install -U py2app
             brew install pigz
             python -c "import selenium; print(selenium.__version__)"
             brew install allure
             sudo /usr/bin/safaridriver --enable
      - run:
          name: Make Unit Test
          command: |
            cd tools && chmod a+x tests_runner.py
            py2applet --make-setup tests_runner.py
            python setup.py py2app -A
            open -a /Users/distiller/project/tools/dist/tests_runner.app
            testrunner=$(eval "ps -ef | grep -v "grep" | grep 'tests_runner' | wc -l")
            while [ "$testrunner" != 0 ]
            do
                testrunner=$(eval "ps -ef | grep -v "grep" | grep 'tests_runner' | wc -l")
                echo "running tests.."
                sleep 5
            done
          no_output_timeout: 20m
      - run:
          name: Allure Generate
          when: always
          command: |
            allure generate -o /Users/distiller/project/tests/build/reports/ /Users/distiller/project/tests/build/reports/
            mv /Users/distiller/project/tests/build/reports/ /tmp/app
      - store_artifacts:
          path: /tmp/app

I’m using:

- Pytest: 4.6.4
- Allure version: 2.12.1
- pytest-allure-adaptor: 1.7.10
- Selenium: 3.141

Attaching console log I got after attempting test run with allure: console remote error.txt

I’d appreciate if you can help me with this, I’m pretty sure I’m missing some configuration detail…

Thanks in advance!

Regards,

Ashley

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 20 (11 by maintainers)

Most upvoted comments

You are welcome!