Azure / pytest-azurepipelines

Plugin for pytest that makes it simple to work with Azure Pipelines
MIT License
112 stars 35 forks source link

New release doesn't generate XML files unless explicitly set on the command line #47

Closed tonybaloney closed 2 years ago

tonybaloney commented 4 years ago

unless --nunitxml is on the command-line run, the XML file isn't generated.

I think this is because of the order in which pytest_configure is run and the order in which plugins are loaded by pytest.

Because this plugin does 2 things at configuration:

  1. Overrides the configuration of another plugin (either the Junit or Nunit one)
  2. Configures itself

I think the solution is to use another hook for the overriding of the other plugins and just use pytest_configure for the actual configuration

Codym48 commented 2 years ago

I think I'm running into this bug when getting pytest-azurepipelines 1.0.1 via a pip install after previously using pytest-azurepipelines 0.8.0.

The pipeline used to work, publishing results for all jobs: https://dev.azure.com/codytylermartin/Codym48/_build/results?buildId=13&view=logs&j=e8ee1fe3-a72c-5e67-0083-ddbc1adfdd3a&t=09136a7a-48e7-509e-f79c-a1ee614e2558

Now I'm struggling to find a single pytest command that will work (generate a test-output.xml and publish those results to the Azure pipeline Test summary tab) with pytest-azurepipelines 0.8.0 (latest available in Python 2.7 environment) and pytest-azurepipelines 1.0.1 (latest in Python 3.5-3.10 environments). https://dev.azure.com/codytylermartin/Codym48/_build/results?buildId=25&view=logs&j=e8ee1fe3-a72c-5e67-0083-ddbc1adfdd3a&t=9c3337ad-6b1d-5944-e44d-56bd2c2deea9

How was this bug addressed? Am I missing an easy work-around?