Note that there are some explanatory texts on larger screens.

plurals
  1. POWant to store TestNg Report in separate folder with time stamping
    primarykey
    data
    text
    <p>I want to store my reports in another folder other than tests-output with time stamping so i added a program:</p> <pre class="lang-java prettyprint-override"><code>public class Customreporter implements IReporter { File fd = new File(""); String date; DateFormat df = new SimpleDateFormat("yyyy-MM-dd_hh-mm-ss"); String folderNameWithTimeStamp = df.format(new Date()); String currentDir = System.getProperty("user.dir") + "//Reports//"; String finalPath = currentDir + folderNameWithTimeStamp; @SuppressWarnings("deprecation") public void generateReport(List&lt;XmlSuite&gt; xmlSuites, List&lt;ISuite&gt; suites, String outputDirectory) { TestNG.getDefault().setOutputDirectory(finalPath); TestNG.getDefault().setXmlSuites(xmlSuites); } } </code></pre> <p>and changed my xml to</p> <pre class="lang-xml prettyprint-override"><code>&lt;suite name="suitedemo" parallel="false"&gt; &lt;listeners&gt; &lt;listener class-name="com.validation.Customreporter"&gt; &lt;/listeners&gt; &lt;test name="suitetestdemo"&gt; &lt;suite-files&gt; &lt;suite-file path="./exceptions.xml" /&gt; &lt;suite-file path="./screenshot.xml" /&gt; &lt;/suite-files&gt; &lt;/test&gt; &lt;/suite&gt; </code></pre> <p>Now it's creating a new folder every time, but it is storing sometimes only emailalablereport. What can I do, I dont want to customise reports I only want to store reports in new folder every time I run the suites. I changed the build file, it's working but we are executing xml files, not build.</p> <p>Thanks in advance Smith</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload