Getting “testng.xml is not a valid file” error in Jenkins

Home Forums Software Testing Discussions Getting “testng.xml is not a valid file” error in Jenkins

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #24638
    Tester
    Participant
    @tester_br

    I’m getting the following error when trying to run a Selenium/TestNg test from Jenkins.

    [ERROR] Suite file /development/apps/config/jenkins/jobs/teste-automatizado/workspace/Abc/testng.xml is not a valid file

    Below are my POM and testng.xml files. Am I doing something wrong here? Any help? Thanks in advance.

    pom.xml:

    <modelVersion>4.0.0</modelVersion>
    <groupId>br.com.teste</groupId>
    <artifactId>Abc</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <properties>
    <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
    </properties>

    <build>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.8.1</version>
    <configuration>
    <source>1.7</source>
    <target>1.7</target>
    <encoding>ISO-8859-1</encoding>
    </configuration>

    </plugin>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>3.0.0-M4</version>
    <configuration>
    <suiteXmlFiles>
    <suiteXmlFile>testng.xml</suiteXmlFile>
    </suiteXmlFiles>
    </configuration>
    </plugin>
    </plugins>
    </build>

    <dependencies>

    <dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-java</artifactId>
    <version>3.141.59</version>
    </dependency>

    <dependency>
    <groupId>org.testng</groupId>
    <artifactId>testng</artifactId>
    <version>6.14.3</version>
    </dependency>

    <dependency>
    <groupId>joda-time</groupId>
    <artifactId>joda-time</artifactId>
    <version>2.10.4</version>
    </dependency>

    <dependency>
    <groupId>commons-io</groupId>
    <artifactId>commons-io</artifactId>
    <version>2.5</version>
    </dependency>

    <dependency>
    <groupId>com.oracle.ojdbc</groupId>
    <artifactId>ojdbc8</artifactId>
    <version>19.3.0.0</version>
    </dependency>

    </dependencies>

    </project>
    testng.xml:

    <!DOCTYPE suite SYSTEM “https://testng.org/testng-1.0.dtd”&gt;
    <suite name=”Suite”>
    <test name=”Test”>
    <classes>
    <class name=”tests.CreateAssistTest”/>
    </classes>
    </test>
    </suite>

    #24639
    Tester
    Participant
    @tester_br

    Something goes wrong when I copy the xml file here, this is the one I’m using:
    https://stackoverflow.com/questions/61277490/getting-testng-xml-is-not-a-valid-file-error-in-jenkins

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.