- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在我的项目中,一个规范文件中会存在多个 it block 。因此,在执行规范时,我需要检索“it” block 的通过/失败状态,并根据结果我必须执行一些操作,例如在 ALM 中上传屏幕截图。
我已经尝试了 Spec did 来检索通过或失败状态。但是在 AfterEach() 中我需要根据通过或失败状态上传屏幕截图。我不确定如何获取并传递“it” block 执行状态,并在 afterEach() 中使用相同的状态来继续通过或失败验证。
暂时排除代码的 ALM 部分。所附代码现在多次打印 afterEach() 控制台语句。
>For first it block it is printing for one time.
>After second it block execution, it is printing twice
>After third it block execution, it is printing thrice.
Not sure why it printing multiple time ,as after Each is expected to run once after "it" block in spec file.
命令提示符的结果:.名称:TestSuite1 Testcase1-POM type1我通过了:it01
.名称:TestSuite1 步骤-输入凭据-步骤2我通过了:it01
名称:TestSuite1 步骤-输入凭据-步骤2我通过了:it01
.名称:TestSuite1 步骤3我通过了:it01名称:TestSuite1 步骤3我通过了:it01名称:TestSuite1 步骤3我通过了:it01
有人可以帮忙吗,为什么它在 Protractor 中打印多次。
var exceldata=require("../CommonMethods/ExcelRead.js");
var homepage= require("../PageObjects/HomePage.js");
var Exeresults;
var fs= require('fs');
var LandingPage;
var BaristaNewWindowPage;
var Testitblock;
var Testitblockstatus;
var Testsuite;
var JasmineTestContainerSupport = window.JasmineTestContainerSupport || require('jasmine-test-container-support');
JasmineTestContainerSupport.extend(jasmine);
if(exceldata.Mytest.test1==="Yes"){
describe('TestSuite1',function()
{
beforeAll(function()
{
browser.get(exceldata.MyURL.testurl1);
console.log("Posse URL is launched successfully");
});
it('Testcase1-POM type1',function()
{
try{
homepage.clickingPosseLink();
}catch(err){
console.log("error occured in first step of it block")
}
});
it('Step-entering credentials-step2',function(){
homepage.entercredintal("test1@gmail.com", "Sudhar@12345");
});
it('step3',function()
{
try{
LandingPage=homepage.clickingSubmit();
}catch(err){
console.log("error occured in third step of it block")
}
});
xit('step4',function()
{
try{`enter code here`
BaristaNewWindowPage=LandingPage.navigateBaristaURL();
//expect(1).toequal(2);
}catch(err){
console.log("error occured in fourth step of it block")
}
});
xit('step5',function()
{
try{
BaristaNewWindowPage.BaristaOurStoryLnk();
}catch(err){
console.log("error occured in fifth step of it block")
}
});
afterEach(function(){
jasmine.getEnv().addReporter(new function() {
this.specDone = function(result) {
//status = result.failedExpectations.length > 0 ? "Fail" : "Pass";
console.log('Name: ' + result.fullName);
if (result.failedExpectations.length > 0) {
console.log('I am Failed: it01');
status = "Fail";
notes = result.failedExpectations;
}else{
console.log('I am Passed: it01');
status = "Pass";
notes = "";
}
};
});
});
});
}
最佳答案
关于javascript - 如何检索 "it" block 状态并根据结果我需要在 ALM 中上传屏幕截图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57787833/
正如标题所说,我需要使用 hp alm rest api 获取我的需求的可追溯性信息。我必须使用什么端点?该文档似乎几乎不存在!我在某处读到以下端点应返回所有可用端点的列表,但我只得到“未找到”->/
我尝试使用 ALM REST API 从 HP ALM 获取所有测试运行,但我的结果仅限于 100 条记录。我尝试使用查询“?page-size = 5000”,但这不起作用。 我使用以下链接来获取测
我使用 ALM Synchronizer 连接到 TFS (2015)。我已经建立了初始连接并正在尝试获取 TFS 模式。开始“运行完整性检查”操作后,我收到以下错误: 获取端点架构: buildEn
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 10 年前。 Improve thi
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我正在开发一个应用程序,它应该从 ALM 中的测试实例检索测试参数,在测试中提交它们,然后在 ALM 中更新状态。问题是我不知道如何从 REST API 访问这些参数。我得到的最接近的是/qcbin/
我想知道,将解决方案导出到 azure devops 存储库后,我们可以通过添加几行代码来编辑代码或从存储库本身向解决方案添加新功能,而且我只能看到 XML 格式的文件。实际上,在编辑电源应用程序时,
我终于加入了 Azure 开发队伍,我对创建开发和部署环境的首选实践有疑问。 首先,我正在学习 Azure Key Vault它呈现了我的核心问题的完美示例场景。 在我的开发(和 ALM)过程中,我通
我终于加入了 Azure 开发队伍,我对创建开发和部署环境的首选实践有疑问。 首先,我正在学习 Azure Key Vault它呈现了我的核心问题的完美示例场景。 在我的开发(和 ALM)过程中,我通
我也熟悉开发室中使用的“Subversion + Cruise Control + Fogbugz + nCover + ...”设置。但是还有什么其他选择呢?除了这两种组合之外,我还很天真。我来自
我在 HP ALM 中有两个不同的查询,但我想合并并将其合二为一。我不太擅长 SQL 查询,所以我在合并查询时遇到了困难。 查询 1:获取测试器的执行计数 Select TESTCYCL.TC_AC
我想要从 HPE ALM Octane 服务器连接到 MSSQL 服务器。现在我遇到了问题,我无法连接到它,因为我的连接字符串无效。你能看出问题所在吗? 连接字符串: jdbc:mercury:sql
这个问题在这里已经有了答案: need to return two sets of data with two different where clauses (2 个答案) 关闭 7 年前。 我正
我指的是 alm 的官方文档来完成这项任务。 http://alm-help.saas.hpe.com/en/12.50/api_refs/REST/webframe.htm#sign_in.htm
在我的项目中,一个规范文件中会存在多个 it block 。因此,在执行规范时,我需要检索“it” block 的通过/失败状态,并根据结果我必须执行一些操作,例如在 ALM 中上传屏幕截图。 我已经
我正在使用 PHP 获取给定文件夹中所有测试集中的所有测试用例。 我关注了这个tutorial为了建立连接,我正在使用 the following query获取我想要作为根目录的测试集文件夹的 id
我对 Polarion SDK API 有疑问 我在项目 -> 文档和页面 -> 测试中。从那里我创建了一篇新的 wiki 文章。在编辑文章时我做了以下工作: 1) 使用以下命令创建了一个 sql 查
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于 Stack Overflow 来说是偏离主题的,
我只想通过 REST API 在浏览器(IE11、Firefox、Chrome)中通过本地编写的 javascript 访问 ALM,但无法登录。我尝试使用How to access HP ALM u
现在我有一个 Azure PaaS 解决方案,在 TFS 中有一个存储库 - 我们右键单击从 VS 发布到应用服务,然后交换插槽以将代码投入生产。小团队、严格的签到(或者我是这么认为的)等等。 我决定
我是一名优秀的程序员,十分优秀!