日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

SAP 电商云 Spartacus UI CI e2e-cypress.sh 脚本文件分析

發布時間:2023/12/19 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SAP 电商云 Spartacus UI CI e2e-cypress.sh 脚本文件分析 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

(1) yarn install
(2) 進到 storefrontapp-e2e-cypress 目錄再次 yarn install
(3) yarn build:libs

腳本命令:

cypress run --config-file cypress.ci.json --record --key $CYPRESS_KEY --tag “2011,b2c,all,parallel” --p
arallel --group B2C --ci-build-id $TRAVIS_BUILD_ID --spec “cypress/integration/!(vendor|b2b|ssr)/**/*.e2e
-spec.ts”

record option 代表視頻記錄,這個語法在官方文檔 可以找到。

export 命令本身不需要使用 $ 符號,但是在腳本文件里使用變量時,需要加上 $ 符號。

Bash export 命令幫助我們導出環境變量,以便它們在所有子進程、shell 和命令中可用。

此外,export 命令和其他相關命令的不同命令行選項提供了跨不同 shell 和 bash 腳本定義、導出和使用 bash 變量的各種方法。

關于 bash 里特殊符號 $ 的用法,參考這個鏈接。

yarn e2e:run:ci"${SUITE}"

bash 里圓括號的語法

這里的 SUITE 是 script 里自定義的變量。

SUITE 值可能為下列 e2e:run:ci 冒號后的值,比如 ssr,b2b 等等。

取決于使用者按照什么樣的命令行參數傳遞 --suite

使用 --suite 或者 -s 參數格式均可,默認參數為 b2c:

最后先 yarn start,再 yarn e2e:run:ci

我們就看這個默認的 b2b script:

yarn --cwd ./projects/storefrontapp-e2e-cypress run cy:run:ci:b2b\

使用 --cwd 避免腳本文件里出現不必要的 cd 操作符。參考這個操作符的官方文檔。

cy:run:ci:b2b - 最后執行的如下腳本:

–tag 用于最后在 dashboard 結果列表里查看。

–group 用于在一個測試里將記錄后的結果放置于同一組內。

開始執行測試了:

一些測試結果:

B2B - Bulk Pricing
Mobile
Check bulk pricing table
(node:8855) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
? should render pricing table for products that contain bulk prices (5819ms)
? should checkout using the proper bulk price based on quantity (1604ms)
? should NOT render pricing table for products that DO NOT contain bulk prices (736ms)
? should verify lowering the quantity also lowers the discount (2262ms)
? should verify increasing the quantity also increases the discount (1904ms)
? should verify checking out a bulk priced item and a regular product (7819ms)
Desktop
Check bulk pricing table
? should render pricing table for products that contain bulk prices (963ms)
? should checkout using the proper bulk price based on quantity (1307ms)
? should NOT render pricing table for products that DO NOT contain bulk prices (756ms)
? should verify lowering the quantity also lowers the discount (2282ms)
? should verify increasing the quantity also increases the discount (1941ms)
? should verify checking out a bulk priced item and a regular product (9332ms)

在執行日志的末尾,看到了 command exited with 0 的提示,說明執行成功。

更多Jerry的原創文章,盡在:“汪子熙”:

總結

以上是生活随笔為你收集整理的SAP 电商云 Spartacus UI CI e2e-cypress.sh 脚本文件分析的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。