jeudi 21 janvier 2021

Running yaml file as a test

So far I had testng xml file with suite name, parameters, tests name with classes and methods. But in this xml file I had a lot of parameters. Currently I'm working on few yaml files where I put parameters for appropriate tests. For first of them I encounered an error. I created yaml file according to TestNG documentation. Below is my yaml file

name: dev
threadCount: 1
parameters:
  { paragraphsURL : http://192.168.0.139:8880/paragraphs }

tests:
 - name: Paragraphs
   classes:
    - com.project.tests.ParagraphsApiControllerTests
   method:
    - testGetParagraphs

After running yaml file I received

java.io.FileNotFoundException: D:\git\content-tests\templates\testGetParagraphs.yaml (System cannot find the path specified)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(FileInputStream.java:195)
    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at org.testng.xml.Parser.parse(Parser.java:156)
    at org.testng.xml.Parser.parse(Parser.java:246)
    at org.testng.TestNG.parseSuite(TestNG.java:298)
    at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:350)
    at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:39)
    at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
Nothing found to run

Do I forgot about something?

Aucun commentaire:

Enregistrer un commentaire