[Python] Bitbucket pipeline failing while running automation with playwright python

Discussão em 'Python' iniciado por Stack, Setembro 26, 2024.

  1. Stack

    Stack Membro Participativo

    This is my yml file

    image: mcr.microsoft.com/playwright/python:v1.47.0-noble

    pipelines:
    default:
    - step:
    name: Install Dependencies
    caches:
    - pip
    script:
    - pip install --upgrade pip
    - pip install -r requirements.txt
    - pip install pytest allure-pytest # Explicitly install pytest and allure-pytest
    - python -m playwright install --with-deps

    - step:
    name: Run Playwright Tests
    script:
    - python -m pytest tests/ --alluredir=allure-results

    - step:
    name: Generate Allure Report
    script:
    - allure serve allure-results

    - step:
    name: Archive Allure Results
    artifacts:
    - allure-results/**
    script:
    - echo "Allure results archived."


    Error- Message:

    + python -m pytest tests/ --alluredir=allure-results
    /usr/bin/python: No module named pytest


    I tried pytest tests/ also but same error.

    How can I fix the error?

    Continue reading...

Compartilhe esta Página