SAP Spartacus 端到端的集成测试代码实现,位于下列文件夹内:

错误消息:

CypressError: cy.route cannot be invoked before starting the cy.server()

测试覆盖率:

先执行Spartacus B2B模块budget的集成测试:

再执行cost center:

这些集成测试的实现代码,位于integration/b2b/regression/my-company下面:

再执行purchase limit:

第一次build失败,我在Travis的控制台上点了Restart job,第二次就成功了:

Coverage summary:测试覆盖率一览。

这个build貌似还有超时的时间限制,若10分钟内没收到任何output,build就终止了。

No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
1364Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
1365
1366The build has been terminated

成功消息:

Success: Spartacus production build was successful.

Running Cypress end to end tests
1011yarn run v1.22.5
1012$ start-server-and-test start:ci:b2b http-get://localhost:4200 e2e:cy:run:ci:2005:b2b
10131: starting server using command "npm run start:ci:b2b"
1014and when url "[ 'http-get://localhost:4200' ]" is responding with HTTP status code 200
1015running tests using command "npm run e2e:cy:run:ci:2005:b2b"
1016
1017npm WARN lifecycle The node binary used for scripts is /tmp/yarn--1612152243389-0.11358567514273044/node but npm is using /home/travis/.nvm/versions/node/v12.16.1/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
1018
1019> storefrontapp@3.0.0 start:ci:b2b /home/travis/build/SAP/spartacus
1020> cross-env SPARTACUS_BASE_URL=https://spartacus-devci767.eastus.cloudapp.azure.com:9002 SPARTACUS_API_PREFIX=/occ/v2/ SPARTACUS_B2B=true yarn start
1021
1022$ ng serve
1023env= {1024  SPARTACUS_API_PREFIX: '"/occ/v2/"',
1025  SPARTACUS_BASE_URL: '"https://spartacus-devci767.eastus.cloudapp.azure.com:9002"',
1026  SPARTACUS_B2B: '"true"'
1027}

下图可以看到ng serve 命令行启动时,如何通过环境变量的方式注入参数到启动命令行:

开始运行集成测试:

The command ./build.sh sonar exited with 0

这只是Travis build其中之一。

更多Jerry的原创文章,尽在:“汪子熙”:

SAP Spartacus cypress集成测试执行失败的一些常见原因相关推荐

  1. 如何运行 SAP Spartacus cypress 端到端测试

    首先在本地启动 Spartacus instance, 比如执行 b2c.bat: 进入文件夹:projects/storefrontapp-e2e yarn install: 然后 yarn cy: ...

  2. SAP Spartacus SSR模式启用失败的一个原因:SSR rendering exceeded timeout

    https://github.com/SAP/spartacus/issues/10638 错误消息:SSR rendering exceeded timeout, fallbacking to CS ...

  3. ubuntu dig timeout解决方法,dnscat执行失败也是这个原因

    dig 失败一般是什么原因?怎么排查? sudo vi /etc/resolvconf/resolv.conf.d/head 写入: nameserver 223.5.5.5 nameserver 2 ...

  4. SAP Spartacus autofocus Directive的失败的单元测试 - 2021年1月13日 1.1

    我现在把setDefaultConfiguration移到ngAfterViewInit里了: 所以对于这段代码: <div cxAutoFocus id="a"> a ...

  5. 考研失败的最常见原因汇总!

    "我本来一直觉得自己能考上,但是最后心慌了点没发挥好..." 这是小编听的最多的失败理由,我们都是普通的人,难以成仙.成佛,也难以达到"不以物喜,不以己悲"的境 ...

  6. 机器学习经验总结-神经网络训练失败的一些常见原因

    前言 在面对模型不收敛的时候,首先要保证训练的次数够多.在训练过程中,loss并不是一直在下降,准确率一直在提升的,会有一些震荡存在.只要总体趋势是在收敛就行.若训练次数够多(一般上千次,上万次,或者 ...

  7. SAP Spartacus 服务器端渲染单步调试步骤之二:在服务器端执行应用程序 Angular 代码

    前文:SAP Spartacus 服务器端渲染单步调试步骤之一:应用程序准备工作 入口: 进入 platform-server.js: 入口: 最终在服务器端执行 bootstrap,输入 Compo ...

  8. SAP Spartacus 里的 cxOutletRef 指令执行过程分析

    先看 cxOutletRef 指令的效果:ng-template 里定义了如下图标 1 区域所示的自定义 UI,通过 cxOutletRef, 将其插入到图标 2 所示的 ProductDetails ...

  9. SAP Spartacus Definition of Done

    SAP Spartacus Definition of Done Coding guidelines Spartacus 团队采用了以下一组规则来保持 Spartacus 代码的可读性和可维护性. 作 ...

最新文章

  1. const与readonly,析构函数,虚拟方法
  2. linux ls文件颜色和底色设置
  3. java服务限流_SpringCloud微服务:Sentinel哨兵组件,管理服务限流和降级
  4. mockjs(接口服务代理)
  5. uni-app 组件中的canvas转化为图片报错:errMsg:“canvasToTempFilePath:fail canvas is empty”
  6. 来一份全面的面试宝典练练手,面试真题解析
  7. 编译安装MongoDB以及安装PHP的mongodb扩展
  8. java中的byte
  9. php站中文转码在iis 7.5乱码,iis伪静态中文url出现乱码的解决办法
  10. 站立会议(11月21日)
  11. VS2013 update4+Cocos2d-x 3.7 Win8下安装方法及配置
  12. MySQL数据库张素青答案_MySQL数据库技术与应用
  13. MATLAB gcf图窗保存图像,黑色背景/透明背景
  14. 全球及中国EOG放大器行业运行状况与投资前景建议报告2021-2027年版
  15. cv2库中一些函数的使用
  16. 阿诺医药C轮融资近1亿美元,快速推进肿瘤免疫创新药全球研发
  17. 解决warnings potentially fixable with the `--fix`
  18. Hexo添加Icarus主题
  19. luat c语言开发例程,Luat实例教程:tcp透传
  20. renren-generator:java: 找不到符号,类 Longblob

热门文章

  1. eclipse 国际化 $NON-NLS-1$ 含义
  2. python-websocket-server hacking
  3. C#Redis哈希Hashes
  4. 【探秘ES6】系列专栏(二):迭代器和for-of循环
  5. 几种C++ std::string和std::wstring相互转换的转换方法
  6. 【Boost】系列03:内存管理之shared_ptr智能指针
  7. “手机”是个什么机器?
  8. Tomcat version 7.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 and 6 Web
  9. sqlalchemy(二)高级用法
  10. 过滤html文本中的多余属性