Ant with Junitparams

Asked

Viewed 80 times

0

Guys, I’m using ANT along with Jenkins to do the right continuous integration? I initially use ANT to run automated tests and then build the application. My problem boils down to running automated tests with ANT. Most of my tests are parameterized (I read the data mass of a CSV and input the field), but when I have the build.xml from the ANT to run the tests, it can only run the tests that are not parameterized. The error that occurs is due to it not being able to read the CSV, it seems the lack of the Junitparams library, but I have already checked several times and it is in the lib folder (where the ant pulls the necessary libs). Follow the Stacktrace of the error that occurs:

java.lang.RuntimeException: Could not successfully read parameters from file: classpath:UC003_editarIdentificacao/UC003-Massa_de_dados_Identificacao.csv
    at junitparams.internal.TestMethod.paramsFromFile(TestMethod.java:141)
    at junitparams.internal.TestMethod.parametersSets(TestMethod.java:124)
    at junitparams.internal.TestMethod.isIgnored(TestMethod.java:81)
    at junitparams.internal.TestMethod.isNotIgnored(TestMethod.java:88)
    at junitparams.internal.ParameterisedTestClassRunner.addTestMethodForEachParamSet(ParameterisedTestClassRunner.java:82)
    at junitparams.internal.ParameterisedTestClassRunner.computeFrameworkMethods(ParameterisedTestClassRunner.java:56)
    at junitparams.internal.ParameterisedTestClassRunner.<init>(ParameterisedTestClassRunner.java:32)
    at junitparams.JUnitParamsRunner.<init>(JUnitParamsRunner.java:390)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
Caused by: java.lang.NullPointerException
    at java.io.Reader.<init>(Unknown Source)
    at java.io.InputStreamReader.<init>(Unknown Source)
    at junitparams.internal.TestMethod.createProperReader(TestMethod.java:155)
    at junitparams.internal.TestMethod.paramsFromFile(TestMethod.java:132)
  • Did you find a solution? Poste as an answer to help other people.

  • @Thiago Zluhan de Medeiro found some solution?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.