First commit
This commit is contained in:
commit
48a2a96d54
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="optional" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="test" value="true"/>
|
||||
<attribute name="optional" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
|
@ -0,0 +1 @@
|
|||
/target/
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>DCIMC_Check</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,6 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding//src/test/resources=UTF-8
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,8 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
||||
org.eclipse.jdt.core.compiler.compliance=11
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=11
|
|
@ -0,0 +1,4 @@
|
|||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,274 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>DCIMC_Check</groupId>
|
||||
<artifactId>DCIMC_Check</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<junit.jupiter.version>5.6.0</junit.jupiter.version>
|
||||
<maven.compiler.release>11</maven.compiler.release>
|
||||
<project.build.testSourceDirectory>src/test/java</project.build.testSourceDirectory>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jitpack.io</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<!-- Other dependencies -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.relevantcodes/extentreports -->
|
||||
<dependency>
|
||||
<groupId>com.relevantcodes</groupId>
|
||||
<artifactId>extentreports</artifactId>
|
||||
<version>2.41.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-java</artifactId>
|
||||
<version>4.18.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>1.5.6</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>io.github.bonigarcia</groupId>
|
||||
<artifactId>webdrivermanager</artifactId>
|
||||
<version>5.8.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.aventstack/extentreports -->
|
||||
<dependency>
|
||||
<groupId>com.aventstack</groupId>
|
||||
<artifactId>extentreports</artifactId>
|
||||
<version>3.1.5</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Apache POI for Excel manipulation -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>4.1.2</version> <!-- Use the latest version available -->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>4.1.2</version> <!-- Use the latest version available -->
|
||||
</dependency>
|
||||
|
||||
<!-- JavaMail API for sending emails -->
|
||||
<dependency>
|
||||
<groupId>com.sun.mail</groupId>
|
||||
<artifactId>javax.mail</artifactId>
|
||||
<version>1.6.2</version> <!-- Use the latest version available -->
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>4.1.2</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.cucumber</groupId>
|
||||
<artifactId>gherkin</artifactId>
|
||||
<version>5.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>3.9</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/javax.mail/javax.mail-api -->
|
||||
<dependency>
|
||||
<groupId>javax.mail</groupId>
|
||||
<artifactId>javax.mail-api</artifactId>
|
||||
<version>1.5.5</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.4</version>
|
||||
</dependency>
|
||||
|
||||
<!--
|
||||
https://mvnrepository.com/artifact/io.github.bonigarcia/webdrivermanager -->
|
||||
<dependency>
|
||||
<groupId>io.github.bonigarcia</groupId>
|
||||
<artifactId>webdrivermanager</artifactId>
|
||||
<version>5.7.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.sun.mail</groupId>
|
||||
<artifactId>javax.mail</artifactId>
|
||||
<version>1.6.2</version>
|
||||
</dependency>
|
||||
<!--
|
||||
https://mvnrepository.com/artifact/com.github.ralfstuckert.pdfbox-layout/pdfbox2-layout -->
|
||||
<dependency>
|
||||
<groupId>com.github.ralfstuckert.pdfbox-layout</groupId>
|
||||
<artifactId>pdfbox2-layout</artifactId>
|
||||
<version>0.8.6</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.13.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.testng/testng -->
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<version>6.14.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.apple</groupId>
|
||||
<artifactId>AppleJavaExtensions</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java8 -->
|
||||
<dependency>
|
||||
<groupId>io.cucumber</groupId>
|
||||
<artifactId>cucumber-java8</artifactId>
|
||||
<version>4.8.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-junit -->
|
||||
<dependency>
|
||||
<groupId>io.cucumber</groupId>
|
||||
<artifactId>cucumber-junit</artifactId>
|
||||
<version>4.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!--
|
||||
https://mvnrepository.com/artifact/io.cucumber/cucumber-picocontainer -->
|
||||
<dependency>
|
||||
<groupId>io.cucumber</groupId>
|
||||
<artifactId>cucumber-picocontainer</artifactId>
|
||||
<version>4.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-core -->
|
||||
<dependency>
|
||||
<groupId>io.cucumber</groupId>
|
||||
<artifactId>cucumber-core</artifactId>
|
||||
<version>4.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--
|
||||
https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-java</artifactId>
|
||||
<version>3.141.59</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--
|
||||
https://mvnrepository.com/artifact/com.aventstack/extentreports-cucumber4-adapter -->
|
||||
<dependency>
|
||||
<groupId>com.aventstack</groupId>
|
||||
<artifactId>extentreports-cucumber4-adapter</artifactId>
|
||||
<version>1.0.12</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>io.cucumber</groupId>
|
||||
<artifactId>cucumber-java</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>io.cucumber</groupId>
|
||||
<artifactId>cucumber-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
<groupId>org.freemarker</groupId>
|
||||
|
||||
<artifactId>freemarker</artifactId>
|
||||
|
||||
<version>2.3.30</version>
|
||||
|
||||
</dependency>
|
||||
<!--
|
||||
https://mvnrepository.com/artifact/org.apache.maven/maven-plugin-api -->
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>3.8.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M5</version> <!-- Use the appropriate version -->
|
||||
<configuration>
|
||||
<suiteXmlFiles>
|
||||
<suiteXmlFile>testng.xml</suiteXmlFile>
|
||||
</suiteXmlFiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,83 @@
|
|||
package Utilities;
|
||||
|
||||
import com.aventstack.extentreports.ExtentReports;
|
||||
import com.aventstack.extentreports.reporter.ExtentHtmlReporter;
|
||||
import com.aventstack.extentreports.ExtentTest;
|
||||
import com.aventstack.extentreports.Status;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.openqa.selenium.OutputType;
|
||||
import org.openqa.selenium.TakesScreenshot;
|
||||
import org.testng.ITestResult;
|
||||
import org.testng.annotations.AfterMethod;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.BeforeSuite;
|
||||
import org.testng.annotations.AfterSuite;
|
||||
|
||||
public class BaseTest {
|
||||
protected static ExtentReports extent;
|
||||
protected ExtentTest test;
|
||||
private static ExtentHtmlReporter htmlReporter;
|
||||
|
||||
@BeforeSuite
|
||||
public void beforeSuite() {
|
||||
extent = new ExtentReports();
|
||||
htmlReporter = new ExtentHtmlReporter(ConfigurationManager.getReportPath());
|
||||
extent.attachReporter(htmlReporter);
|
||||
extent.setSystemInfo("Report Name", ConfigurationManager.getReportName());
|
||||
extent.setSystemInfo("Document Title", ConfigurationManager.getDocumentTitle());
|
||||
extent.setSystemInfo("Report Title", ConfigurationManager.getReportTitle());
|
||||
// htmlReporter.config().setTheme(ConfigurationManager.getTheme());
|
||||
}
|
||||
|
||||
@BeforeMethod
|
||||
public void beforeMethod() {
|
||||
test = extent.createTest(getClass().getSimpleName());
|
||||
}
|
||||
|
||||
@AfterMethod
|
||||
public void afterMethod(ITestResult result) {
|
||||
if (result.getStatus() == ITestResult.SUCCESS) {
|
||||
test.log(Status.PASS, "Test passed");
|
||||
} else if (result.getStatus() == ITestResult.FAILURE) {
|
||||
test.log(Status.FAIL, "Test failed");
|
||||
}else if (result.getStatus() == ITestResult.SKIP) {
|
||||
test.log(Status.SKIP, "Test skipped");
|
||||
//captureScreenshot();
|
||||
}
|
||||
extent.flush();
|
||||
}
|
||||
|
||||
@AfterSuite
|
||||
public void afterSuite() {
|
||||
// Close the extent report after all tests have executed.
|
||||
}
|
||||
|
||||
/* private void captureScreenshot() {
|
||||
if (WebDriverFactory.getDriver() instanceof TakesScreenshot) {
|
||||
TakesScreenshot screenshotDriver = (TakesScreenshot) WebDriverFactory.getDriver();
|
||||
byte[] screenshot = screenshotDriver.getScreenshotAs(OutputType.BYTES);
|
||||
|
||||
// Convert the screenshot to a Base64 encoded string
|
||||
String base64Screenshot = Base64.getEncoder().encodeToString(screenshot);
|
||||
|
||||
// Add the Base64 encoded screenshot to the Extent Report
|
||||
test.(base64Screenshot);*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* private static ExtentReports extent;
|
||||
*
|
||||
* public static ExtentReports getInstance() { if (extent == null) { extent =
|
||||
* new ExtentReports(); ExtentHtmlReporter htmlReporter = new
|
||||
* ExtentHtmlReporter("./Reports/Kontest.html");
|
||||
* extent.attachReporter(htmlReporter); // Add additional configurations if
|
||||
* needed } return extent; }
|
||||
*/
|
|
@ -0,0 +1,41 @@
|
|||
package Utilities;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.chrome.ChromeDriver;
|
||||
import org.openqa.selenium.firefox.FirefoxDriver;
|
||||
|
||||
public class BrowserUtility{
|
||||
public static WebDriver driver;
|
||||
public static WebDriver OpenBrowser(WebDriver driver,String browserName,String url) throws InterruptedException, IOException
|
||||
{
|
||||
if(browserName.equalsIgnoreCase("Chrome"))
|
||||
{
|
||||
//C:\\Users\\hp\\eclipse-workspace\\com.testautomation.konectar\\Drivers\\chromedriver.exe
|
||||
System.setProperty("webdriver.chrome.driver", "/home/aissel/Downloads/chromedriver-linux64/chromedriver");
|
||||
driver=new ChromeDriver();
|
||||
driver.manage().window().maximize();
|
||||
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
|
||||
driver.get(url);
|
||||
return driver;
|
||||
}
|
||||
else if(browserName.equalsIgnoreCase("firefox")) {
|
||||
System.setProperty("webdriver.gecko.driver", System.getProperty("user.dir")+"/Drivers/geckodriver/geckodriver.exe");
|
||||
driver=new FirefoxDriver();
|
||||
driver.manage().window().maximize();
|
||||
driver.get(url);
|
||||
return driver;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package Utilities;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
public class ConfigReader
|
||||
{
|
||||
private Properties properties;
|
||||
|
||||
public ConfigReader() {
|
||||
properties = new Properties();
|
||||
try {
|
||||
FileInputStream fis = new FileInputStream(System.getProperty("user.dir")+"/src/test/resources/browser-config.properties");
|
||||
properties.load(fis);
|
||||
fis.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public String getProperty(String set, String key) {
|
||||
return properties.getProperty(set + "." + key);
|
||||
}
|
||||
|
||||
public String[] getOptions(String set, String key) {
|
||||
String optionString = properties.getProperty(set + "." + key);
|
||||
if (optionString != null && !optionString.isEmpty()) {
|
||||
return optionString.split(",");
|
||||
} else {
|
||||
return new String[0]; // Return an empty array if no options are found
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package Utilities;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
|
||||
public class ConfigurationManager
|
||||
{
|
||||
|
||||
|
||||
// private static final String PROPERTY_FILE_PATH = "extent-config.properties";
|
||||
private static Properties properties;
|
||||
|
||||
static {
|
||||
properties = new Properties();
|
||||
try {
|
||||
FileInputStream fis = new FileInputStream(System.getProperty("user.dir")+"/src/test/resources/extent-config.properties");
|
||||
properties.load(fis);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static String getReportPath() {
|
||||
return properties.getProperty("reportPath");
|
||||
}
|
||||
|
||||
public static String getReportName() {
|
||||
return properties.getProperty("extent.config.reportName");
|
||||
}
|
||||
|
||||
public static String getDocumentTitle() {
|
||||
return properties.getProperty("extent.config.documentTitle");
|
||||
}
|
||||
|
||||
public static String getReportTitle() {
|
||||
return properties.getProperty("extent.config.reportTitle");
|
||||
}
|
||||
|
||||
public static String getTheme() {
|
||||
return properties.getProperty("extent.config.theme");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
package Utilities;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.PrintStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.PrintStream;
|
||||
|
||||
public class ConsoleOutputToFile {
|
||||
private static final String OUTPUT_FILE_PATH = "console_output.txt";
|
||||
private static PrintStream consolePrintStream;
|
||||
private static FileOutputStream fileOutputStream;
|
||||
|
||||
public static void redirectConsoleOutput() {
|
||||
try {
|
||||
// Store the current System.out
|
||||
consolePrintStream = System.out;
|
||||
|
||||
// Create a new file for writing console output
|
||||
File file = new File(OUTPUT_FILE_PATH);
|
||||
fileOutputStream = new FileOutputStream(file);
|
||||
|
||||
// Redirect System.out to the file
|
||||
PrintStream filePrintStream = new PrintStream(fileOutputStream);
|
||||
System.setOut(filePrintStream);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static String getConsoleOutputFilePath() {
|
||||
return OUTPUT_FILE_PATH;
|
||||
}
|
||||
|
||||
public static void restoreConsoleOutput() {
|
||||
try {
|
||||
// Restore the original System.out
|
||||
System.setOut(consolePrintStream);
|
||||
|
||||
// Close the file output stream
|
||||
if (fileOutputStream != null) {
|
||||
fileOutputStream.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*public class ConsoleOutputToFile {
|
||||
|
||||
public static void redirectConsoleOutput() {
|
||||
String timeStamp = new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss z").format(new Date());
|
||||
String fileName = "console-output-" + timeStamp + ".txt";
|
||||
try {
|
||||
PrintStream fileStream = new PrintStream(new File(fileName));
|
||||
System.setOut(fileStream);
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static String getConsoleOutputFilePath(String ConsoleOutputToFile) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
|
@ -0,0 +1,480 @@
|
|||
package Utilities;
|
||||
|
||||
import javax.mail.*;
|
||||
import javax.mail.internet.InternetAddress;
|
||||
import javax.mail.internet.MimeMessage;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileReader;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.mail.internet.*;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class EmailUtils {
|
||||
|
||||
private static final String FROM_EMAIL = "contentservice@aissel.com";
|
||||
private static final String PASSWORD = "prfnfykatlfxqonu";
|
||||
// private static final String[] TO_EMAILS = {"santoshp@aissel.com", "shashikumark@aissel.com", "qa@aissel.konectar.io", "rohitp@aissel.com", "ashwini.p@aissel.com", "saurabha@aissel.com", "kreigstonw@aissel.com", "dinakarks@aissel.com", "suraj@aissel.com", "laxmank@aissel.com", "vinodh@aissel.com"};
|
||||
private static final String[] TO_EMAILS = {"shashikumark@aissel.com"};
|
||||
private static final Logger logger = LoggerFactory.getLogger(EmailUtils.class);
|
||||
|
||||
public static void sendConsoleOutputEmail(String consoleOutputFilePath, String subject, String emailBody) {
|
||||
try {
|
||||
String consoleOutput = readConsoleOutputFromFile(consoleOutputFilePath);
|
||||
|
||||
// Set up mail server properties
|
||||
Properties properties = new Properties();
|
||||
properties.put("mail.smtp.host", "smtp.bizmail.yahoo.com");
|
||||
properties.put("mail.smtp.port", "465");
|
||||
properties.put("mail.smtp.auth", "true");
|
||||
properties.put("mail.smtp.ssl.enable", "true");
|
||||
|
||||
// Create a session with the mail server
|
||||
Session session = Session.getInstance(properties, new Authenticator() {
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(FROM_EMAIL, PASSWORD);
|
||||
}
|
||||
});
|
||||
|
||||
// Create a new MimeMessage object
|
||||
Message message = new MimeMessage(session);
|
||||
|
||||
// Set the sender address
|
||||
message.setFrom(new InternetAddress(FROM_EMAIL));
|
||||
|
||||
// Set the recipient addresses
|
||||
InternetAddress[] recipientAddresses = new InternetAddress[TO_EMAILS.length];
|
||||
for (int i = 0; i < TO_EMAILS.length; i++) {
|
||||
recipientAddresses[i] = new InternetAddress(TO_EMAILS[i]);
|
||||
}
|
||||
message.setRecipients(Message.RecipientType.TO, recipientAddresses);
|
||||
|
||||
// Set the email subject
|
||||
message.setSubject(subject);
|
||||
|
||||
// Create a MimeBodyPart for the console output attachment
|
||||
MimeBodyPart attachmentPart = new MimeBodyPart();
|
||||
attachmentPart.attachFile(consoleOutputFilePath);
|
||||
|
||||
// Create a text part for the email body
|
||||
MimeBodyPart textPart = new MimeBodyPart();
|
||||
textPart.setText(emailBody, "UTF-8");
|
||||
textPart.setHeader("Content-Type", "text/plain; charset=UTF-8");
|
||||
|
||||
// Log the content of the Multipart before setting it in the MimeMessage
|
||||
Multipart multipart = new MimeMultipart();
|
||||
multipart.addBodyPart(textPart);
|
||||
multipart.addBodyPart(attachmentPart);
|
||||
logger.info("Multipart Content: {}", multipart);
|
||||
|
||||
// Set the Multipart object as the email content
|
||||
message.setContent(multipart);
|
||||
|
||||
// Send the message
|
||||
Transport.send(message);
|
||||
|
||||
// Log success
|
||||
logger.info("Email sent successfully.");
|
||||
|
||||
} catch (MessagingException | IOException e) {
|
||||
// Log failure
|
||||
logger.error("Failed to send email.", e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static String readConsoleOutputFromFile(String consoleOutputFilePath) throws IOException {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
try (BufferedReader reader = new BufferedReader(new FileReader(consoleOutputFilePath))) {
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
sb.append(line).append("\n");
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
public class EmailUtils {
|
||||
|
||||
private static final String FROM_EMAIL = "contentservice@aissel.com";
|
||||
private static final String PASSWORD = "prfnfykatlfxqonu";
|
||||
// private static final String FROM_EMAIL = "automationreportaissel@gmail.com";
|
||||
// private static final String PASSWORD = "Automation@123";
|
||||
|
||||
// private static final String[] TO_EMAILS = {"skakol050@gmail.com", "example@example.com", "another@example.com"};
|
||||
private static final String[] TO_EMAILS = {"skakol050@gmail.com", "shashikumark@aissel.com"};
|
||||
|
||||
|
||||
public static void sendConsoleOutputEmail(String consoleOutputFilePath, String subject, String Emailbody) {
|
||||
try {
|
||||
String consoleOutput = readConsoleOutputFromFile(consoleOutputFilePath);
|
||||
|
||||
// Set up mail server properties
|
||||
Properties properties = new Properties();
|
||||
properties.put("mail.smtp.host", "smtp.bizmail.yahoo.com");
|
||||
properties.put("mail.smtp.port", "465");
|
||||
properties.put("mail.smtp.auth", "true");
|
||||
properties.put("mail.smtp.ssl.enable", "true");
|
||||
|
||||
// Create a session with the mail server
|
||||
Session session = Session.getInstance(properties, new Authenticator() {
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(FROM_EMAIL, PASSWORD);
|
||||
}
|
||||
});
|
||||
|
||||
// Create a new MimeMessage object
|
||||
Message message = new MimeMessage(session);
|
||||
|
||||
// Set the sender address
|
||||
message.setFrom(new InternetAddress(FROM_EMAIL));
|
||||
|
||||
// Set the recipient addresses
|
||||
InternetAddress[] recipientAddresses = new InternetAddress[TO_EMAILS.length];
|
||||
for (int i = 0; i < TO_EMAILS.length; i++) {
|
||||
recipientAddresses[i] = new InternetAddress(TO_EMAILS[i]);
|
||||
}
|
||||
message.setRecipients(Message.RecipientType.TO, recipientAddresses);
|
||||
|
||||
// Set the email subject
|
||||
message.setSubject(subject);
|
||||
|
||||
// Create a MimeBodyPart for the console output attachment
|
||||
MimeBodyPart attachmentPart = new MimeBodyPart();
|
||||
attachmentPart.attachFile(consoleOutputFilePath);
|
||||
|
||||
// Create a text part for the email body
|
||||
MimeBodyPart textPart = new MimeBodyPart();
|
||||
textPart.setText(Emailbody, "UTF-8");
|
||||
textPart.setHeader("Content-Type", "text/plain; charset=UTF-8");
|
||||
|
||||
// Log the content of consoleOutput
|
||||
// System.out.println("Console Output: " + consoleOutput);
|
||||
|
||||
// Log the content of the Multipart before setting it in the MimeMessage
|
||||
Multipart multipart = new MimeMultipart();
|
||||
multipart.addBodyPart(textPart);
|
||||
multipart.addBodyPart(attachmentPart);
|
||||
// System.out.println("Multipart Content: " + multipart);
|
||||
|
||||
// Set the Multipart object as the email content
|
||||
message.setContent(multipart);
|
||||
|
||||
// Send the message
|
||||
Transport.send(message);
|
||||
|
||||
// Log success or handle accordingly
|
||||
// logger.info("Email sent successfully.");
|
||||
|
||||
} catch (MessagingException | IOException e) {
|
||||
// Log or handle exceptions as needed
|
||||
// logger.error("Failed to send email.", e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static String readConsoleOutputFromFile(String consoleOutputFilePath) throws IOException {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
try (BufferedReader reader = new BufferedReader(new FileReader(consoleOutputFilePath))) {
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
sb.append(line).append("\n");
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
public class EmailUtils {
|
||||
private static final String FROM_EMAIL = "contentservice@aissel.com";
|
||||
private static final String PASSWORD = "prfnfykatlfxqonu";
|
||||
// private static final String FROM_EMAIL = "automationreportaissel@gmail.com";
|
||||
// private static final String PASSWORD = "Automation@123";
|
||||
|
||||
// private static final String[] TO_EMAILS = {"skakol050@gmail.com", "example@example.com", "another@example.com"};
|
||||
private static final String[] TO_EMAILS = {"skakol050@gmail.com", "shashikumark@aissel.com"};
|
||||
|
||||
public static void sendConsoleOutputEmail(String consoleOutputFilePath, String subject) {
|
||||
try {
|
||||
String consoleOutput = readConsoleOutputFromFile(consoleOutputFilePath);
|
||||
|
||||
// Set up mail server properties
|
||||
Properties properties = new Properties();
|
||||
properties.put("mail.smtp.host", "smtp.bizmail.yahoo.com");
|
||||
properties.put("mail.smtp.port", "465");
|
||||
properties.put("mail.smtp.auth", "true");
|
||||
properties.put("mail.smtp.ssl.enable", "true");
|
||||
|
||||
// Create a session with the mail server
|
||||
Session session = Session.getInstance(properties, new Authenticator() {
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(FROM_EMAIL, PASSWORD);
|
||||
}
|
||||
});
|
||||
|
||||
// Create a new MimeMessage object
|
||||
Message message = new MimeMessage(session);
|
||||
|
||||
// Set the sender address
|
||||
message.setFrom(new InternetAddress(FROM_EMAIL));
|
||||
|
||||
// Set the recipient addresses
|
||||
InternetAddress[] recipientAddresses = new InternetAddress[TO_EMAILS.length];
|
||||
for (int i = 0; i < TO_EMAILS.length; i++) {
|
||||
recipientAddresses[i] = new InternetAddress(TO_EMAILS[i]);
|
||||
}
|
||||
message.setRecipients(Message.RecipientType.TO, recipientAddresses);
|
||||
|
||||
// Set the email subject
|
||||
message.setSubject(subject);
|
||||
|
||||
// Create a MimeBodyPart for the console output attachment
|
||||
MimeBodyPart attachmentPart = new MimeBodyPart();
|
||||
attachmentPart.attachFile(consoleOutputFilePath);
|
||||
|
||||
// Create a Multipart object and add the attachment part
|
||||
Multipart multipart = new MimeMultipart();
|
||||
multipart.addBodyPart(attachmentPart);
|
||||
|
||||
// Create a text part for the email body
|
||||
MimeBodyPart textPart = new MimeBodyPart();
|
||||
textPart.setText("Hi all,\n"
|
||||
+ "\n"
|
||||
+ "This file contains reports for the following:\n"
|
||||
+ "Total Discover Profile Count\n"
|
||||
+ "Contacts Profile Count\n"
|
||||
+ "Interactions Count\n"
|
||||
+ "Medical Insights Count" + consoleOutput);
|
||||
|
||||
// Set the Multipart object as the email content
|
||||
message.setContent(multipart);
|
||||
|
||||
// Send the message
|
||||
Transport.send(message);
|
||||
|
||||
// Log success or handle accordingly
|
||||
// logger.info("Email sent successfully.");
|
||||
|
||||
} catch (MessagingException | IOException e) {
|
||||
// Log or handle exceptions as needed
|
||||
// logger.error("Failed to send email.", e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static String readConsoleOutputFromFile(String consoleOutputFilePath) throws IOException {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
try (BufferedReader reader = new BufferedReader(new FileReader(consoleOutputFilePath))) {
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
sb.append(line).append("\n");
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*public class EmailUtils {
|
||||
|
||||
private static final String FROM_EMAIL = "contentservice@aissel.com";
|
||||
private static final String PASSWORD = "prfnfykatlfxqonu";
|
||||
private static final String TO_EMAIL = "skakol050@gmail.com";
|
||||
|
||||
public static void sendConsoleOutputEmail(String consoleOutputFilePath, String subject) {
|
||||
try {
|
||||
String consoleOutput = readConsoleOutputFromFile(consoleOutputFilePath);
|
||||
|
||||
// Set up mail server properties
|
||||
Properties properties = new Properties();
|
||||
properties.put("mail.smtp.host", "smtp.bizmail.yahoo.com");
|
||||
properties.put("mail.smtp.port", "465"); // or "465"
|
||||
properties.put("mail.smtp.auth", "true");
|
||||
properties.put("mail.smtp.starttls.enable", "true"); // for STARTTLS
|
||||
// or
|
||||
properties.put("mail.smtp.ssl.enable", "true"); // for SSL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Create a session with the mail server
|
||||
Session session = Session.getInstance(properties, new Authenticator() {
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(FROM_EMAIL, PASSWORD);
|
||||
}
|
||||
});
|
||||
|
||||
// Create a new MimeMessage object
|
||||
Message message = new MimeMessage(session);
|
||||
|
||||
// Set the sender and recipient addresses
|
||||
message.setFrom(new InternetAddress(FROM_EMAIL));
|
||||
message.setRecipient(Message.RecipientType.TO, new InternetAddress(TO_EMAIL));
|
||||
|
||||
// Set the email subject
|
||||
message.setSubject(subject);
|
||||
|
||||
// Create a MimeBodyPart for the console output attachment
|
||||
BodyPart messageBodyPart = new MimeBodyPart();
|
||||
messageBodyPart.setText("Please find the attached console output.");
|
||||
|
||||
// Create a MimeBodyPart for the attachment
|
||||
MimeBodyPart attachmentPart = new MimeBodyPart();
|
||||
attachmentPart.setText(consoleOutput);
|
||||
attachmentPart.setFileName("console_output.txt");
|
||||
|
||||
// Create a Multipart object and add the parts
|
||||
Multipart multipart = new MimeMultipart();
|
||||
multipart.addBodyPart(messageBodyPart);
|
||||
multipart.addBodyPart(attachmentPart);
|
||||
|
||||
// Set the Multipart object as the email content
|
||||
message.setContent(multipart);
|
||||
|
||||
// Send the message
|
||||
Transport.send(message);
|
||||
|
||||
System.out.println("Email sent successfully.");
|
||||
|
||||
} catch (MessagingException | IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static String readConsoleOutputFromFile(String consoleOutputFilePath) throws IOException {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
try (BufferedReader reader = new BufferedReader(new FileReader(consoleOutputFilePath))) {
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
sb.append(line).append("\n");
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}*/
|
||||
|
||||
/*
|
||||
public class YourSeleniumScript {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// ... Your Selenium script logic ...
|
||||
|
||||
// Redirect console output to a file
|
||||
ConsoleOutputToFile.redirectConsoleOutput();
|
||||
|
||||
// ... More Selenium script logic ...
|
||||
|
||||
// Get the console output file path
|
||||
String consoleOutputFilePath = ConsoleOutputToFile.getConsoleOutputFilePath();
|
||||
|
||||
// Send an email with the console output as an attachment
|
||||
EmailUtils.sendConsoleOutputEmail(consoleOutputFilePath, "Selenium Script Execution Report");
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/*public class EmailUtils {
|
||||
|
||||
private static final String FROM_EMAIL = "contentservice@aissel.com";
|
||||
private static final String PASSWORD = "prfnfykatlfxqonu";
|
||||
private static final String TO_EMAIL = "skakol050@gmail.com";
|
||||
|
||||
|
||||
|
||||
public static void sendConsoleOutputEmail(String consoleOutputFilePath, String subject) {
|
||||
// Set up the properties for the mail server
|
||||
Properties properties = new Properties();
|
||||
properties.put("mail.smtp.host", "smtp.bizmail.yahoo.com");
|
||||
properties.put("mail.smtp.port", "465"); // or "465"
|
||||
properties.put("mail.smtp.auth", "true");
|
||||
properties.put("mail.smtp.starttls.enable", "true"); // for STARTTLS
|
||||
// or
|
||||
properties.put("mail.smtp.ssl.enable", "true"); // for SSL
|
||||
|
||||
|
||||
// Create a session with the Gmail SMTP server
|
||||
Session session = Session.getInstance(properties, new Authenticator() {
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(FROM_EMAIL, PASSWORD);
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
// Create a new MimeMessage object
|
||||
Message message = new MimeMessage(session);
|
||||
|
||||
// Set the sender and recipient addresses
|
||||
message.setFrom(new InternetAddress(FROM_EMAIL));
|
||||
message.setRecipient(Message.RecipientType.TO, new InternetAddress(TO_EMAIL));
|
||||
|
||||
// Set the email subject
|
||||
message.setSubject(subject);
|
||||
|
||||
// Read the console output from a file
|
||||
String consoleOutput = readConsoleOutputFromFile(consoleOutputFilePath);
|
||||
|
||||
// Set the email content
|
||||
message.setText("Console Output:\n\n" + consoleOutput);
|
||||
|
||||
// Send the message
|
||||
Transport.send(message);
|
||||
|
||||
System.out.println("Email sent successfully.");
|
||||
|
||||
} catch (MessagingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static String readConsoleOutputFromFile(String filePath) {
|
||||
StringBuilder consoleOutput = new StringBuilder();
|
||||
try (BufferedReader reader = new BufferedReader(new FileReader(filePath))) {
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
consoleOutput.append(line).append("\n");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return consoleOutput.toString();
|
||||
}
|
||||
}
|
||||
*/
|
|
@ -0,0 +1,47 @@
|
|||
package Utilities;
|
||||
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
public class ExcelUtils {
|
||||
private static Workbook workbook;
|
||||
private static Sheet sheet;
|
||||
private static String filePath;
|
||||
|
||||
public static void setExcelFile(String path, String sheetName) throws IOException {
|
||||
filePath = path;
|
||||
FileInputStream inputStream = new FileInputStream(new File(path));
|
||||
workbook = new XSSFWorkbook(inputStream);
|
||||
sheet = workbook.getSheet(sheetName);
|
||||
}
|
||||
|
||||
public static String getCellData(int rowNum, int colNum) {
|
||||
Row row = sheet.getRow(rowNum);
|
||||
Cell cell = row.getCell(colNum);
|
||||
return cell.toString();
|
||||
}
|
||||
|
||||
public static void setCellData(int rowNum, int colNum, String data) throws IOException {
|
||||
Row row = sheet.getRow(rowNum);
|
||||
Cell cell = row.createCell(colNum);
|
||||
cell.setCellValue(data);
|
||||
|
||||
try (FileOutputStream outputStream = new FileOutputStream(filePath)) {
|
||||
workbook.write(outputStream);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,255 @@
|
|||
package Utilities;
|
||||
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.WebElement;
|
||||
import org.openqa.selenium.chrome.ChromeDriver;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Properties;
|
||||
import javax.mail.Authenticator;
|
||||
import javax.mail.Message;
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.PasswordAuthentication;
|
||||
import javax.mail.Session;
|
||||
import javax.mail.Transport;
|
||||
import javax.mail.internet.InternetAddress;
|
||||
import javax.mail.internet.MimeMessage;
|
||||
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
|
||||
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
public class ExcelWriter {
|
||||
|
||||
public void writeDataToExcel(String data) {
|
||||
try {
|
||||
String timeStamp = generateTimestamp();
|
||||
String excelFilePath = "/home/aissel/Desktop/git4/DCIM_count.xlsx";
|
||||
|
||||
try (FileInputStream inputStream = new FileInputStream(excelFilePath);
|
||||
Workbook workbook = (inputStream.available() > 0) ? new XSSFWorkbook(inputStream) : new XSSFWorkbook();
|
||||
FileOutputStream outputStream = new FileOutputStream(excelFilePath)) {
|
||||
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
int rowNum = sheet.getLastRowNum() + 1;
|
||||
Row row = sheet.createRow(rowNum);
|
||||
Cell cell = row.createCell(0);
|
||||
cell.setCellValue(data);
|
||||
|
||||
} // No need to explicitly close streams; try-with-resources takes care of it
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
// Consider logging or handling the exception more meaningfully based on your application requirements
|
||||
}
|
||||
}
|
||||
|
||||
private String generateTimestamp() {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
return DateTimeFormatter.ofPattern("yyyyMMdd_HHmmss").format(now);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*public class ExcelWriter {
|
||||
|
||||
private static final String EXCEL_FILE_PATH = "/home/aissel/Desktop/git4/DCIM_count.xlsx";
|
||||
private static final String EMAIL_TO = "skakol050@gmail.com";
|
||||
private static final String EMAIL_FROM = "contentservice@aissel.com";
|
||||
private static final String SMTP_HOST = "smtp.bizmail.yahoo.com";
|
||||
private static final String SMTP_PORT = "465";
|
||||
private static final String SMTP_USERNAME = "contentservice";
|
||||
private static final String SMTP_PASSWORD = "prfnfykatlfxqonu";
|
||||
|
||||
public static void writeDataToExcel(String data) {
|
||||
try (FileInputStream inputStream = new FileInputStream(EXCEL_FILE_PATH);
|
||||
Workbook workbook = new XSSFWorkbook(inputStream)) {
|
||||
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
int rowNum = sheet.getLastRowNum() + 1;
|
||||
|
||||
Row row = sheet.createRow(rowNum);
|
||||
Cell cell = row.createCell(0, CellType.STRING);
|
||||
cell.setCellValue(data);
|
||||
|
||||
try (FileOutputStream outputStream = new FileOutputStream(EXCEL_FILE_PATH)) {
|
||||
workbook.write(outputStream);
|
||||
}
|
||||
|
||||
System.out.println("Data saved to Excel.");
|
||||
|
||||
// Send email with Excel write report
|
||||
sendEmail("Excel Write Report", "Data saved to Excel:\n\n" + data);
|
||||
|
||||
} catch (IOException e) {
|
||||
handleIOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static void sendEmail(String subject, String body) {
|
||||
Properties properties = new Properties();
|
||||
properties.put("mail.smtp.host", SMTP_HOST);
|
||||
properties.put("mail.smtp.port", SMTP_PORT);
|
||||
properties.put("mail.smtp.auth", "true");
|
||||
properties.put("mail.smtp.starttls.enable", "true");
|
||||
|
||||
Session session = Session.getDefaultInstance(properties, new Authenticator() {
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(SMTP_USERNAME, SMTP_PASSWORD);
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
MimeMessage message = new MimeMessage(session);
|
||||
message.setFrom(new InternetAddress(EMAIL_FROM));
|
||||
message.addRecipient(Message.RecipientType.TO, new InternetAddress(EMAIL_TO));
|
||||
message.setSubject(subject);
|
||||
message.setText(body);
|
||||
|
||||
Transport.send(message);
|
||||
System.out.println("Email sent successfully.");
|
||||
|
||||
} catch (MessagingException e) {
|
||||
handleMessagingException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static void handleIOException(IOException e) {
|
||||
e.printStackTrace();
|
||||
System.err.println("An error occurred while accessing the Excel file.");
|
||||
}
|
||||
|
||||
private static void handleMessagingException(MessagingException e) {
|
||||
e.printStackTrace();
|
||||
System.err.println("Failed to send email.");
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*public class ExcelWriter {
|
||||
|
||||
private static final String EXCEL_FILE_PATH = "E:\\Git\\konectar_Data_count_Check\\Book11.xlsx";
|
||||
private static final String EMAIL_TO = "skakol050@gmail.com";
|
||||
private static final String EMAIL_FROM = "contentservice@aissel.com";
|
||||
private static final String SMTP_HOST = "smtp.bizmail.yahoo.com";
|
||||
private static final String SMTP_PORT = "465";
|
||||
private static final String SMTP_USERNAME = "contentservice";
|
||||
private static final String SMTP_PASSWORD = "prfnfykatlfxqonu";
|
||||
|
||||
public static void writeDataToExcel(String data) {
|
||||
try (FileInputStream inputStream = new FileInputStream(EXCEL_FILE_PATH);
|
||||
Workbook workbook = new XSSFWorkbook(inputStream)) {
|
||||
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
int rowNum = sheet.getLastRowNum() + 1;
|
||||
|
||||
Row row = sheet.createRow(rowNum);
|
||||
Cell cell = row.createCell(0, CellType.STRING);
|
||||
cell.setCellValue(data);
|
||||
|
||||
try (FileOutputStream outputStream = new FileOutputStream(EXCEL_FILE_PATH)) {
|
||||
workbook.write(outputStream);
|
||||
}
|
||||
|
||||
System.out.println("Data saved to Excel.");
|
||||
|
||||
// Send email with Excel write report
|
||||
sendEmail("Excel Write Report", "Data saved to Excel:\n\n" + data);
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
System.err.println("An error occurred while accessing the Excel file.");
|
||||
}
|
||||
}
|
||||
|
||||
private static void sendEmail(String subject, String body) {
|
||||
Properties properties = new Properties();
|
||||
properties.put("mail.smtp.host", SMTP_HOST);
|
||||
properties.put("mail.smtp.port", SMTP_PORT);
|
||||
properties.put("mail.smtp.auth", "true");
|
||||
properties.put("mail.smtp.starttls.enable", "true");
|
||||
|
||||
Session session = Session.getDefaultInstance(properties, new Authenticator() {
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(SMTP_USERNAME, SMTP_PASSWORD);
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
MimeMessage message = new MimeMessage(session);
|
||||
message.setFrom(new InternetAddress(EMAIL_FROM));
|
||||
message.addRecipient(Message.RecipientType.TO, new InternetAddress(EMAIL_TO));
|
||||
message.setSubject(subject);
|
||||
message.setText(body);
|
||||
|
||||
Transport.send(message);
|
||||
System.out.println("Email sent successfully.");
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
System.err.println("Failed to send email.");
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/*public class ExcelWriter {
|
||||
public void writeDataToExcel(String data) {
|
||||
try {
|
||||
|
||||
String timeStamp = TimestampGenerator.generateTimestamp();
|
||||
String excelFilePath = "E:\\Git\\konectar_Data_count_Check\\Data_" + timeStamp + ".xlsx";
|
||||
FileInputStream inputStream = new FileInputStream(excelFilePath);
|
||||
Workbook workbook = new XSSFWorkbook(inputStream);
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
int rowNum = sheet.getLastRowNum() + 1;
|
||||
Row row = sheet.createRow(rowNum);
|
||||
Cell cell = row.createCell(0);
|
||||
cell.setCellValue(data);
|
||||
inputStream.close();
|
||||
FileOutputStream outputStream = new FileOutputStream(excelFilePath);
|
||||
workbook.write(outputStream);
|
||||
workbook.close();
|
||||
outputStream.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package Utilities;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.testng.IReporter;
|
||||
import org.testng.IResultMap;
|
||||
import org.testng.ISuite;
|
||||
import org.testng.ISuiteResult;
|
||||
import org.testng.ITestContext;
|
||||
import org.testng.ITestResult;
|
||||
import org.testng.xml.XmlSuite;
|
||||
|
||||
import com.relevantcodes.extentreports.ExtentReports;
|
||||
import com.relevantcodes.extentreports.ExtentTest;
|
||||
import com.relevantcodes.extentreports.LogStatus;
|
||||
|
||||
public class ExtentReporterNG implements IReporter {
|
||||
private ExtentReports extent;
|
||||
|
||||
public void generateReport(List<XmlSuite> xmlSuites, List<ISuite> suites,
|
||||
String outputDirectory) {
|
||||
extent = new ExtentReports(outputDirectory + File.separator
|
||||
+ "Extent.html", true);
|
||||
|
||||
for (ISuite suite : suites) {
|
||||
Map<String, ISuiteResult> result = suite.getResults();
|
||||
|
||||
for (ISuiteResult r : result.values()) {
|
||||
ITestContext context = r.getTestContext();
|
||||
|
||||
buildTestNodes(context.getPassedTests(), LogStatus.PASS);
|
||||
buildTestNodes(context.getFailedTests(), LogStatus.FAIL);
|
||||
buildTestNodes(context.getSkippedTests(), LogStatus.SKIP);
|
||||
}
|
||||
}
|
||||
|
||||
extent.flush();
|
||||
extent.close();
|
||||
}
|
||||
|
||||
private void buildTestNodes(IResultMap tests, LogStatus status) {
|
||||
ExtentTest test;
|
||||
|
||||
if (tests.size() > 0) {
|
||||
for (ITestResult result : tests.getAllResults()) {
|
||||
test = extent.startTest(result.getMethod().getMethodName());
|
||||
|
||||
test.setStartedTime(getTime(result.getStartMillis()));
|
||||
test.setEndedTime(getTime(result.getEndMillis()));
|
||||
|
||||
for (String group : result.getMethod().getGroups())
|
||||
test.assignCategory(group);
|
||||
|
||||
if (result.getThrowable() != null) {
|
||||
test.log(status, result.getThrowable());
|
||||
} else {
|
||||
test.log(status, "Test " + status.toString().toLowerCase()
|
||||
+ "ed");
|
||||
}
|
||||
|
||||
extent.endTest(test);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Date getTime(long millis) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(millis);
|
||||
return calendar.getTime();
|
||||
}}
|
|
@ -0,0 +1,61 @@
|
|||
package Utilities;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.PrintStream;
|
||||
import javax.mail.*;
|
||||
import javax.mail.internet.InternetAddress;
|
||||
import javax.mail.internet.MimeMessage;
|
||||
import java.util.Properties;
|
||||
|
||||
public class SeleniumTestUtils {
|
||||
|
||||
private static ByteArrayOutputStream baos;
|
||||
|
||||
// Step 1: Redirect Console Output
|
||||
public static void startConsoleCapture() {
|
||||
baos = new ByteArrayOutputStream();
|
||||
PrintStream ps = new PrintStream(baos);
|
||||
System.setOut(ps);
|
||||
}
|
||||
|
||||
// Step 2: Stop Console Capture and Get Captured Output
|
||||
public static String stopConsoleCapture() {
|
||||
System.setOut(System.out);
|
||||
return baos.toString();
|
||||
}
|
||||
|
||||
// Step 3: Send Email
|
||||
public static void sendEmail(String content) {
|
||||
final String username = "contentservice@aissel.com";
|
||||
final String password = "prfnfykatlfxqonu";
|
||||
|
||||
Properties props = new Properties();
|
||||
props.put("mail.smtp.auth", "true");
|
||||
props.put("mail.smtp.starttls.enable", "true");
|
||||
props.put("mail.smtp.host", "smtp.bizmail.yahoo.com");
|
||||
props.put("mail.smtp.port", "465");
|
||||
|
||||
Session session = Session.getInstance(props, new Authenticator() {
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(username, password);
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
Message message = new MimeMessage(session);
|
||||
message.setFrom(new InternetAddress(username));
|
||||
message.setRecipients(Message.RecipientType.TO, InternetAddress.parse("skakol050@gmail.com"));
|
||||
message.setSubject("Selenium Test Results");
|
||||
message.setText(content);
|
||||
|
||||
Transport.send(message);
|
||||
|
||||
System.out.println("Email sent successfully!");
|
||||
|
||||
} catch (MessagingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package Utilities;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
|
||||
public class readConfigFile {
|
||||
|
||||
Properties properties;
|
||||
|
||||
String path="/home/aissel/Git2/DICM_Count/src/test/resources/browser-config.properties";
|
||||
|
||||
public readConfigFile()
|
||||
{
|
||||
properties = new Properties();
|
||||
|
||||
try {
|
||||
FileInputStream fis = new FileInputStream(path);
|
||||
try {
|
||||
properties.load(fis);
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public String getURL()
|
||||
{
|
||||
String url=properties.getProperty("url");
|
||||
if(url!=null)
|
||||
return url;
|
||||
else
|
||||
throw new RuntimeException("url not specifaid in config file");
|
||||
}
|
||||
|
||||
public String getBROWSER()
|
||||
{
|
||||
String browser=properties.getProperty("browser");
|
||||
if(browser!=null)
|
||||
return browser;
|
||||
else
|
||||
throw new RuntimeException("browser not specifaid in config file");
|
||||
}
|
||||
|
||||
public String getUSERNAME()
|
||||
{
|
||||
String username=properties.getProperty("username");
|
||||
if(username!=null)
|
||||
return username;
|
||||
else
|
||||
throw new RuntimeException("username not specifaid in config file");
|
||||
}
|
||||
|
||||
public String getPASSWORD()
|
||||
{
|
||||
String password=properties.getProperty("password");
|
||||
if(password!=null)
|
||||
return password;
|
||||
else
|
||||
throw new RuntimeException("password not specifaid in config file");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,149 @@
|
|||
|
||||
# Set 1
|
||||
set1.url=https://cardio.konectar.io
|
||||
set1.username=abbottmgr@aissel.com
|
||||
set1.password=aisselK^21
|
||||
set1.options = Amulet KOL List,Piedmont Hospital,Sentara Norfolk,CRF Faculty,Cardiology,Neonatology,Cleveland Clinic,Swedish Medical Center \u2013 Cherry Hill,Vanderbilt Medical Center,New York University (NYU),North Shore University Hospital,Memorial Hermann,University of Kansas Medical Center,Mayo Clinic,MitraClip KOLs,St. Thomas West,CHD KOLs
|
||||
|
||||
# Set 2
|
||||
set2.url=https://cardio.konectar.io
|
||||
set2.username=Altatheramgr@aissel.com
|
||||
set2.password=aisselK^21
|
||||
set2.options = Cardiac Arrhythmia
|
||||
|
||||
# Set 3
|
||||
set3.url=https://cardio.konectar.io
|
||||
set3.username=bdtxmanager@aissel.com
|
||||
set3.password=aisselK^21
|
||||
set3.options = Solid Tumor
|
||||
|
||||
# Set 4
|
||||
set4.url=https://oralhealth.konectar.io
|
||||
set4.username=carestreammgr@aissel.com
|
||||
set4.password=aisselK^21
|
||||
set4.options = Oralhealth
|
||||
|
||||
# Set 5
|
||||
set5.url=https://cardio.konectar.io
|
||||
set5.username=chiesimanager@aissel.com
|
||||
set5.password=aisselK^21
|
||||
set5.options = Critical Care,Special Care
|
||||
|
||||
# Set 6
|
||||
set6.url=https://cardio.konectar.io
|
||||
set6.username=chiesitllmanager@aissel.com
|
||||
set6.password=aisselK^21
|
||||
set6.options = Critical Care,Special Care
|
||||
|
||||
# Set 7
|
||||
set7.url=https://cmsu.konectar.io
|
||||
set7.username=cmsumanager@aissel.com
|
||||
set7.password=aisselK^21
|
||||
set7.options = Medical Imaging
|
||||
|
||||
# Set 8
|
||||
set8.url=https://cardio.konectar.io
|
||||
set8.username=ferronova.mgr@aissel.com
|
||||
set8.password=aisselK^21
|
||||
set8.options = Tika_Ferronova
|
||||
|
||||
# Set 9
|
||||
set9.url=https://cardio.konectar.io
|
||||
set9.username=iteosmgr@aissel.com
|
||||
set9.password=aisselK^21
|
||||
set9.options = iTeos Trial HCPs,iTeos EX - US,Oncology
|
||||
|
||||
# Set 10
|
||||
set10.url=https://cardio.konectar.io
|
||||
set10.username=ipsenmanager@aissel.com
|
||||
set10.password=aisselK^21
|
||||
set10.options = Precision Oncology
|
||||
|
||||
# Set 11
|
||||
set11.url=https://oralhealth.konectar.io
|
||||
set11.username=ivoclarmgr@aissel.com
|
||||
set11.password=aisselK^21
|
||||
set11.options = Restorartive Dentistry,Secondary List,Oralhealth_EU Staging,Oralhealth
|
||||
|
||||
# Set 12
|
||||
set12.url=https://cardio.konectar.io
|
||||
set12.username=MiMedxproductionmgr@aissel.com
|
||||
set12.password=aisselK^21
|
||||
set12.options = Tika_MiMedx
|
||||
|
||||
# Set 13
|
||||
set13.url=https://cardio.konectar.io
|
||||
set13.username=merusmgr@aissel.com
|
||||
set13.password=aisselK^21
|
||||
set13.options = Oncology
|
||||
|
||||
# Set 14
|
||||
set14.url=https://cardio.konectar.io
|
||||
set14.username=nateramanager@aissel.com
|
||||
set14.password=aisselK^21
|
||||
set14.options = Hepatology,Cardiology,Nephrology,Womens Health,Pulmonology
|
||||
|
||||
# Set 15
|
||||
set15.url=https://gastro.konectar.io
|
||||
set15.username=nestlemgr@aissel.com
|
||||
set15.password=aisselK^21
|
||||
set15.options = Gastroenterology,EPI and C-Diff NP_PAs
|
||||
|
||||
# Set 16
|
||||
set16.url=https://nephro.konectar.io
|
||||
set16.username=nipromedicals@aissel.com
|
||||
set16.password=aisselK^21
|
||||
set16.options = Surgery & Vascular Access,Nephrology,Cardiology
|
||||
|
||||
# Set 17
|
||||
set17.url=https://onco.konectar.io
|
||||
set17.username=novartismgr@aissel.com
|
||||
set17.password=aisselK^21
|
||||
set17.options = Oncology
|
||||
|
||||
# Set 18
|
||||
set18.url=https://opko.konectar.io
|
||||
set18.username=opkostaging@aissel.com
|
||||
set18.password=aisselK^21
|
||||
set18.options = Nephrology
|
||||
|
||||
# Set 19
|
||||
set19.url=https://cardio.konectar.io
|
||||
set19.username=sareptamgr@aissel.com
|
||||
set19.password=aisselK^21
|
||||
set19.options = DMD
|
||||
|
||||
# Set 20
|
||||
set20.url=https://cardio.konectar.io
|
||||
set20.username=harbingermgr@aissel.com
|
||||
set20.password=aisselK^21
|
||||
set20.options = Cancer Screening
|
||||
|
||||
# Set 21
|
||||
set21.url=https://Syros.konectar.io
|
||||
set21.username=syrosmanager@aissel.com
|
||||
set21.password=aisselK^21
|
||||
set21.options = Hematology/Oncology
|
||||
|
||||
# Set 22
|
||||
set22.url=https://tidesmedical.konectar.io
|
||||
set22.username=tidesmanager@aissel.com
|
||||
set22.password=aisselK^21
|
||||
set22.options = Wound Management
|
||||
|
||||
# Set 23
|
||||
set23.url=https://cardio.konectar.io
|
||||
set23.username=tika_manager@aissel.com
|
||||
set23.password=aisselK^21
|
||||
set23.options = Integra_Demo,Tika_Adolescent Psychiatry_Demo,Oncology,Tika_Eisai_Demo,Balt Group_ Demo,Mi_Medx_Demo,Reata_Demo,Alpine Immune_Demo,Deciphera_Demo,TikaMobile-Demo,Cardiometabolic Experts
|
||||
|
||||
# Set 24
|
||||
set24.url=https://cardio.konectar.io
|
||||
set24.username=veramanager@aissel.com
|
||||
set24.password=aisselK^21
|
||||
set24.options = Iga Nephropathy,IgAN-Vera
|
||||
|
||||
# Set 25
|
||||
set25.url=https://hills.konectar.io/nosso
|
||||
set25.username=cw.samanths@aissel.com
|
||||
set25.password=Aissel@123
|
|
@ -0,0 +1,10 @@
|
|||
# extent-config.properties
|
||||
|
||||
# Report path
|
||||
reportPath=./Reports/DCIM_Counts_Check.html
|
||||
|
||||
# Extent Report configuration
|
||||
extent.config.reportName=Konectar Test Automation Report
|
||||
extent.config.documentTitle=Test Results
|
||||
extent.config.reportTitle=Test Execution Report
|
||||
extent.config.theme=dark
|
|
@ -0,0 +1,84 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>TestNG: Default test</title>
|
||||
<link href="../testng.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../my-testng.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<style type="text/css">
|
||||
.log { display: none;}
|
||||
.stack-trace { display: none;}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function flip(e) {
|
||||
current = e.style.display;
|
||||
if (current == 'block') {
|
||||
e.style.display = 'none';
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
e.style.display = 'block';
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
function toggleBox(szDivId, elem, msg1, msg2)
|
||||
{
|
||||
var res = -1; if (document.getElementById) {
|
||||
res = flip(document.getElementById(szDivId));
|
||||
}
|
||||
else if (document.all) {
|
||||
// this is the way old msie versions work
|
||||
res = flip(document.all[szDivId]);
|
||||
}
|
||||
if(elem) {
|
||||
if(res == 0) elem.innerHTML = msg1; else elem.innerHTML = msg2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function toggleAllBoxes() {
|
||||
if (document.getElementsByTagName) {
|
||||
d = document.getElementsByTagName('div');
|
||||
for (i = 0; i < d.length; i++) {
|
||||
if (d[i].className == 'log') {
|
||||
flip(d[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h2 align='center'>Default test</h2><table border='1' align="center">
|
||||
<tr>
|
||||
<td>Tests passed/Failed/Skipped:</td><td>1/0/0</td>
|
||||
</tr><tr>
|
||||
<td>Started on:</td><td>Mon May 27 14:26:16 IST 2024</td>
|
||||
</tr>
|
||||
<tr><td>Total time:</td><td>5679 seconds (5679197 ms)</td>
|
||||
</tr><tr>
|
||||
<td>Included groups:</td><td></td>
|
||||
</tr><tr>
|
||||
<td>Excluded groups:</td><td></td>
|
||||
</tr>
|
||||
</table><p/>
|
||||
<small><i>(Hover the method name to see the test class name)</i></small><p/>
|
||||
<table width='100%' border='1' class='invocation-passed'>
|
||||
<tr><td colspan='4' align='center'><b>PASSED TESTS</b></td></tr>
|
||||
<tr><td><b>Test method</b></td>
|
||||
<td width="30%"><b>Exception</b></td>
|
||||
<td width="10%"><b>Time (seconds)</b></td>
|
||||
<td><b>Instance</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td title='Generic.GenericTest.performTestForSet()'><b>performTestForSet</b><br>Test class: Generic.GenericTest</td>
|
||||
<td></td>
|
||||
<td>5674</td>
|
||||
<td>Generic.GenericTest@6cb107fd</td></tr>
|
||||
</table><p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated by org.testng.reporters.JUnitXMLReporter -->
|
||||
<testsuite ignored="0" hostname="Shashikuamr" failures="0" tests="1" name="Default test" time="5679.197" errors="0" timestamp="27 May 2024 10:30:56 GMT">
|
||||
<testcase classname="Generic.GenericTest" name="performTestForSet" time="5674.442"/>
|
||||
</testsuite> <!-- Default test -->
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
|
||||
<suite name="Failed suite [Default suite]" guice-stage="DEVELOPMENT">
|
||||
<test thread-count="5" name="Default test(failed)">
|
||||
<classes>
|
||||
<class name="Generic.GenericTest">
|
||||
<methods>
|
||||
<include name="redirectConsoleOutputBeforeTest"/>
|
||||
<include name="setUp"/>
|
||||
<include name="performTestForSet"/>
|
||||
<include name="tearDown"/>
|
||||
<include name="restoreConsoleOutputAfterTest"/>
|
||||
</methods>
|
||||
</class> <!-- Generic.GenericTest -->
|
||||
</classes>
|
||||
</test> <!-- Default test(failed) -->
|
||||
</suite> <!-- Failed suite [Default suite] -->
|
|
@ -0,0 +1,84 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>TestNG: Test</title>
|
||||
<link href="../testng.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../my-testng.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<style type="text/css">
|
||||
.log { display: none;}
|
||||
.stack-trace { display: none;}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function flip(e) {
|
||||
current = e.style.display;
|
||||
if (current == 'block') {
|
||||
e.style.display = 'none';
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
e.style.display = 'block';
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
function toggleBox(szDivId, elem, msg1, msg2)
|
||||
{
|
||||
var res = -1; if (document.getElementById) {
|
||||
res = flip(document.getElementById(szDivId));
|
||||
}
|
||||
else if (document.all) {
|
||||
// this is the way old msie versions work
|
||||
res = flip(document.all[szDivId]);
|
||||
}
|
||||
if(elem) {
|
||||
if(res == 0) elem.innerHTML = msg1; else elem.innerHTML = msg2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function toggleAllBoxes() {
|
||||
if (document.getElementsByTagName) {
|
||||
d = document.getElementsByTagName('div');
|
||||
for (i = 0; i < d.length; i++) {
|
||||
if (d[i].className == 'log') {
|
||||
flip(d[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h2 align='center'>Test</h2><table border='1' align="center">
|
||||
<tr>
|
||||
<td>Tests passed/Failed/Skipped:</td><td>1/0/0</td>
|
||||
</tr><tr>
|
||||
<td>Started on:</td><td>Mon Mar 04 17:47:19 IST 2024</td>
|
||||
</tr>
|
||||
<tr><td>Total time:</td><td>5 seconds (5553 ms)</td>
|
||||
</tr><tr>
|
||||
<td>Included groups:</td><td></td>
|
||||
</tr><tr>
|
||||
<td>Excluded groups:</td><td></td>
|
||||
</tr>
|
||||
</table><p/>
|
||||
<small><i>(Hover the method name to see the test class name)</i></small><p/>
|
||||
<table width='100%' border='1' class='invocation-passed'>
|
||||
<tr><td colspan='4' align='center'><b>PASSED TESTS</b></td></tr>
|
||||
<tr><td><b>Test method</b></td>
|
||||
<td width="30%"><b>Exception</b></td>
|
||||
<td width="10%"><b>Time (seconds)</b></td>
|
||||
<td><b>Instance</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td title='Generic.GenericTest.performTestForSet()'><b>performTestForSet</b><br>Test class: Generic.GenericTest</td>
|
||||
<td></td>
|
||||
<td>2</td>
|
||||
<td>Generic.GenericTest@6933b6c6</td></tr>
|
||||
</table><p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated by org.testng.reporters.JUnitXMLReporter -->
|
||||
<testsuite ignored="0" hostname="Shashikuamr" failures="0" tests="1" name="Test" time="5.553" errors="0" timestamp="04 Mar 2024 12:17:24 GMT">
|
||||
<testcase classname="Generic.GenericTest" name="performTestForSet" time="2.187"/>
|
||||
</testsuite> <!-- Test -->
|
Binary file not shown.
After Width: | Height: | Size: 356 B |
Binary file not shown.
After Width: | Height: | Size: 157 B |
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
||||
<title>TestNG Report</title>
|
||||
<style type="text/css">table {margin-bottom:10px;border-collapse:collapse;empty-cells:show}th,td {border:1px solid #009;padding:.25em .5em}th {vertical-align:bottom}td {vertical-align:top}table a {font-weight:bold}.stripe td {background-color: #E6EBF9}.num {text-align:right}.passedodd td {background-color: #3F3}.passedeven td {background-color: #0A0}.skippedodd td {background-color: #DDD}.skippedeven td {background-color: #CCC}.failedodd td,.attn {background-color: #F33}.failedeven td,.stripe .attn {background-color: #D00}.stacktrace {white-space:pre;font-family:monospace}.totop {font-size:85%;text-align:center;border-bottom:2px solid #000}.invisible {display:none}</style>
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<tr><th>Test</th><th># Passed</th><th># Skipped</th><th># Failed</th><th>Time (ms)</th><th>Included Groups</th><th>Excluded Groups</th></tr>
|
||||
<tr><th colspan="7">Default suite</th></tr>
|
||||
<tr><td><a href="#t0">Default test</a></td><td class="num">1</td><td class="num">0</td><td class="num">0</td><td class="num">5,679,197</td><td></td><td></td></tr>
|
||||
</table>
|
||||
<table id='summary'><thead><tr><th>Class</th><th>Method</th><th>Start</th><th>Time (ms)</th></tr></thead><tbody><tr><th colspan="4">Default suite</th></tr></tbody><tbody id="t0"><tr><th colspan="4">Default test — passed</th></tr><tr class="passedeven"><td rowspan="1">Generic.GenericTest</td><td><a href="#m0">performTestForSet</a></td><td rowspan="1">1716800181062</td><td rowspan="1">5674442</td></tr></tbody>
|
||||
</table>
|
||||
<h2>Default test</h2><h3 id="m0">Generic.GenericTest#performTestForSet</h3><table class="result"><tr><th class="invisible"/></tr></table><p class="totop"><a href="#summary">back to summary</a></p>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
After Width: | Height: | Size: 977 B |
|
@ -0,0 +1,248 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>TestNG reports</title>
|
||||
|
||||
<link type="text/css" href="testng-reports.css" rel="stylesheet" />
|
||||
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
|
||||
<script type="text/javascript" src="testng-reports.js"></script>
|
||||
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
|
||||
<script type='text/javascript'>
|
||||
google.load('visualization', '1', {packages:['table']});
|
||||
google.setOnLoadCallback(drawTable);
|
||||
var suiteTableInitFunctions = new Array();
|
||||
var suiteTableData = new Array();
|
||||
</script>
|
||||
<!--
|
||||
<script type="text/javascript" src="jquery-ui/js/jquery-ui-1.8.16.custom.min.js"></script>
|
||||
-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="top-banner-root">
|
||||
<span class="top-banner-title-font">Test results</span>
|
||||
<br/>
|
||||
<span class="top-banner-font-1">1 suite</span>
|
||||
</div> <!-- top-banner-root -->
|
||||
<div class="navigator-root">
|
||||
<div class="navigator-suite-header">
|
||||
<span>All suites</span>
|
||||
<a href="#" title="Collapse/expand all the suites" class="collapse-all-link">
|
||||
<img src="collapseall.gif" class="collapse-all-icon">
|
||||
</img> <!-- collapse-all-icon -->
|
||||
</a> <!-- collapse-all-link -->
|
||||
</div> <!-- navigator-suite-header -->
|
||||
<div class="suite">
|
||||
<div class="rounded-window">
|
||||
<div class="suite-header light-rounded-window-top">
|
||||
<a href="#" panel-name="suite-Default_suite" class="navigator-link">
|
||||
<span class="suite-name border-passed">Default suite</span>
|
||||
</a> <!-- navigator-link -->
|
||||
</div> <!-- suite-header light-rounded-window-top -->
|
||||
<div class="navigator-suite-content">
|
||||
<div class="suite-section-title">
|
||||
<span>Info</span>
|
||||
</div> <!-- suite-section-title -->
|
||||
<div class="suite-section-content">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#" panel-name="test-xml-Default_suite" class="navigator-link ">
|
||||
<span>testng-customsuite.xml</span>
|
||||
</a> <!-- navigator-link -->
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" panel-name="testlist-Default_suite" class="navigator-link ">
|
||||
<span class="test-stats">1 test</span>
|
||||
</a> <!-- navigator-link -->
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" panel-name="group-Default_suite" class="navigator-link ">
|
||||
<span>0 groups</span>
|
||||
</a> <!-- navigator-link -->
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" panel-name="times-Default_suite" class="navigator-link ">
|
||||
<span>Times</span>
|
||||
</a> <!-- navigator-link -->
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" panel-name="reporter-Default_suite" class="navigator-link ">
|
||||
<span>Reporter output</span>
|
||||
</a> <!-- navigator-link -->
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" panel-name="ignored-methods-Default_suite" class="navigator-link ">
|
||||
<span>Ignored methods</span>
|
||||
</a> <!-- navigator-link -->
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" panel-name="chronological-Default_suite" class="navigator-link ">
|
||||
<span>Chronological view</span>
|
||||
</a> <!-- navigator-link -->
|
||||
</li>
|
||||
</ul>
|
||||
</div> <!-- suite-section-content -->
|
||||
<div class="result-section">
|
||||
<div class="suite-section-title">
|
||||
<span>Results</span>
|
||||
</div> <!-- suite-section-title -->
|
||||
<div class="suite-section-content">
|
||||
<ul>
|
||||
<li>
|
||||
<span class="method-stats">1 method, 1 passed</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="method-list-title passed">Passed methods</span>
|
||||
<span class="show-or-hide-methods passed">
|
||||
<a href="#" panel-name="suite-Default_suite" class="hide-methods passed suite-Default_suite"> (hide)</a> <!-- hide-methods passed suite-Default_suite -->
|
||||
<a href="#" panel-name="suite-Default_suite" class="show-methods passed suite-Default_suite"> (show)</a> <!-- show-methods passed suite-Default_suite -->
|
||||
</span>
|
||||
<div class="method-list-content passed suite-Default_suite">
|
||||
<span>
|
||||
<img src="passed.png" width="3%"/>
|
||||
<a href="#" panel-name="suite-Default_suite" title="Generic.GenericTest" class="method navigator-link" hash-for-method="performTestForSet">performTestForSet</a> <!-- method navigator-link -->
|
||||
</span>
|
||||
<br/>
|
||||
</div> <!-- method-list-content passed suite-Default_suite -->
|
||||
</li>
|
||||
</ul>
|
||||
</div> <!-- suite-section-content -->
|
||||
</div> <!-- result-section -->
|
||||
</div> <!-- navigator-suite-content -->
|
||||
</div> <!-- rounded-window -->
|
||||
</div> <!-- suite -->
|
||||
</div> <!-- navigator-root -->
|
||||
<div class="wrapper">
|
||||
<div class="main-panel-root">
|
||||
<div panel-name="suite-Default_suite" class="panel Default_suite">
|
||||
<div class="suite-Default_suite-class-passed">
|
||||
<div class="main-panel-header rounded-window-top">
|
||||
<img src="passed.png"/>
|
||||
<span class="class-name">Generic.GenericTest</span>
|
||||
</div> <!-- main-panel-header rounded-window-top -->
|
||||
<div class="main-panel-content rounded-window-bottom">
|
||||
<div class="method">
|
||||
<div class="method-content">
|
||||
<a name="performTestForSet">
|
||||
</a> <!-- performTestForSet -->
|
||||
<span class="method-name">performTestForSet</span>
|
||||
</div> <!-- method-content -->
|
||||
</div> <!-- method -->
|
||||
</div> <!-- main-panel-content rounded-window-bottom -->
|
||||
</div> <!-- suite-Default_suite-class-passed -->
|
||||
</div> <!-- panel Default_suite -->
|
||||
<div panel-name="test-xml-Default_suite" class="panel">
|
||||
<div class="main-panel-header rounded-window-top">
|
||||
<span class="header-content">/tmp/testng-eclipse-1409398301/testng-customsuite.xml</span>
|
||||
</div> <!-- main-panel-header rounded-window-top -->
|
||||
<div class="main-panel-content rounded-window-bottom">
|
||||
<pre>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
|
||||
<suite name="Default suite" guice-stage="DEVELOPMENT">
|
||||
<test thread-count="5" name="Default test" verbose="2">
|
||||
<classes>
|
||||
<class name="Generic.GenericTest"/>
|
||||
</classes>
|
||||
</test> <!-- Default test -->
|
||||
</suite> <!-- Default suite -->
|
||||
</pre>
|
||||
</div> <!-- main-panel-content rounded-window-bottom -->
|
||||
</div> <!-- panel -->
|
||||
<div panel-name="testlist-Default_suite" class="panel">
|
||||
<div class="main-panel-header rounded-window-top">
|
||||
<span class="header-content">Tests for Default suite</span>
|
||||
</div> <!-- main-panel-header rounded-window-top -->
|
||||
<div class="main-panel-content rounded-window-bottom">
|
||||
<ul>
|
||||
<li>
|
||||
<span class="test-name">Default test (1 class)</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div> <!-- main-panel-content rounded-window-bottom -->
|
||||
</div> <!-- panel -->
|
||||
<div panel-name="group-Default_suite" class="panel">
|
||||
<div class="main-panel-header rounded-window-top">
|
||||
<span class="header-content">Groups for Default suite</span>
|
||||
</div> <!-- main-panel-header rounded-window-top -->
|
||||
<div class="main-panel-content rounded-window-bottom">
|
||||
</div> <!-- main-panel-content rounded-window-bottom -->
|
||||
</div> <!-- panel -->
|
||||
<div panel-name="times-Default_suite" class="panel">
|
||||
<div class="main-panel-header rounded-window-top">
|
||||
<span class="header-content">Times for Default suite</span>
|
||||
</div> <!-- main-panel-header rounded-window-top -->
|
||||
<div class="main-panel-content rounded-window-bottom">
|
||||
<div class="times-div">
|
||||
<script type="text/javascript">
|
||||
suiteTableInitFunctions.push('tableData_Default_suite');
|
||||
function tableData_Default_suite() {
|
||||
var data = new google.visualization.DataTable();
|
||||
data.addColumn('number', 'Number');
|
||||
data.addColumn('string', 'Method');
|
||||
data.addColumn('string', 'Class');
|
||||
data.addColumn('number', 'Time (ms)');
|
||||
data.addRows(1);
|
||||
data.setCell(0, 0, 0)
|
||||
data.setCell(0, 1, 'performTestForSet')
|
||||
data.setCell(0, 2, 'Generic.GenericTest')
|
||||
data.setCell(0, 3, 5674442);
|
||||
window.suiteTableData['Default_suite']= { tableData: data, tableDiv: 'times-div-Default_suite'}
|
||||
return data;
|
||||
}
|
||||
</script>
|
||||
<span class="suite-total-time">Total running time: 1 hours</span>
|
||||
<div id="times-div-Default_suite">
|
||||
</div> <!-- times-div-Default_suite -->
|
||||
</div> <!-- times-div -->
|
||||
</div> <!-- main-panel-content rounded-window-bottom -->
|
||||
</div> <!-- panel -->
|
||||
<div panel-name="reporter-Default_suite" class="panel">
|
||||
<div class="main-panel-header rounded-window-top">
|
||||
<span class="header-content">Reporter output for Default suite</span>
|
||||
</div> <!-- main-panel-header rounded-window-top -->
|
||||
<div class="main-panel-content rounded-window-bottom">
|
||||
</div> <!-- main-panel-content rounded-window-bottom -->
|
||||
</div> <!-- panel -->
|
||||
<div panel-name="ignored-methods-Default_suite" class="panel">
|
||||
<div class="main-panel-header rounded-window-top">
|
||||
<span class="header-content">0 ignored methods</span>
|
||||
</div> <!-- main-panel-header rounded-window-top -->
|
||||
<div class="main-panel-content rounded-window-bottom">
|
||||
</div> <!-- main-panel-content rounded-window-bottom -->
|
||||
</div> <!-- panel -->
|
||||
<div panel-name="chronological-Default_suite" class="panel">
|
||||
<div class="main-panel-header rounded-window-top">
|
||||
<span class="header-content">Methods in chronological order</span>
|
||||
</div> <!-- main-panel-header rounded-window-top -->
|
||||
<div class="main-panel-content rounded-window-bottom">
|
||||
<div class="chronological-class">
|
||||
<div class="chronological-class-name">Generic.GenericTest</div> <!-- chronological-class-name -->
|
||||
<div class="configuration-class before">
|
||||
<span class="method-name">setUp</span>
|
||||
<span class="method-start">0 ms</span>
|
||||
</div> <!-- configuration-class before -->
|
||||
<div class="configuration-method before">
|
||||
<span class="method-name">redirectConsoleOutputBeforeTest</span>
|
||||
<span class="method-start">4279 ms</span>
|
||||
</div> <!-- configuration-method before -->
|
||||
<div class="test-method">
|
||||
<span class="method-name">performTestForSet</span>
|
||||
<span class="method-start">4280 ms</span>
|
||||
</div> <!-- test-method -->
|
||||
<div class="configuration-method after">
|
||||
<span class="method-name">restoreConsoleOutputAfterTest</span>
|
||||
<span class="method-start">5678727 ms</span>
|
||||
</div> <!-- configuration-method after -->
|
||||
<div class="configuration-class after">
|
||||
<span class="method-name">tearDown</span>
|
||||
<span class="method-start">5678743 ms</span>
|
||||
</div> <!-- configuration-class after -->
|
||||
</div> <!-- main-panel-content rounded-window-bottom -->
|
||||
</div> <!-- panel -->
|
||||
</div> <!-- main-panel-root -->
|
||||
</div> <!-- wrapper -->
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated by org.testng.reporters.JUnitReportReporter -->
|
||||
<testsuite hostname="Shashikuamr" failures="0" tests="1" name="Generic.GenericTest" time="5674.444" errors="0" timestamp="27 May 2024 10:30:56 GMT" skipped="0">
|
||||
<testcase classname="Generic.GenericTest" name="performTestForSet" time="5674.444"/>
|
||||
</testsuite> <!-- Generic.GenericTest -->
|
Binary file not shown.
After Width: | Height: | Size: 352 B |
|
@ -0,0 +1 @@
|
|||
[SuiteResult context=Default test]
|
|
@ -0,0 +1,44 @@
|
|||
<table border='1'>
|
||||
<tr>
|
||||
<th>Class name</th>
|
||||
<th>Method name</th>
|
||||
<th>Groups</th>
|
||||
</tr><tr>
|
||||
<td>Generic.GenericTest</td>
|
||||
<td> </td><td> </td></tr>
|
||||
<tr>
|
||||
<td align='center' colspan='3'>@Test</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>performTestForSet</td>
|
||||
<td> </td></tr>
|
||||
<tr>
|
||||
<td align='center' colspan='3'>@BeforeClass</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>setUp</td>
|
||||
<td> </td></tr>
|
||||
<tr>
|
||||
<td align='center' colspan='3'>@BeforeMethod</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>redirectConsoleOutputBeforeTest</td>
|
||||
<td> </td></tr>
|
||||
<tr>
|
||||
<td align='center' colspan='3'>@AfterMethod</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>restoreConsoleOutputAfterTest</td>
|
||||
<td> </td></tr>
|
||||
<tr>
|
||||
<td align='center' colspan='3'>@AfterClass</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>tearDown</td>
|
||||
<td> </td></tr>
|
||||
</table>
|
|
@ -0,0 +1 @@
|
|||
<h2>Groups used for this test run</h2>
|
|
@ -0,0 +1,6 @@
|
|||
<html><head><title>Results for Default suite</title></head>
|
||||
<frameset cols="26%,74%">
|
||||
<frame src="toc.html" name="navFrame">
|
||||
<frame src="main.html" name="mainFrame">
|
||||
</frameset>
|
||||
</html>
|
|
@ -0,0 +1,2 @@
|
|||
<html><head><title>Results for Default suite</title></head>
|
||||
<body>Select a result on the left-hand pane.</body></html>
|
|
@ -0,0 +1,14 @@
|
|||
<h2>Methods run, sorted chronologically</h2><h3>>> means before, << means after</h3><p/><br/><em>Default suite</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/>
|
||||
<table border="1">
|
||||
<tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr>
|
||||
<tr bgcolor="ad66d2"> <td>24/05/27 14:26:21</td> <td>0</td> <td> </td><td> </td><td> </td><td> </td><td> </td><td title="GenericTest.performTestForSet()[pri:0, instance:Generic.GenericTest@6cb107fd]">performTestForSet</td>
|
||||
<td>main@1571798597</td> <td></td> </tr>
|
||||
<tr bgcolor="ad66d2"> <td>24/05/27 14:26:21</td> <td>0</td> <td> </td><td> </td><td> </td><td> </td><td title=">>GenericTest.redirectConsoleOutputBeforeTest()[pri:0, instance:Generic.GenericTest@6cb107fd]">>>redirectConsoleOutputBeforeTest</td>
|
||||
<td> </td> <td>main@1571798597</td> <td></td> </tr>
|
||||
<tr bgcolor="ad66d2"> <td>24/05/27 16:00:55</td> <td>5674447</td> <td> </td><td> </td><td> </td><td> </td><td title="<<GenericTest.restoreConsoleOutputAfterTest()[pri:0, instance:Generic.GenericTest@6cb107fd]"><<restoreConsoleOutputAfterTest</td>
|
||||
<td> </td> <td>main@1571798597</td> <td></td> </tr>
|
||||
<tr bgcolor="ad66d2"> <td>24/05/27 14:26:16</td> <td>-4275</td> <td> </td><td> </td><td title=">>GenericTest.setUp()[pri:0, instance:Generic.GenericTest@6cb107fd]">>>setUp</td>
|
||||
<td> </td><td> </td><td> </td> <td>main@1571798597</td> <td></td> </tr>
|
||||
<tr bgcolor="ad66d2"> <td>24/05/27 16:00:55</td> <td>5674463</td> <td> </td><td> </td><td title="<<GenericTest.tearDown()[pri:0, instance:Generic.GenericTest@6cb107fd]"><<tearDown</td>
|
||||
<td> </td><td> </td><td> </td> <td>main@1571798597</td> <td></td> </tr>
|
||||
</table>
|
|
@ -0,0 +1,2 @@
|
|||
<h2>Methods that were not run</h2><table>
|
||||
</table>
|
|
@ -0,0 +1,14 @@
|
|||
<h2>Methods run, sorted chronologically</h2><h3>>> means before, << means after</h3><p/><br/><em>Default suite</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/>
|
||||
<table border="1">
|
||||
<tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr>
|
||||
<tr bgcolor="ad66d2"> <td>24/05/27 14:26:16</td> <td>0</td> <td> </td><td> </td><td title=">>GenericTest.setUp()[pri:0, instance:Generic.GenericTest@6cb107fd]">>>setUp</td>
|
||||
<td> </td><td> </td><td> </td> <td>main@1571798597</td> <td></td> </tr>
|
||||
<tr bgcolor="ad66d2"> <td>24/05/27 14:26:21</td> <td>4275</td> <td> </td><td> </td><td> </td><td> </td><td title=">>GenericTest.redirectConsoleOutputBeforeTest()[pri:0, instance:Generic.GenericTest@6cb107fd]">>>redirectConsoleOutputBeforeTest</td>
|
||||
<td> </td> <td>main@1571798597</td> <td></td> </tr>
|
||||
<tr bgcolor="ad66d2"> <td>24/05/27 14:26:21</td> <td>4275</td> <td> </td><td> </td><td> </td><td> </td><td> </td><td title="GenericTest.performTestForSet()[pri:0, instance:Generic.GenericTest@6cb107fd]">performTestForSet</td>
|
||||
<td>main@1571798597</td> <td></td> </tr>
|
||||
<tr bgcolor="ad66d2"> <td>24/05/27 16:00:55</td> <td>5678722</td> <td> </td><td> </td><td> </td><td> </td><td title="<<GenericTest.restoreConsoleOutputAfterTest()[pri:0, instance:Generic.GenericTest@6cb107fd]"><<restoreConsoleOutputAfterTest</td>
|
||||
<td> </td> <td>main@1571798597</td> <td></td> </tr>
|
||||
<tr bgcolor="ad66d2"> <td>24/05/27 16:00:55</td> <td>5678738</td> <td> </td><td> </td><td title="<<GenericTest.tearDown()[pri:0, instance:Generic.GenericTest@6cb107fd]"><<tearDown</td>
|
||||
<td> </td><td> </td><td> </td> <td>main@1571798597</td> <td></td> </tr>
|
||||
</table>
|
|
@ -0,0 +1 @@
|
|||
<h2>Reporter output</h2><table></table>
|
|
@ -0,0 +1 @@
|
|||
<html><head><title>testng.xml for Default suite</title></head><body><tt><?xml version="1.0" encoding="UTF-8"?><br/><!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"><br/><suite name="Default suite" guice-stage="DEVELOPMENT"><br/> <test thread-count="5" name="Default test" verbose="2"><br/> <classes><br/> <class name="Generic.GenericTest"/><br/> </classes><br/> </test> <!-- Default test --><br/></suite> <!-- Default suite --><br/></tt></body></html>
|
|
@ -0,0 +1,30 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Results for Default suite</title>
|
||||
<link href="../testng.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../my-testng.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h3><p align="center">Results for<br/><em>Default suite</em></p></h3>
|
||||
<table border='1' width='100%'>
|
||||
<tr valign='top'>
|
||||
<td>1 test</td>
|
||||
<td><a target='mainFrame' href='classes.html'>1 class</a></td>
|
||||
<td>1 method:<br/>
|
||||
<a target='mainFrame' href='methods.html'>chronological</a><br/>
|
||||
<a target='mainFrame' href='methods-alphabetical.html'>alphabetical</a><br/>
|
||||
<a target='mainFrame' href='methods-not-run.html'>not run (0)</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a target='mainFrame' href='groups.html'>0 group</a></td>
|
||||
<td><a target='mainFrame' href='reporter-output.html'>reporter output</a></td>
|
||||
<td><a target='mainFrame' href='testng.xml.html'>testng.xml</a></td>
|
||||
</tr></table>
|
||||
<table width='100%' class='test-passed'>
|
||||
<tr><td>
|
||||
<table style='width: 100%'><tr><td valign='top'>Default test (1/0/0)</td><td valign='top' align='right'>
|
||||
<a href='Default test.html' target='mainFrame'>Results</a>
|
||||
</td></tr></table>
|
||||
</td></tr><p/>
|
||||
</table>
|
||||
</body></html>
|
|
@ -0,0 +1 @@
|
|||
[SuiteResult context=Test]
|
|
@ -0,0 +1,44 @@
|
|||
<table border='1'>
|
||||
<tr>
|
||||
<th>Class name</th>
|
||||
<th>Method name</th>
|
||||
<th>Groups</th>
|
||||
</tr><tr>
|
||||
<td>Generic.GenericTest</td>
|
||||
<td> </td><td> </td></tr>
|
||||
<tr>
|
||||
<td align='center' colspan='3'>@Test</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>performTestForSet</td>
|
||||
<td> </td></tr>
|
||||
<tr>
|
||||
<td align='center' colspan='3'>@BeforeClass</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>setUp</td>
|
||||
<td> </td></tr>
|
||||
<tr>
|
||||
<td align='center' colspan='3'>@BeforeMethod</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>redirectConsoleOutputBeforeTest</td>
|
||||
<td> </td></tr>
|
||||
<tr>
|
||||
<td align='center' colspan='3'>@AfterMethod</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>restoreConsoleOutputAfterTest</td>
|
||||
<td> </td></tr>
|
||||
<tr>
|
||||
<td align='center' colspan='3'>@AfterClass</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>tearDown</td>
|
||||
<td> </td></tr>
|
||||
</table>
|
|
@ -0,0 +1 @@
|
|||
<h2>Groups used for this test run</h2>
|
|
@ -0,0 +1,6 @@
|
|||
<html><head><title>Results for Suite</title></head>
|
||||
<frameset cols="26%,74%">
|
||||
<frame src="toc.html" name="navFrame">
|
||||
<frame src="main.html" name="mainFrame">
|
||||
</frameset>
|
||||
</html>
|
|
@ -0,0 +1,2 @@
|
|||
<html><head><title>Results for Suite</title></head>
|
||||
<body>Select a result on the left-hand pane.</body></html>
|
|
@ -0,0 +1,14 @@
|
|||
<h2>Methods run, sorted chronologically</h2><h3>>> means before, << means after</h3><p/><br/><em>Suite</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/>
|
||||
<table border="1">
|
||||
<tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr>
|
||||
<tr bgcolor="86659f"> <td>24/03/04 17:47:20</td> <td>0</td> <td> </td><td> </td><td> </td><td> </td><td> </td><td title="GenericTest.performTestForSet()[pri:0, instance:Generic.GenericTest@6933b6c6]">performTestForSet</td>
|
||||
<td>main@2059572982</td> <td></td> </tr>
|
||||
<tr bgcolor="86659f"> <td>24/03/04 17:47:20</td> <td>-1</td> <td> </td><td> </td><td> </td><td> </td><td title=">>GenericTest.redirectConsoleOutputBeforeTest()[pri:0, instance:Generic.GenericTest@6933b6c6]">>>redirectConsoleOutputBeforeTest</td>
|
||||
<td> </td> <td>main@2059572982</td> <td></td> </tr>
|
||||
<tr bgcolor="86659f"> <td>24/03/04 17:47:23</td> <td>2192</td> <td> </td><td> </td><td> </td><td> </td><td title="<<GenericTest.restoreConsoleOutputAfterTest()[pri:0, instance:Generic.GenericTest@6933b6c6]"><<restoreConsoleOutputAfterTest</td>
|
||||
<td> </td> <td>main@2059572982</td> <td></td> </tr>
|
||||
<tr bgcolor="86659f"> <td>24/03/04 17:47:19</td> <td>-1508</td> <td> </td><td> </td><td title=">>GenericTest.setUp()[pri:0, instance:Generic.GenericTest@6933b6c6]">>>setUp</td>
|
||||
<td> </td><td> </td><td> </td> <td>main@2059572982</td> <td></td> </tr>
|
||||
<tr bgcolor="86659f"> <td>24/03/04 17:47:23</td> <td>2193</td> <td> </td><td> </td><td title="<<GenericTest.tearDown()[pri:0, instance:Generic.GenericTest@6933b6c6]"><<tearDown</td>
|
||||
<td> </td><td> </td><td> </td> <td>main@2059572982</td> <td></td> </tr>
|
||||
</table>
|
|
@ -0,0 +1,2 @@
|
|||
<h2>Methods that were not run</h2><table>
|
||||
</table>
|
|
@ -0,0 +1,14 @@
|
|||
<h2>Methods run, sorted chronologically</h2><h3>>> means before, << means after</h3><p/><br/><em>Suite</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/>
|
||||
<table border="1">
|
||||
<tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr>
|
||||
<tr bgcolor="86659f"> <td>24/03/04 17:47:19</td> <td>0</td> <td> </td><td> </td><td title=">>GenericTest.setUp()[pri:0, instance:Generic.GenericTest@6933b6c6]">>>setUp</td>
|
||||
<td> </td><td> </td><td> </td> <td>main@2059572982</td> <td></td> </tr>
|
||||
<tr bgcolor="86659f"> <td>24/03/04 17:47:20</td> <td>1507</td> <td> </td><td> </td><td> </td><td> </td><td title=">>GenericTest.redirectConsoleOutputBeforeTest()[pri:0, instance:Generic.GenericTest@6933b6c6]">>>redirectConsoleOutputBeforeTest</td>
|
||||
<td> </td> <td>main@2059572982</td> <td></td> </tr>
|
||||
<tr bgcolor="86659f"> <td>24/03/04 17:47:20</td> <td>1508</td> <td> </td><td> </td><td> </td><td> </td><td> </td><td title="GenericTest.performTestForSet()[pri:0, instance:Generic.GenericTest@6933b6c6]">performTestForSet</td>
|
||||
<td>main@2059572982</td> <td></td> </tr>
|
||||
<tr bgcolor="86659f"> <td>24/03/04 17:47:23</td> <td>3700</td> <td> </td><td> </td><td> </td><td> </td><td title="<<GenericTest.restoreConsoleOutputAfterTest()[pri:0, instance:Generic.GenericTest@6933b6c6]"><<restoreConsoleOutputAfterTest</td>
|
||||
<td> </td> <td>main@2059572982</td> <td></td> </tr>
|
||||
<tr bgcolor="86659f"> <td>24/03/04 17:47:23</td> <td>3701</td> <td> </td><td> </td><td title="<<GenericTest.tearDown()[pri:0, instance:Generic.GenericTest@6933b6c6]"><<tearDown</td>
|
||||
<td> </td><td> </td><td> </td> <td>main@2059572982</td> <td></td> </tr>
|
||||
</table>
|
|
@ -0,0 +1 @@
|
|||
<h2>Reporter output</h2><table></table>
|
|
@ -0,0 +1 @@
|
|||
<html><head><title>testng.xml for Suite</title></head><body><tt><?xml version="1.0" encoding="UTF-8"?><br/><!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"><br/><suite name="Suite" guice-stage="DEVELOPMENT"><br/> <test thread-count="5" name="Test"><br/> <classes><br/> <class name="Generic.GenericTest"/><br/> </classes><br/> </test> <!-- Test --><br/></suite> <!-- Suite --><br/></tt></body></html>
|
|
@ -0,0 +1,30 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Results for Suite</title>
|
||||
<link href="../testng.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../my-testng.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h3><p align="center">Results for<br/><em>Suite</em></p></h3>
|
||||
<table border='1' width='100%'>
|
||||
<tr valign='top'>
|
||||
<td>1 test</td>
|
||||
<td><a target='mainFrame' href='classes.html'>1 class</a></td>
|
||||
<td>1 method:<br/>
|
||||
<a target='mainFrame' href='methods.html'>chronological</a><br/>
|
||||
<a target='mainFrame' href='methods-alphabetical.html'>alphabetical</a><br/>
|
||||
<a target='mainFrame' href='methods-not-run.html'>not run (0)</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a target='mainFrame' href='groups.html'>0 group</a></td>
|
||||
<td><a target='mainFrame' href='reporter-output.html'>reporter output</a></td>
|
||||
<td><a target='mainFrame' href='testng.xml.html'>testng.xml</a></td>
|
||||
</tr></table>
|
||||
<table width='100%' class='test-passed'>
|
||||
<tr><td>
|
||||
<table style='width: 100%'><tr><td valign='top'>Test (1/0/0)</td><td valign='top' align='right'>
|
||||
<a href='Test.html' target='mainFrame'>Results</a>
|
||||
</td></tr></table>
|
||||
</td></tr><p/>
|
||||
</table>
|
||||
</body></html>
|
|
@ -0,0 +1,9 @@
|
|||
<html>
|
||||
<head><title></title><link href="./testng.css" rel="stylesheet" type="text/css" />
|
||||
<link href="./my-testng.css" rel="stylesheet" type="text/css" />
|
||||
</head><body>
|
||||
<h2><p align='center'>Test results</p></h2>
|
||||
<table border='1' width='100%' class='main-page'><tr><th>Suite</th><th>Passed</th><th>Failed</th><th>Skipped</th><th>testng.xml</th></tr>
|
||||
<tr align='center' class='invocation-passed'><td><em>Total</em></td><td><em>1</em></td><td><em>0</em></td><td><em>0</em></td><td> </td></tr>
|
||||
<tr align='center' class='invocation-passed'><td><a href='Default suite/index.html'>Default suite</a></td>
|
||||
<td>1</td><td>0</td><td>0</td><td><a href='Default suite/testng.xml.html'>Link</a></td></tr></table></body></html>
|
Binary file not shown.
After Width: | Height: | Size: 1019 B |
Binary file not shown.
After Width: | Height: | Size: 967 B |
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
|
||||
<suite name="Failed suite [Default suite]" guice-stage="DEVELOPMENT">
|
||||
<test thread-count="5" name="Default test(failed)">
|
||||
<classes>
|
||||
<class name="Generic.GenericTest">
|
||||
<methods>
|
||||
<include name="redirectConsoleOutputBeforeTest"/>
|
||||
<include name="setUp"/>
|
||||
<include name="performTestForSet"/>
|
||||
<include name="tearDown"/>
|
||||
<include name="restoreConsoleOutputAfterTest"/>
|
||||
</methods>
|
||||
</class> <!-- Generic.GenericTest -->
|
||||
</classes>
|
||||
</test> <!-- Default test(failed) -->
|
||||
</suite> <!-- Failed suite [Default suite] -->
|
|
@ -0,0 +1,309 @@
|
|||
body {
|
||||
margin: 0px 0px 5px 5px;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.navigator-selected {
|
||||
background: #ffa500;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
position: absolute;
|
||||
top: 60px;
|
||||
bottom: 0;
|
||||
left: 400px;
|
||||
right: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.navigator-root {
|
||||
position: absolute;
|
||||
top: 60px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 400px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.suite {
|
||||
margin: 0px 10px 10px 0px;
|
||||
background-color: #fff8dc;
|
||||
}
|
||||
|
||||
.suite-name {
|
||||
padding-left: 10px;
|
||||
font-size: 25px;
|
||||
font-family: Times;
|
||||
}
|
||||
|
||||
.main-panel-header {
|
||||
padding: 5px;
|
||||
background-color: #9FB4D9; //afeeee;
|
||||
font-family: monospace;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.main-panel-content {
|
||||
padding: 5px;
|
||||
margin-bottom: 10px;
|
||||
background-color: #DEE8FC; //d0ffff;
|
||||
}
|
||||
|
||||
.rounded-window {
|
||||
border-radius: 10px;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.rounded-window-top {
|
||||
border-top-right-radius: 10px 10px;
|
||||
border-top-left-radius: 10px 10px;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.light-rounded-window-top {
|
||||
border-top-right-radius: 10px 10px;
|
||||
border-top-left-radius: 10px 10px;
|
||||
}
|
||||
|
||||
.rounded-window-bottom {
|
||||
border-style: solid;
|
||||
border-width: 0px 1px 1px 1px;
|
||||
border-bottom-right-radius: 10px 10px;
|
||||
border-bottom-left-radius: 10px 10px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.method-name {
|
||||
font-size: 12px;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.method-content {
|
||||
border-style: solid;
|
||||
border-width: 0px 0px 1px 0px;
|
||||
margin-bottom: 10;
|
||||
padding-bottom: 5px;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.parameters {
|
||||
font-size: 14px;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.stack-trace {
|
||||
white-space: pre;
|
||||
font-family: monospace;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
margin-top: 0px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.testng-xml {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.method-list-content {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.navigator-suite-content {
|
||||
margin-left: 10px;
|
||||
font: 12px 'Lucida Grande';
|
||||
}
|
||||
|
||||
.suite-section-title {
|
||||
margin-top: 10px;
|
||||
width: 80%;
|
||||
border-style: solid;
|
||||
border-width: 1px 0px 0px 0px;
|
||||
font-family: Times;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.suite-section-content {
|
||||
list-style-image: url(bullet_point.png);
|
||||
}
|
||||
|
||||
.top-banner-root {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 45px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 5px;
|
||||
margin: 0px 0px 5px 0px;
|
||||
background-color: #0066ff;
|
||||
font-family: Times;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.top-banner-title-font {
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.test-name {
|
||||
font-family: 'Lucida Grande';
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.suite-icon {
|
||||
padding: 5px;
|
||||
float: right;
|
||||
height: 20;
|
||||
}
|
||||
|
||||
.test-group {
|
||||
font: 20px 'Lucida Grande';
|
||||
margin: 5px 5px 10px 5px;
|
||||
border-width: 0px 0px 1px 0px;
|
||||
border-style: solid;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.test-group-name {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.method-in-group {
|
||||
font-size: 16px;
|
||||
margin-left: 80px;
|
||||
}
|
||||
|
||||
table.google-visualization-table-table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.reporter-method-name {
|
||||
font-size: 14px;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.reporter-method-output-div {
|
||||
padding: 5px;
|
||||
margin: 0px 0px 5px 20px;
|
||||
font-size: 12px;
|
||||
font-family: monospace;
|
||||
border-width: 0px 0px 0px 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.ignored-class-div {
|
||||
font-size: 14px;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.ignored-methods-div {
|
||||
padding: 5px;
|
||||
margin: 0px 0px 5px 20px;
|
||||
font-size: 12px;
|
||||
font-family: monospace;
|
||||
border-width: 0px 0px 0px 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.border-failed {
|
||||
border-top-left-radius: 10px 10px;
|
||||
border-bottom-left-radius: 10px 10px;
|
||||
border-style: solid;
|
||||
border-width: 0px 0px 0px 10px;
|
||||
border-color: #f00;
|
||||
}
|
||||
|
||||
.border-skipped {
|
||||
border-top-left-radius: 10px 10px;
|
||||
border-bottom-left-radius: 10px 10px;
|
||||
border-style: solid;
|
||||
border-width: 0px 0px 0px 10px;
|
||||
border-color: #edc600;
|
||||
}
|
||||
|
||||
.border-passed {
|
||||
border-top-left-radius: 10px 10px;
|
||||
border-bottom-left-radius: 10px 10px;
|
||||
border-style: solid;
|
||||
border-width: 0px 0px 0px 10px;
|
||||
border-color: #19f52d;
|
||||
}
|
||||
|
||||
.times-div {
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.suite-total-time {
|
||||
font: 16px 'Lucida Grande';
|
||||
}
|
||||
|
||||
.configuration-suite {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.configuration-test {
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
.configuration-class {
|
||||
margin-left: 60px;
|
||||
}
|
||||
|
||||
.configuration-method {
|
||||
margin-left: 80px;
|
||||
}
|
||||
|
||||
.test-method {
|
||||
margin-left: 100px;
|
||||
}
|
||||
|
||||
.chronological-class {
|
||||
background-color: #0ccff;
|
||||
border-style: solid;
|
||||
border-width: 0px 0px 1px 1px;
|
||||
}
|
||||
|
||||
.method-start {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.chronological-class-name {
|
||||
padding: 0px 0px 0px 5px;
|
||||
color: #008;
|
||||
}
|
||||
|
||||
.after, .before, .test-method {
|
||||
font-family: monospace;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.navigator-suite-header {
|
||||
font-size: 22px;
|
||||
margin: 0px 10px 5px 0px;
|
||||
background-color: #deb887;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.collapse-all-icon {
|
||||
padding: 5px;
|
||||
float: right;
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
$(document).ready(function() {
|
||||
$('a.navigator-link').click(function() {
|
||||
// Extract the panel for this link
|
||||
var panel = getPanelName($(this));
|
||||
|
||||
// Mark this link as currently selected
|
||||
$('.navigator-link').parent().removeClass('navigator-selected');
|
||||
$(this).parent().addClass('navigator-selected');
|
||||
|
||||
showPanel(panel);
|
||||
});
|
||||
|
||||
installMethodHandlers('failed');
|
||||
installMethodHandlers('skipped');
|
||||
installMethodHandlers('passed', true); // hide passed methods by default
|
||||
|
||||
$('a.method').click(function() {
|
||||
showMethod($(this));
|
||||
return false;
|
||||
});
|
||||
|
||||
// Hide all the panels and display the first one (do this last
|
||||
// to make sure the click() will invoke the listeners)
|
||||
$('.panel').hide();
|
||||
$('.navigator-link').first().click();
|
||||
|
||||
// Collapse/expand the suites
|
||||
$('a.collapse-all-link').click(function() {
|
||||
var contents = $('.navigator-suite-content');
|
||||
if (contents.css('display') == 'none') {
|
||||
contents.show();
|
||||
} else {
|
||||
contents.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// The handlers that take care of showing/hiding the methods
|
||||
function installMethodHandlers(name, hide) {
|
||||
function getContent(t) {
|
||||
return $('.method-list-content.' + name + "." + t.attr('panel-name'));
|
||||
}
|
||||
|
||||
function getHideLink(t, name) {
|
||||
var s = 'a.hide-methods.' + name + "." + t.attr('panel-name');
|
||||
return $(s);
|
||||
}
|
||||
|
||||
function getShowLink(t, name) {
|
||||
return $('a.show-methods.' + name + "." + t.attr('panel-name'));
|
||||
}
|
||||
|
||||
function getMethodPanelClassSel(element, name) {
|
||||
var panelName = getPanelName(element);
|
||||
var sel = '.' + panelName + "-class-" + name;
|
||||
return $(sel);
|
||||
}
|
||||
|
||||
$('a.hide-methods.' + name).click(function() {
|
||||
var w = getContent($(this));
|
||||
w.hide();
|
||||
getHideLink($(this), name).hide();
|
||||
getShowLink($(this), name).show();
|
||||
getMethodPanelClassSel($(this), name).hide();
|
||||
});
|
||||
|
||||
$('a.show-methods.' + name).click(function() {
|
||||
var w = getContent($(this));
|
||||
w.show();
|
||||
getHideLink($(this), name).show();
|
||||
getShowLink($(this), name).hide();
|
||||
showPanel(getPanelName($(this)));
|
||||
getMethodPanelClassSel($(this), name).show();
|
||||
});
|
||||
|
||||
if (hide) {
|
||||
$('a.hide-methods.' + name).click();
|
||||
} else {
|
||||
$('a.show-methods.' + name).click();
|
||||
}
|
||||
}
|
||||
|
||||
function getHashForMethod(element) {
|
||||
return element.attr('hash-for-method');
|
||||
}
|
||||
|
||||
function getPanelName(element) {
|
||||
return element.attr('panel-name');
|
||||
}
|
||||
|
||||
function showPanel(panelName) {
|
||||
$('.panel').hide();
|
||||
var panel = $('.panel[panel-name="' + panelName + '"]');
|
||||
panel.show();
|
||||
}
|
||||
|
||||
function showMethod(element) {
|
||||
var hashTag = getHashForMethod(element);
|
||||
var panelName = getPanelName(element);
|
||||
showPanel(panelName);
|
||||
var current = document.location.href;
|
||||
var base = current.substring(0, current.indexOf('#'))
|
||||
document.location.href = base + '#' + hashTag;
|
||||
var newPosition = $(document).scrollTop() - 65;
|
||||
$(document).scrollTop(newPosition);
|
||||
}
|
||||
|
||||
function drawTable() {
|
||||
for (var i = 0; i < suiteTableInitFunctions.length; i++) {
|
||||
window[suiteTableInitFunctions[i]]();
|
||||
}
|
||||
|
||||
for (var k in window.suiteTableData) {
|
||||
var v = window.suiteTableData[k];
|
||||
var div = v.tableDiv;
|
||||
var data = v.tableData
|
||||
var table = new google.visualization.Table(document.getElementById(div));
|
||||
table.draw(data, {
|
||||
showRowNumber : false
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testng-results ignored="0" total="1" passed="1" failed="0" skipped="0">
|
||||
<reporter-output>
|
||||
</reporter-output>
|
||||
<suite started-at="2024-05-27T08:56:16Z" name="Default suite" finished-at="2024-05-27T10:30:55Z" duration-ms="5679197">
|
||||
<groups>
|
||||
</groups>
|
||||
<test started-at="2024-05-27T08:56:16Z" name="Default test" finished-at="2024-05-27T10:30:55Z" duration-ms="5679197">
|
||||
<class name="Generic.GenericTest">
|
||||
<test-method is-config="true" signature="setUp()[pri:0, instance:Generic.GenericTest@6cb107fd]" started-at="2024-05-27T08:56:16Z" name="setUp" finished-at="2024-05-27T08:56:21Z" duration-ms="4271" status="PASS">
|
||||
<reporter-output>
|
||||
</reporter-output>
|
||||
</test-method> <!-- setUp -->
|
||||
<test-method is-config="true" signature="redirectConsoleOutputBeforeTest()[pri:0, instance:Generic.GenericTest@6cb107fd]" started-at="2024-05-27T08:56:21Z" name="redirectConsoleOutputBeforeTest" finished-at="2024-05-27T08:56:21Z" duration-ms="1" status="PASS">
|
||||
<reporter-output>
|
||||
</reporter-output>
|
||||
</test-method> <!-- redirectConsoleOutputBeforeTest -->
|
||||
<test-method signature="performTestForSet()[pri:0, instance:Generic.GenericTest@6cb107fd]" started-at="2024-05-27T08:56:21Z" name="performTestForSet" finished-at="2024-05-27T10:30:55Z" duration-ms="5674442" status="PASS">
|
||||
<reporter-output>
|
||||
</reporter-output>
|
||||
</test-method> <!-- performTestForSet -->
|
||||
<test-method is-config="true" signature="restoreConsoleOutputAfterTest()[pri:0, instance:Generic.GenericTest@6cb107fd]" started-at="2024-05-27T10:30:55Z" name="restoreConsoleOutputAfterTest" finished-at="2024-05-27T10:30:55Z" duration-ms="1" status="PASS">
|
||||
<reporter-output>
|
||||
</reporter-output>
|
||||
</test-method> <!-- restoreConsoleOutputAfterTest -->
|
||||
<test-method is-config="true" signature="tearDown()[pri:0, instance:Generic.GenericTest@6cb107fd]" started-at="2024-05-27T10:30:55Z" name="tearDown" finished-at="2024-05-27T10:30:55Z" duration-ms="443" status="PASS">
|
||||
<reporter-output>
|
||||
</reporter-output>
|
||||
</test-method> <!-- tearDown -->
|
||||
</class> <!-- Generic.GenericTest -->
|
||||
</test> <!-- Default test -->
|
||||
</suite> <!-- Default suite -->
|
||||
</testng-results>
|
|
@ -0,0 +1,9 @@
|
|||
.invocation-failed, .test-failed { background-color: #DD0000; }
|
||||
.invocation-percent, .test-percent { background-color: #006600; }
|
||||
.invocation-passed, .test-passed { background-color: #00AA00; }
|
||||
.invocation-skipped, .test-skipped { background-color: #CCCC00; }
|
||||
|
||||
.main-page {
|
||||
font-size: x-large;
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
|
||||
<suite name="Suite">
|
||||
<test thread-count="5" name="Test">
|
||||
<classes>
|
||||
<class name="Generic.GenericTest"/>
|
||||
</classes>
|
||||
</test> <!-- Test -->
|
||||
</suite> <!-- Suite -->
|
Loading…
Reference in New Issue