如何以这种格式显示日志?

如何解决如何以这种格式显示日志?

我正在使用纯HTML文件,并尝试使用标签显示apache日志。但是所有行都被截断并显示为段落。我可以通过任何方式在网页上显示其原始格式的日志。 我需要显示的日志:-

Execution of 3 spec files started at 2020-08-11T10:45:13.392Z

Starting ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103@{#416}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[0-0] RUNNING in chrome - /1_features/sample1.feature
[0-0] wdio testing--> something
[0-0] https://webdriver.io/docs/api/browser/waitUntil.html
[0-0] (//descendant::*[contains(text(),"Blog")])[1]
[0-0] (//descendant::*[contains(text(),"Versions")])[1]
[0-0] PASSED in chrome - /1_features/sample1.feature
[0-1] RUNNING in chrome - /1_features/t - Copy.feature
[0-1] wdio testing--> something
[0-1] Error in "Login Validation: Visit Websites: Given I print consoles "something""
Step "Given I print consoles "something"" is not definedYou can ignore this error by setting cucumberOpts.ignoreUndefinedDefinitions as true.
[0-1] wdio testing--> something
[0-1] wdio testing--> something2
[0-1] wdio testing--> something
[0-1] Error in "Login Validation: Visit Websites: Given I print consoles "something""
Step "Given I print consoles "something"" is not definedYou can ignore this error by setting cucumberOpts.ignoreUndefinedDefinitions as true.
[0-1] FAILED in chrome - /1_features/t - Copy.feature
[0-2] RUNNING in chrome - /1_features/t.feature
[0-2] wdio testing--> something
[0-2] PASSED in chrome - /1_features/t.feature

? Cucumber HTML report 3_reports/testReport.html generated successfully ?

 "spec" Reporter:
------------------------------------------------------------------
[chrome 83.0.4103.116 linux #0-0] Spec: /home/cloud-user/bdd/1_features/sample1.feature
[chrome 83.0.4103.116 linux #0-0] Running: chrome (v83.0.4103.116) on linux
[chrome 83.0.4103.116 linux #0-0] Session ID: 5f4519cdbf15a61efaef92bc53bb31a7
[chrome 83.0.4103.116 linux #0-0]
[chrome 83.0.4103.116 linux #0-0] Login Validation
[chrome 83.0.4103.116 linux #0-0]     Visit Websites Once
[chrome 83.0.4103.116 linux #0-0]        ✓ Given I print console "something"
[chrome 83.0.4103.116 linux #0-0]        ✓ Given I open the url "https://webdriver.io/docs/api/browser/waitUntil.html"
[chrome 83.0.4103.116 linux #0-0]        ✓ When I click on "Blog"
[chrome 83.0.4103.116 linux #0-0]        ✓ And I wait for a while
[chrome 83.0.4103.116 linux #0-0]        ✓ When I click on "Versions"
[chrome 83.0.4103.116 linux #0-0]        ✓ Given the following verifications:
[chrome 83.0.4103.116 linux #0-0]          │ Help │
[chrome 83.0.4103.116 linux #0-0]          │ Blog │
[chrome 83.0.4103.116 linux #0-0]        ✓ Then I verify if "Contribute" exists
[chrome 83.0.4103.116 linux #0-0]        ✓ And I wait for a while
[chrome 83.0.4103.116 linux #0-0]
[chrome 83.0.4103.116 linux #0-0] 8 passing (9.9s)
------------------------------------------------------------------
[chrome 83.0.4103.116 linux #0-1] Spec: /home/cloud-user/bdd/1_features/t - Copy.feature
[chrome 83.0.4103.116 linux #0-1] Running: chrome (v83.0.4103.116) on linux
[chrome 83.0.4103.116 linux #0-1] Session ID: b62a9cda00fee2ce7e93bd8cc2e6b1e6
[chrome 83.0.4103.116 linux #0-1]
[chrome 83.0.4103.116 linux #0-1] Login Validation
[chrome 83.0.4103.116 linux #0-1]     Visit Websites
[chrome 83.0.4103.116 linux #0-1]        ✓ Given I print console "something"
[chrome 83.0.4103.116 linux #0-1]        ✖ Given I print consoles "something"
[chrome 83.0.4103.116 linux #0-1]        - Given I print console "minister"
[chrome 83.0.4103.116 linux #0-1]
[chrome 83.0.4103.116 linux #0-1]     Visit Websites
[chrome 83.0.4103.116 linux #0-1]        ✓ Given I print console "something"
[chrome 83.0.4103.116 linux #0-1]
[chrome 83.0.4103.116 linux #0-1]     Visit Websites
[chrome 83.0.4103.116 linux #0-1]        ✓ Given I print console "something2"
[chrome 83.0.4103.116 linux #0-1]
[chrome 83.0.4103.116 linux #0-1]     Visit Websites
[chrome 83.0.4103.116 linux #0-1]        ✓ Given I print console "something"
[chrome 83.0.4103.116 linux #0-1]        ✖ Given I print consoles "something"
[chrome 83.0.4103.116 linux #0-1]        - Given I print console "minister"
[chrome 83.0.4103.116 linux #0-1]
[chrome 83.0.4103.116 linux #0-1] 4 passing (1.2s)
[chrome 83.0.4103.116 linux #0-1] 2 failing
[chrome 83.0.4103.116 linux #0-1] 2 skipped
[chrome 83.0.4103.116 linux #0-1]
[chrome 83.0.4103.116 linux #0-1] 1) Visit Websites Given I print consoles "something"
[chrome 83.0.4103.116 linux #0-1] Step "Given I print consoles "something"" is not definedYou can ignore this error by setting cucumberOpts.ignoreUndefinedDefinitions as true.
[chrome 83.0.4103.116 linux #0-1] undefined:undefined
[chrome 83.0.4103.116 linux #0-1]
[chrome 83.0.4103.116 linux #0-1] 2) Visit Websites Given I print consoles "something"
[chrome 83.0.4103.116 linux #0-1] Step "Given I print consoles "something"" is not definedYou can ignore this error by setting cucumberOpts.ignoreUndefinedDefinitions as true.
[chrome 83.0.4103.116 linux #0-1] undefined:undefined
------------------------------------------------------------------
[chrome 83.0.4103.116 linux #0-2] Spec: /home/cloud-user/bdd/1_features/t.feature
[chrome 83.0.4103.116 linux #0-2] Running: chrome (v83.0.4103.116) on linux
[chrome 83.0.4103.116 linux #0-2] Session ID: a755f0dfa3599d3fc41a29f02f95758d
[chrome 83.0.4103.116 linux #0-2]
[chrome 83.0.4103.116 linux #0-2] Login Validation
[chrome 83.0.4103.116 linux #0-2]     Visit Websites
[chrome 83.0.4103.116 linux #0-2]        ✓ Given I print console "something"
[chrome 83.0.4103.116 linux #0-2]
[chrome 83.0.4103.116 linux #0-2] 1 passing (448ms)


Spec Files:  2 passed,1 failed,3 total (100% completed) in 00:00:15 

但当前显示如下:

从2020-08-11T10:45:13.392Z开始执行3个规范文件

启动ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs / branch-heads / 4103 @ {#416}) 在端口9515上仅允许本地连接。请参阅 https://chromedriver.chromium.org/security-considerations的 有关保护ChromeDriver安全的建议。 ChromeDriver已启动 成功。 [0-0]以chrome格式运行-/1_features/sample1.feature [0-0] wdio测试->某些[0-0] https://webdriver.io/docs/api/browser/waitUntil.html [0-0] (//后代:: [包含(text(),“博客”)]))[1] [0-0] (// descendant :: [包含(text(),“版本”)]])[1] [0-0]通过 chrome-/1_features/sample1.feature [0-1]在chrome中运行- / 1_features / t-Copy.feature [0-1] wdio测试->某些[0-1] “登录验证:访问网站:给出我的打印控制台中的错误” “某物””步骤“鉴于我打印控制台“某物””不是 您可以通过设置忽略此错误 bananaOpts.ignoreUndefinedDefinitions为true。 [0-1] wdio测试-> 东西[0-1] wdio测试->东西2 [0-1] wdio测试-> “登录验证:访问网站:已知我”中出现[0-1]错误 打印控制台“某物””步骤“鉴于我打印控制台“某物”” 未定义您可以通过设置忽略此错误 bananaOpts.ignoreUndefinedDefinitions为true。 [0-1]失败 chrome-/ 1_features / t-Copy.feature [0-2]在chrome中运行- /1_features/t.feature [0-2] wdio testing->通过[0-2] chrome-/1_features/t.feature

?生成的黄瓜HTML报告3_reports / testReport.html

“规范”记者: -------------------------------------------------- ---------------- [chrome 83.0.4103.116 linux#0-0]规范: /home/cloud-user/bdd/1_features/sample1.feature [chrome 83.0.4103.116 linux#0-0]正在运行:linux [chrome(chrome)(v83.0.4103.116) 83.0.4103.116 linux#0-0]会话ID:5f4519cdbf15a61efaef92bc53bb31a7 [chrome 83.0.4103.116 linux#0-0] [chrome 83.0.4103.116 linux#0-0] 登录验证[chrome 83.0.4103.116 linux#0-0]访问网站 一次[chrome 83.0.4103.116 linux#0-0]✓给出我的打印控制台 “某物” [chrome 83.0.4103.116 linux#0-0]✓鉴于我打开了 网址“ https://webdriver.io/docs/api/browser/waitUntil.html” [chrome 83.0.4103.116 linux#0-0]✓单击“博客”时[chrome 83.0.4103.116 linux#0-0]✓等待一会儿[chrome 83.0.4103.116 linux#0-0]✓单击在“版本”上[chrome 83.0.4103.116 linux#0-0]✓进行了以下验证:[chrome 83.0.4103.116 linux#0-0]│帮助│[chrome 83.0.4103.116 linux#0-0]│博客│[chrome 83.0.4103.116 linux#0-0]✓然后,我确认“贡献”是否存在[chrome 83.0.4103.116 linux#0-0]✓我等了一会儿[chrome 83.0.4103.116 linux#0-0] [chrome 83.0.4103.116 linux#0-0] 8通过(9.9s) -------------------------------------------------- ---------------- [chrome 83.0.4103.116 linux#0-1]规格: / home / cloud-user / bdd / 1_features / t-Copy.feature [chrome 83.0.4103.116 linux#0-1]运行:在linux [chrome上运行chrome(v83.0.4103.116) 83.0.4103.116 linux#0-1]会话ID:b62a9cda00fee2ce7e93bd8cc2e6b1e6 [chrome 83.0.4103.116 linux#0-1] [chrome 83.0.4103.116 linux#0-1] 登录验证[chrome 83.0.4103.116 linux#0-1]访问网站 [chrome 83.0.4103.116 linux#0-1]✓给出我的打印控制台 “某物” [chrome 83.0.4103.116 linux#0-1]✖给出我的打印信息 控制台“东西” [chrome 83.0.4103.116 linux#0-1]-已给出 我打印控制台“ minister” [chrome 83.0.4103.116 linux#0-1] [chrome 83.0.4103.116 linux#0-1]访问网站[chrome 83.0.4103.116 linux#0-1]✓鉴于我打印了控制台“东西” [chrome 83.0.4103.116 linux#0-1] [chrome 83.0.4103.116 linux#0-1]访问网站[chrome 83.0.4103.116 linux#0-1]✓鉴于我已打印 控制台“ something2” [chrome 83.0.4103.116 linux#0-1] [chrome 83.0.4103.116 linux#0-1]访问网站[chrome 83.0.4103.116 linux#0-1]✓鉴于我打印了控制台“东西” [chrome 83.0.4103.116 linux#0-1]✖给定我打印控制台“东西” [chrome 83.0.4103.116 linux#0-1]-给定我打印控制台 “ minister” [chrome 83.0.4103.116 linux#0-1] [chrome 83.0.4103.116 linux#0-1] 4个通过(1.2s)[chrome 83.0.4103.116 linux#0-1] 2 失败[chrome 83.0.4103.116 linux#0-1] 2被跳过[chrome 83.0.4103.116 linux#0-1] [chrome 83.0.4103.116 linux#0-1] 1)访问网站,因为我打印了控制台“东西” [chrome 83.0.4103.116 linux#0-1]步骤“鉴于我打印控制台“某物””不是 您可以通过设置忽略此错误 bananaOpts.ignoreUndefinedDefinitions为true。 [铬83.0.4103.116 linux#0-1]未定义:undefined [chrome 83.0.4103.116 linux#0-1] [chrome 83.0.4103.116 linux#0-1] 2)访问给出的网站,我已打印 控制台“东西” [chrome 83.0.4103.116 linux#0-1]步骤“给出我 打印控制台“某物”未定义您可以忽略此错误,方法是 将黄瓜Opts.ignoreUndefinedDefinitions设置为true。 [铬 83.0.4103.116 linux#0-1]未定义:未定义 -------------------------------------------------- ---------------- [chrome 83.0.4103.116 linux#0-2]规格: /home/cloud-user/bdd/1_features/t.feature [chrome 83.0.4103.116 linux #0-2]运行:Linux [chrome 83.0.4103.116 linux#0-2]上的Chrome(v83.0.4103.116)会话ID:a755f0dfa3599d3fc41a29f02f95758d [chrome 83.0.4103.116 linux#0-2] [chrome 83.0.4103.116 linux#0-2]登录验证[chrome 83.0.4103.116 linux#0-2]访问网站 [chrome 83.0.4103.116 linux#0-2]✓给定我的打印控制台 “某物” [chrome 83.0.4103.116 linux#0-2] [chrome 83.0.4103.116 linux#0-2] 1传递(448ms)

规范文件:00:00:15通过了2次,失败了1次,总计3次(100%完成)

我正在尝试的代码是:-

<html>
<head>
    <title>log display</title>
    </head>
<body>
    <code>
    Execution of 3 spec files started at 2020-08-11T10:45:13.392Z

Starting ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103@{#416}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[0-0] RUNNING in chrome - /1_features/sample1.feature
[0-0] wdio testing--> something
[0-0] https://webdriver.io/docs/api/browser/waitUntil.html
[0-0] (//descendant::*[contains(text(),3 total (100% completed) in 00:00:15 
</code>
</body>
</html>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-