java - Generating ANT result report from Selenium + JUnit using intellij IDEA -


I do not have poetry in ANT and I am also new to development work, and I have to prepare a result report (Pass / Unsuccessful) For some of my testing project I use Intelligence, Selenium Web-Driver and Junit.

I research this topic and give the most points to use the ANT to create the report. However, most examples are enough to understand, I hope someone can point me in the right direction, I am also not sure about setting up for intellijes for my test cases.

I use ANT to run my test with IDE (intel) Run the exam through ant and can prepare XML / HTML reports:

   & Lt; Junit fork = "yes" printsummary = "withOut and ARR" showoutput = "true" outputtoformatters = "true" haltonfailure = "no" failureproperty = "test.failed" & gt; & Lt; Formatter type = "xml" /> & Lt; Test name = "com.tests.ExampleTests" todir = "$ {junit.output.dir}" /> & Lt; Classpath Refugged = "Selenium Project. Classpath" /> & Lt; / JUnit & gt; & Lt; Fail message = "test failure detected, check test results." If = "test.failed" /> & Lt; / Target & gt; & Lt; Goal name = "juniorport" & gt; & Lt; Junitreport todir = "$ {junit.output.dir}" & gt; & Lt; Fileset dir = "$ {junit.output.dir}" & gt; & Lt; Include name = "test - * .xml" /> & Lt; / Fileset & gt; & Lt; Report format = "frames" todir = "$ {junit.output.dir}" /> & Lt; / Junitreport & gt; & Lt; / Target & gt;   

I run it through an integration or some .bat file, my project dir

  - anti - myopicite - test - build.xm - - runs - test.bat - run-tests-unx.sh   

script from .bat file:

  @echo OFF color 0a Echo: echo test running It has been ... counterattack: echoing all resonance test work directory directory:% ~ dp0 echo: echo: set LOG = Rebuild.log% ~ dp0 .. \ ant \ bin \ ant.bat test -buildfile% ~ dp0build Xml -logfile% LOG%   

Script for Unix .sh:

  #! / Bin / bash echo "Test is running ..."; Dir = $ (pwd); Echo $ dir; CD. Echo $ {PWD} dir2 = $ (PWD); Cd $ dir; $ Dir2 / ant / bin / ant test -buildfile $ dir / build.xml -logfile $ dir / Rebuild.log   

You can run through CMD: < Pre> /ant/bin/ant.bat [your target name] - buildfile [your build.xml]

ant generates something like this (junit-report ): Janit Report

You will open index.html to see results:

Junit Retittals

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -