提交 efe63e94 authored 作者: mry's avatar mry

fix(自动测试成功):修改了报告以及截图生成的位置,准备Jenkins自动测试

上级 55e7c1e7
# 会议室管理排座的自动测试
## 会议室管理
- 会议室新增测试
1. 都为空新增
2. 规模为空新增
3. 成功添加
- 会议室修改测试
1. 修改全部内容,成功修改
- 会议室查询测试
1. 会议室名称查询
2. 人数查询
3. 会议室规模查询
4. 数据有效性
- 会议室删除测试
1. 删除会议室
<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>spring-boot-starter-parent</artifactId>
<groupId>org.springframework.boot</groupId>
<version>2.1.4.RELEASE</version>
<relativePath>pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>seleniumTest</artifactId>
<name>seleniumTest</name>
<version>0.0.1-SNAPSHOT</version>
<description>Demo project for Spring Boot</description>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration />
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src\main\resources\test.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src\main\resources\test.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.1.4.RELEASE</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.15</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>protobuf-java</artifactId>
<groupId>com.google.protobuf</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>2.1.4.RELEASE</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>spring-boot-test</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
<exclusion>
<artifactId>spring-boot-test-autoconfigure</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
<exclusion>
<artifactId>json-path</artifactId>
<groupId>com.jayway.jsonpath</groupId>
</exclusion>
<exclusion>
<artifactId>assertj-core</artifactId>
<groupId>org.assertj</groupId>
</exclusion>
<exclusion>
<artifactId>mockito-core</artifactId>
<groupId>org.mockito</groupId>
</exclusion>
<exclusion>
<artifactId>hamcrest-library</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
<exclusion>
<artifactId>jsonassert</artifactId>
<groupId>org.skyscreamer</groupId>
</exclusion>
<exclusion>
<artifactId>spring-test</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>xmlunit-core</artifactId>
<groupId>org.xmlunit</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.4.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.0.1-jre</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.22</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>2.41.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vimalselvam</groupId>
<artifactId>testng-extentsreport</artifactId>
<version>1.3.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>3.0.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.10</version>
<scope>provided</scope>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
</properties>
</project>
......@@ -69,10 +69,52 @@
<version>3.0.6</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.10</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<!-- put your configurations here -->
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src\main\resources\test.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src\main\resources\test.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
......
......@@ -4,15 +4,29 @@ import com.example.seleniumtest.conferenceRoomTest.ConferenceActive;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
@SpringBootApplication(scanBasePackages = {"com.example.seleniumtest"})
//@Configuration
//@ImportResource(locations = {"classpath:"})
public class SeleniumTestApplication {
@Autowired
ConferenceActive conferenceActive;
// public static boolean started = false;
// private static ApplicationContext applicationContext;
//
// public static ApplicationContext get(){
// return applicationContext;
// }
public static void main(String[] args) {
SpringApplication.run(SeleniumTestApplication.class, args);
// started = true;
}
}
package com.example.seleniumtest.conferenceRoomTest;
import com.example.seleniumtest.SeleniumTestApplication;
import com.example.seleniumtest.selenium.enums.Browser;
import com.example.seleniumtest.selenium.util.WebDriverUtil;
import lombok.Data;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.*;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
import org.testng.Assert;
import org.testng.Reporter;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.io.File;
......@@ -26,18 +30,30 @@ public class ConferenceActive {
private WebDriver webDriver = WebDriverUtil.getWebDriver(Browser.FIREFOX, false);
// public static ApplicationContext applicationContext;
// @BeforeClass
// public void start(){
// if(!SeleniumTestApplication.started){
// applicationContext = SpringApplication.run(SeleniumTestApplication.class);
// SeleniumTestApplication.started = true;
// }else{
// applicationContext = SeleniumTestApplication.get();
// }
// }
//失败截图
public void file() {
File screenshotAs = ((TakesScreenshot) webDriver).getScreenshotAs(OutputType.FILE);
String uuid = UUID.randomUUID().toString().replace("-", "");
String fileName = uuid + ".png";
try {
FileUtils.copyFile(screenshotAs, new File("images/" + fileName));
FileUtils.copyFile(screenshotAs, new File("/opt/conference_manage_deploy/images/" + fileName));
} catch (IOException e) {
e.printStackTrace();
}
Reporter.log("<a href=../images/" + fileName + " target=_blank>这是失败截图</a>", true);
Reporter.log("<img src=../images/" + fileName + " style=width:30px;height:30px />", true);
Reporter.log("<a href=/opt/conference_manage_deploy/images/" + fileName + " target=_blank>这是失败截图</a>", true);
Reporter.log("<img src=/opt/conference_manage_deploy/images/" + fileName + " style=width:30px;height:30px />", true);
}
//新增/编辑会议室输入
......
......@@ -17,7 +17,7 @@ import java.util.*;
public class ExtentTestNGIReporterListener implements IReporter {
//生成的路径以及文件名
private static final String OUTPUT_FOLDER = "test-output/";
private static final String OUTPUT_FOLDER = "/opt/conference_manage_deploy/test_report/";
private static final String FILE_NAME =
new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(new Date()) + ".html";
......
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<meta name='description' content='' />
<meta name='robots' content='noodp, noydir' />
<meta name='viewport' content='width=device-width, initial-scale=1' />
<meta id="timeStampFormat" name="timeStampFormat" content='MMM d, yyyy hh:mm:ss a'/>
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href='http://extentreports.com/resx/dist/css/extent.css' type='text/css' rel='stylesheet' />
<title>api自动化测试报告</title>
<style type='text/css'>
.node.level-1 ul{ display:none;} .node.level-1.active ul{display:block;}
</style>
</head>
<body class='extent standard default hide-overflow '>
<div id='theme-selector' alt='Click to toggle theme. To enable by default, use theme configuration.' title='Click to toggle theme. To enable by default, use theme configuration.'>
<span><i class='material-icons'>desktop_windows</i></span>
</div>
<nav>
<div class="nav-wrapper">
<a href="#!" class="brand-logo blue darken-3">Extent</a>
<!-- slideout menu -->
<ul id='slide-out' class='side-nav fixed hide-on-med-and-down'>
<li class='waves-effect active'><a href='#!' view='test-view' onclick="configureView(0);chartsView('test');"><i class='material-icons'>dashboard</i></a></li>
<li class='waves-effect'><a href='#!' view='exception-view' onclick="configureView(2)"><i class='material-icons'>bug_report</i></a></li>
<li class='waves-effect'><a href='#!' onclick="configureView(-1);chartsView('dashboard');" view='dashboard-view'><i class='material-icons'>track_changes</i></i></a></li>
</ul>
<!-- report name -->
<span class='report-name'>api自动化测试报告</span>
<!-- report headline -->
<span class='report-headline'></span>
<!-- nav-right -->
<ul id='nav-mobile' class='right hide-on-med-and-down nav-right'>
<li>
<a href='#!'>
<span class='label suite-start-time blue darken-3'>Dec 2, 2021 04:19:05 PM</span>
</a>
</li>
<li>
<a href='#!'>
<span class='label blue darken-3'>v3.0.5</span>
</a>
</li>
</ul>
</div>
</nav>
<!-- container -->
<div class='container'>
<div id='test-view' class='view'>
<section id='controls'>
<div class='controls grey lighten-4'>
<!-- test toggle -->
<div class='chip transparent'>
<a class='dropdown-button tests-toggle' data-activates='tests-toggle' data-constrainwidth='true' data-beloworigin='true' data-hover='true' href='#'>
<i class='material-icons'>warning</i> Status
</a>
<ul id='tests-toggle' class='dropdown-content'>
<li status='pass'><a href='#!'>Pass <i class='material-icons green-text'>check_circle</i></a></li>
<li status='fail'><a href='#!'>Fail <i class='material-icons red-text'>cancel</i></a></li>
<li class='divider'></li>
<li status='clear' clear='true'><a href='#!'>Clear Filters <i class='material-icons'>clear</i></a></li>
</ul>
</div>
<!-- test toggle -->
<!-- category toggle -->
<!-- category toggle -->
<!-- clear filters -->
<div class='chip transparent hide'>
<a class='' id='clear-filters' alt='Clear Filters' title='Clear Filters'>
<i class='material-icons'>close</i> Clear
</a>
</div>
<!-- clear filters -->
<!-- enable dashboard -->
<div id='toggle-test-view-charts' class='chip transparent'>
<a class='pink-text' id='enable-dashboard' alt='Enable Dashboard' title='Enable Dashboard'>
<i class='material-icons'>track_changes</i> Dashboard
</a>
</div>
<!-- enable dashboard -->
<!-- search -->
<div class='chip transparent' alt='Search Tests' title='Search Tests'>
<a href="#" class='search-div'>
<i class='material-icons'>search</i> Search
</a>
<div class='input-field left hide'>
<input id='search-tests' type='text' class='validate browser-default' placeholder='Search Tests...'>
</div>
</div>
<!-- search -->
</div>
</section>
<div id='test-view-charts' class='subview-full'>
<div id='charts-row' class='row nm-v nm-h'>
<div class='col s12 m6 l6 np-h'>
<div class='card-panel nm-v'>
<div class='left panel-name'>Tests</div>
<div class='chart-box'>
<canvas id='parent-analysis' width='100' height='80'></canvas>
</div>
<div class='block text-small'>
<span class='tooltipped' data-position='top' data-tooltip='85.714%'><span class='strong'>6</span> test(s) passed</span>
</div>
<div class='block text-small'>
<span class='strong tooltipped' data-position='top' data-tooltip='14.286%'>1</span> test(s) failed, <span class='strong tooltipped' data-position='top' data-tooltip='0%'>0</span> others
</div>
</div>
</div>
<div class='col s12 m6 l6 np-h'>
<div class='card-panel nm-v'>
<div class='left panel-name'>Steps</div>
<div class='chart-box'>
<canvas id='child-analysis' width='100' height='80'></canvas>
</div>
<div class='block text-small'>
<span class='tooltipped' data-position='top' data-tooltip='85.714%'><span class='strong'>6</span> step(s) passed</span>
</div>
<div class='block text-small'>
<span class='strong tooltipped' data-position='top' data-tooltip='14.286%'>1</span> step(s) failed, <span class='strong tooltipped' data-position='top' data-tooltip='0%'>0</span> others
</div>
</div>
</div>
</div>
</div>
<div class='subview-left left'>
<div class='view-summary'>
<h5>Tests</h5>
<ul id='test-collection' class='test-collection'>
<li class='test displayed active fail' status='fail' bdd='false' test-id='1'>
<div class='test-heading'>
<span class='test-name'>findConferenceRoomNumber</span>
<span class='test-time'>Dec 2, 2021 04:19:38 PM</span>
<span class='test-status right fail'>fail</span>
</div>
<div class='test-content hide'>
<div class='test-time-info'>
<span class='label start-time'>Dec 2, 2021 04:19:38 PM</span>
<span class='label end-time'>Dec 2, 2021 04:19:39 PM</span>
<span class='label time-taken grey lighten-1 white-text'>0h 0m 1s+321ms</span>
</div>
<div class='test-steps'>
<table class='bordered table-results'>
<thead>
<tr>
<th>Status</th>
<th>Timestamp</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr class='log' status='debug'>
<td class='status debug' title='debug' alt='debug'><i class='material-icons'>low_priority</i></td>
<td class='timestamp'>4:19:42 PM</td>
<td class='step-details'><a href=../images/261f3ea7f522477fb25ac75256455590.png target=_blank>这是失败截图</a></td>
</tr>
<tr class='log' status='debug'>
<td class='status debug' title='debug' alt='debug'><i class='material-icons'>low_priority</i></td>
<td class='timestamp'>4:19:42 PM</td>
<td class='step-details'><img src=../images/261f3ea7f522477fb25ac75256455590.png style=width:30px;height:30px /></td>
</tr>
<tr class='log' status='fail'>
<td class='status fail' title='fail' alt='fail'><i class='material-icons'>cancel</i></td>
<td class='timestamp'>4:19:42 PM</td>
<td class='step-details'><textarea>java.lang.AssertionError: expected:<请输入数字[123]> but was:<请输入数字[]>
at org.junit.Assert.fail(Assert.java:88)
at com.example.seleniumtest.conferenceRoomTest.ConferenceActive.findConferenceRoomNumber(ConferenceActive.java:253)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
at org.testng.TestRunner.privateRun(TestRunner.java:756)
at org.testng.TestRunner.run(TestRunner.java:610)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:387)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:382)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1293)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1218)
at org.testng.TestNG.runSuites(TestNG.java:1133)
at org.testng.TestNG.run(TestNG.java:1104)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
</textarea></td>
</tr>
</tbody>
</table>
</div>
</div>
</li>
<li class='test displayed active pass' status='pass' bdd='false' test-id='2'>
<div class='test-heading'>
<span class='test-name'>insertConferenceRoomFailAll</span>
<span class='test-time'>Dec 2, 2021 04:19:05 PM</span>
<span class='test-status right pass'>pass</span>
</div>
<div class='test-content hide'>
<div class='test-time-info'>
<span class='label start-time'>Dec 2, 2021 04:19:05 PM</span>
<span class='label end-time'>Dec 2, 2021 04:19:24 PM</span>
<span class='label time-taken grey lighten-1 white-text'>0h 0m 19s+283ms</span>
</div>
<div class='test-steps'>
<table class='bordered table-results'>
<thead>
<tr>
<th>Status</th>
<th>Timestamp</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr class='log' status='pass'>
<td class='status pass' title='pass' alt='pass'><i class='material-icons'>check_circle</i></td>
<td class='timestamp'>4:19:42 PM</td>
<td class='step-details'>Test passed</td>
</tr>
</tbody>
</table>
</div>
</div>
</li>
<li class='test displayed active pass' status='pass' bdd='false' test-id='3'>
<div class='test-heading'>
<span class='test-name'>insertConferenceRoomOne</span>
<span class='test-time'>Dec 2, 2021 04:19:24 PM</span>
<span class='test-status right pass'>pass</span>
</div>
<div class='test-content hide'>
<div class='test-time-info'>
<span class='label start-time'>Dec 2, 2021 04:19:24 PM</span>
<span class='label end-time'>Dec 2, 2021 04:19:26 PM</span>
<span class='label time-taken grey lighten-1 white-text'>0h 0m 2s+312ms</span>
</div>
<div class='test-steps'>
<table class='bordered table-results'>
<thead>
<tr>
<th>Status</th>
<th>Timestamp</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr class='log' status='pass'>
<td class='status pass' title='pass' alt='pass'><i class='material-icons'>check_circle</i></td>
<td class='timestamp'>4:19:42 PM</td>
<td class='step-details'>Test passed</td>
</tr>
</tbody>
</table>
</div>
</div>
</li>
<li class='test displayed active pass' status='pass' bdd='false' test-id='4'>
<div class='test-heading'>
<span class='test-name'>insertConferenceRoom</span>
<span class='test-time'>Dec 2, 2021 04:19:26 PM</span>
<span class='test-status right pass'>pass</span>
</div>
<div class='test-content hide'>
<div class='test-time-info'>
<span class='label start-time'>Dec 2, 2021 04:19:26 PM</span>
<span class='label end-time'>Dec 2, 2021 04:19:29 PM</span>
<span class='label time-taken grey lighten-1 white-text'>0h 0m 2s+794ms</span>
</div>
<div class='test-steps'>
<table class='bordered table-results'>
<thead>
<tr>
<th>Status</th>
<th>Timestamp</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr class='log' status='pass'>
<td class='status pass' title='pass' alt='pass'><i class='material-icons'>check_circle</i></td>
<td class='timestamp'>4:19:42 PM</td>
<td class='step-details'>Test passed</td>
</tr>
</tbody>
</table>
</div>
</div>
</li>
<li class='test displayed active pass' status='pass' bdd='false' test-id='5'>
<div class='test-heading'>
<span class='test-name'>updateConferenceRoom</span>
<span class='test-time'>Dec 2, 2021 04:19:29 PM</span>
<span class='test-status right pass'>pass</span>
</div>
<div class='test-content hide'>
<div class='test-time-info'>
<span class='label start-time'>Dec 2, 2021 04:19:29 PM</span>
<span class='label end-time'>Dec 2, 2021 04:19:32 PM</span>
<span class='label time-taken grey lighten-1 white-text'>0h 0m 3s+28ms</span>
</div>
<div class='test-steps'>
<table class='bordered table-results'>
<thead>
<tr>
<th>Status</th>
<th>Timestamp</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr class='log' status='pass'>
<td class='status pass' title='pass' alt='pass'><i class='material-icons'>check_circle</i></td>
<td class='timestamp'>4:19:42 PM</td>
<td class='step-details'>Test passed</td>
</tr>
</tbody>
</table>
</div>
</div>
</li>
<li class='test displayed active pass' status='pass' bdd='false' test-id='6'>
<div class='test-heading'>
<span class='test-name'>findConferenceRoom</span>
<span class='test-time'>Dec 2, 2021 04:19:32 PM</span>
<span class='test-status right pass'>pass</span>
</div>
<div class='test-content hide'>
<div class='test-time-info'>
<span class='label start-time'>Dec 2, 2021 04:19:32 PM</span>
<span class='label end-time'>Dec 2, 2021 04:19:38 PM</span>
<span class='label time-taken grey lighten-1 white-text'>0h 0m 5s+504ms</span>
</div>
<div class='test-steps'>
<table class='bordered table-results'>
<thead>
<tr>
<th>Status</th>
<th>Timestamp</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr class='log' status='pass'>
<td class='status pass' title='pass' alt='pass'><i class='material-icons'>check_circle</i></td>
<td class='timestamp'>4:19:42 PM</td>
<td class='step-details'>Test passed</td>
</tr>
</tbody>
</table>
</div>
</div>
</li>
<li class='test displayed active pass' status='pass' bdd='false' test-id='7'>
<div class='test-heading'>
<span class='test-name'>deleteConferenceRoom</span>
<span class='test-time'>Dec 2, 2021 04:19:39 PM</span>
<span class='test-status right pass'>pass</span>
</div>
<div class='test-content hide'>
<div class='test-time-info'>
<span class='label start-time'>Dec 2, 2021 04:19:39 PM</span>
<span class='label end-time'>Dec 2, 2021 04:19:40 PM</span>
<span class='label time-taken grey lighten-1 white-text'>0h 0m 1s+459ms</span>
</div>
<div class='test-steps'>
<table class='bordered table-results'>
<thead>
<tr>
<th>Status</th>
<th>Timestamp</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr class='log' status='pass'>
<td class='status pass' title='pass' alt='pass'><i class='material-icons'>check_circle</i></td>
<td class='timestamp'>4:19:42 PM</td>
<td class='step-details'>Test passed</td>
</tr>
</tbody>
</table>
</div>
</div>
</li>
</ul>
</div>
</div>
<!-- subview left -->
<div class='subview-right left'>
<div class='view-summary'>
<h5 class='test-name'></h5>
<div id='step-filters' class="right">
<span class="blue-text" status="info" alt="info" title="info"><i class="material-icons">info_outline</i></span>
<span class="green-text" status="pass" alt="pass" title="pass"><i class="material-icons">check_circle</i></span>
<span class="red-text" status="fail" alt="fail" title="fail"><i class="material-icons">cancel</i></span>
<span class="red-text text-darken-4" status="fatal" alt="fatal" title="fatal"><i class="material-icons">cancel</i></span>
<span class="pink-text text-lighten-1" status="error" alt="error" title="error"><i class="material-icons">error</i></span>
<span class="orange-text" alt="warning" status="warning" title="warning"><i class="material-icons">warning</i></span>
<span class="teal-text" status="skip" alt="skip" title="skip"><i class="material-icons">redo</i></span>
<span status="clear" alt="Clear filters" title="Clear filters"><i class="material-icons">clear</i></span>
</div>
</div>
</div>
<!-- subview right -->
</div>
<!-- test view -->
<!-- category view -->
<div id='exception-view' class='view hide'>
<section id='controls'>
<div class='controls grey lighten-4'>
<!-- search -->
<div class='chip transparent' alt='Search Tests' title='Search Tests'>
<a href="#" class='search-div'>
<i class='material-icons'>search</i> Search
</a>
<div class='input-field left hide'>
<input id='search-tests' type='text' class='validate browser-default' placeholder='Search Tests...'>
</div>
</div>
<!-- search -->
</div>
</section>
<div class='subview-left left'>
<div class='view-summary'>
<h5>Exceptions</h3>
<ul id='exception-collection' class='exception-collection'>
<li class='exception displayed active'>
<div class='exception-heading'>
<span class='exception-name'>java.lang.AssertionError</span>
<span class='exception-count right'><span class='label red lighten-1 white-text'>1</span></span>
</div>
<div class='exception-content hide'>
<div class='exception-tests'>
<table class='bordered table-results'>
<thead>
<tr>
<th>Timestamp</th>
<th>TestName</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>Dec 2, 2021 04:19:38 PM</td>
<td class='linked' test-id='1'>findConferenceRoomNumber</td>
<td><pre><textarea>java.lang.AssertionError: expected:<请输入数字[123]> but was:<请输入数字[]>
at org.junit.Assert.fail(Assert.java:88)
at com.example.seleniumtest.conferenceRoomTest.ConferenceActive.findConferenceRoomNumber(ConferenceActive.java:253)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
at org.testng.TestRunner.privateRun(TestRunner.java:756)
at org.testng.TestRunner.run(TestRunner.java:610)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:387)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:382)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1293)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1218)
at org.testng.TestNG.runSuites(TestNG.java:1133)
at org.testng.TestNG.run(TestNG.java:1104)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
</textarea></pre></td>
</tr>
</tbody>
</table>
</div>
</div>
</li>
</ul>
</div>
</div>
<div class='subview-right left'>
<div class='view-summary'>
<h5 class='exception-name'></h5>
</div>
</div>
</div>
<!-- exception view -->
<div id='dashboard-view' class='view hide'>
<div class='card-panel transparent np-v'>
<h5>Dashboard</h5>
<div class='row'>
<div class='col s2'>
<div class='card-panel r'>
Tests
<div class='panel-lead'>7</div>
</div>
</div>
<div class='col s2'>
<div class='card-panel r'>
Steps
<div class='panel-lead'>7</div>
</div>
</div>
<div class='col s2'>
<div class='card-panel r'>
Start
<div class='panel-lead'>Dec 2, 2021 04:19:05 PM</div>
</div>
</div>
<div class='col s2'>
<div class='card-panel r'>
End
<div class='panel-lead'>Dec 2, 2021 04:19:24 PM</div>
</div>
</div>
<div class='col s2'>
<div class='card-panel r'>
Time Taken
<div class='panel-lead'>19,283ms</div>
</div>
</div>
</div>
</div>
</div>
<!-- dashboard view -->
<!-- testrunner-logs view -->
</div>
<!-- container -->
<script>
var statusGroup = {
passParent: 6,
failParent: 1,
fatalParent: 0,
errorParent: 0,
warningParent: 0,
skipParent: 0,
exceptionsParent: 1,
passChild: 6,
failChild: 1,
fatalChild: 0,
errorChild: 0,
warningChild: 0,
skipChild: 0,
infoChild: 0,
exceptionsChild: 3,
passGrandChild: 0,
failGrandChild: 0,
fatalGrandChild: 0,
errorGrandChild: 0,
warningGrandChild: 0,
skipGrandChild: 0,
infoGrandChild: 0,
exceptionsGrandChild: 0,
};
</script>
<script src='http://extentreports.com/resx/dist/js/extent.js' type='text/javascript'></script>
</body>
</html>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论