Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8492

[assembly: RequiresSTA] in NUnit test suites is not parsed correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • xunit-plugin
    • None
    • XP pro, Hudson ver. 1.386, Xunit 1.12, Nunit 1.12, NUnit 2.5.5.10112

      I'm generating xml files via nunit-console (%%f is the file name of the test assembly)

      ..\Tools\NUnit\bin\net-2.0\nunit-console "%%f" /framework=4.0.30319 /xml=NUnitResult_%%f.xml /exclude=device

      When using [assembly: RequiresSTA] in the test assembly, the xml file generated by the addon for JUnit doesn't contain any test information only one entry about RequiresSTA.

      Workaround for me was using a config file:

      <?xml version="1.0" encoding="utf-8" ?>
      <configuration>
      <configSections>
      <sectionGroup name="NUnit">
      <section type="System.Configuration.NameValueSectionHandler"
      name="TestRunner"></section>
      </sectionGroup>
      </configSections>
      <NUnit>
      <TestRunner>
      <add value="STA" key="ApartmentState"/>
      </TestRunner>
      </NUnit>
      </configuration>

      Anyway, a fix would be good.

            gbois Gregory Boissinot
            Flominator Flominator
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: