Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configFailurePolicy not working when using YAML instead of XML #1351

Closed
1 of 7 tasks
szaluk opened this issue Feb 25, 2017 · 0 comments
Closed
1 of 7 tasks

configFailurePolicy not working when using YAML instead of XML #1351

szaluk opened this issue Feb 25, 2017 · 0 comments

Comments

@szaluk
Copy link

szaluk commented Feb 25, 2017

TestNG Version

6.10

Expected behavior

I am in the process of converting my TestNG XML files to YAML, but when I add the configFailurePolicy to my YAML file and I try to run it from maven I am getting the following:

[ERROR] org.testng.TestNGException: org.yaml.snakeyaml.error.YAMLException: Unable to find enum value 'continue' for enum class: org.testng.xml.XmlSuite$FailurePolicy
[ERROR] at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:325)
[ERROR] at org.testng.TestNG.run(TestNG.java:1081)

Maven Command:

mvn -DtestngXmlFile=testng.yaml clean test

Actual behavior

Is the issue reproductible on runner?

  • Shell
  • Maven
  • Gradle
  • Ant
  • Eclipse
  • IntelliJ
  • NetBeans

Test case sample

This is the YAML file I am using:

name: admin-suite
configFailurePolicy: continue
parallel: methods
timeOut: 180000000
threadCount: 1

tests:
  - name: admin-webservices
    preserveOrder: true
    parameters: {
      testSuite: admin
    }

    xmlPackages:
      - name: com.company.tests.*

This is the XML file that I am using that works:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="admin-suite" configfailurepolicy="continue" parallel="methods" time-out="180000000" thread-count="1">
    <test name="admin-webservices" preserve-order="true">
        <parameter name="testSuite" value="admin"/>
        <packages>
            <package name="com.company.tests.*"/>
        </packages>
    </test>
</suite>
juherr added a commit to juherr/testng that referenced this issue Feb 25, 2017
cbeust added a commit that referenced this issue Feb 25, 2017
Fix issue #1351: FailurePolicy failing with YAML
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants