SAP hybris 快速入门
SAP Commerce 123快速入门
一、开始之前
1. 准备工作
您需要满足以下条件才能使用SAP Commerce 123:
-
Java 11 JDK
-
Apache Maven
-
Git
-
Chrome web browser
注意:SAP Commerce 123使用Selenium来运行自动化测试。
完成这些之后打开cmd窗口,能正常显示配置即可开始下一步:
<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="bash" cid="n144" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> C:\Users\Administrator>java -version
java version "11.0.8" 2020-07-14 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.8+10-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.8+10-LTS, mixed mode)
C:\Users\Administrator>git -version
unknown option: -version
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
C:\Users\Administrator>mvn -v
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: D:\Environment\maven\apache-maven-3.6.3\bin..
Java version: 11.0.8, vendor: Oracle Corporation, runtime: D:\Environment\Java\jdk-11.0.8_windows-x64_bin\jdk-11.0.8
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"</pre>
2. SAP Commerce ZIP
(1)解压SAP Commerce ZIP
前言:SAP Commerce是一个zip包,他的命名通常是CXCOMM201100P_X-XXXXXXXX.zip的命名,如果你没有企业账号是无法下载到的。百度云链接:---------------------
-
选择一个工作目录,此处选择位置为:C:\SAP\CXCOMM201100P_1-70005693 最好是ssd硬盘,速度稍微快点,解压CXCOMM201100P_X-XXXXXXXX.zip文件。你就会得到一个CXCOMM201100P_X-XXXXXXXX文件夹
-
此处以SAP Commerce.zip包以CXCOMM201100P_1-70005693.zip为例
(2)配置SAP Commerce zip的环境
设置<HYBRIS_HOME_DIR>的环境变量**
[图片上传失败...(image-f88fe8-1622091405830)]
设置<ANT_HOME>环境变量
[图片上传失败...(image-fd7b26-1622091405830)]
将您的管理员密码设置为环境变量
后续登录默认系统会读取变量名为admin的密码,此处设置为123456
[图片上传失败...(image-1e986b-1622091405830)]
3. SAP Commerce 123 Interactive
准备材料:hybris123.zip,images.zip;
(1)将 hybris123.zip复制到 C:\SAP\CXCOMM201100P_1-70005693目录,并解压得到hybris123文件夹
[图片上传失败...(image-feb688-1622091405830)]
(2)将images.zip 解压复制到
C:\SAP\CXCOMM201100P_1-70005693\hybris123\src\main\webapp目录下
[图片上传失败...(image-34c8d4-1622091405830)]
(3)创建WAR文件。
进入到 C:\SAP\CXCOMM201100P_1-70005693目录,执行命令,清理+打包
<pre mdtype="fences" cid="n223" lang="bash" spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">mvn clean package -DskipTests</pre>
一般情况输出结果为:
<pre mdtype="fences" cid="n227" lang="bash" spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">C:\SAP\CXCOMM201100P_1-70005693\hybris123>mvn clean package -DskipTests
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< com.hybris.hybris123:hybris123 >-------------------
[INFO] Building hybris123 1.1
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ hybris123 --
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ hybris123 ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ hybris123 ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:3.2.3:war (default-war) @ hybris123 ---
[INFO] Packaging webapp
[INFO] --- spring-boot-maven-plugin:2.1.7.RELEASE:repackage (repackage) @ hybris123 ---
[INFO] Replacing main artifact with repackaged archive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 50.247 s
[INFO] Finished at: 2021-05-26T12:43:59+08:00
[INFO] ------------------------------------------------------------------------</pre>
(4)启动SAP Commerce 123
在cmd命令窗口执行 运行war包
<pre mdtype="fences" cid="n233" lang="bash" spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">java -jar target\hybris123.war`</pre>
正常情况下输出
<pre mdtype="fences" cid="n237" lang="bash" spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">
C:\SAP\CXCOMM201100P_1-70005693\hybris123>java -jar target\hybris123.war
2021-05-26 12:47:39.938 •[34mINFO •[0;39m •[35m[main]•[0;39m
. ____ _ __ _ _
/\ / ' __ _ () __ __ _ \ \ \
( ( )__ | '_ | '| | ' / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
' |____| .|| ||| |_, | / / / /
=========||==============|/=////
:: Spring Boot :: (v2.1.7.RELEASE)
2021-05-26 12:47:49.043 •[34mINFO •[0;39m •[35m[main]•[0;39m [TomcatWebServer.start] - Tomcat started on port(s): 8080 (http) with context path ''
2021-05-26 12:47:49.053 •[34mINFO •[0;39m •[35m[main]•[0;39m [Application.logStarted] - Started Application in 8.682 seconds (JVM running for 11.267)</pre>
(5)使用Chrome浏览器打开 http://localhost:8080,可以获取如下页面,表示你已经成功部署了Commerce 123 入门向导,此帮助文档即与官网相对应。接下来安装这个文档进行发现-探索之路即可。
[图片上传失败...(image-c164e7-1622091405828)]
4. SAP Commerce Cloud 123 Light
二、发现SAP商业之旅
1.安装Accelerator加速器
打开cmd窗口切换到C:\SAP\CXCOMM201100P_1-70005693\installer目录,依次执行以下三条命令,在当条命令执行结束后,cmd窗口绿色 build successful出现即为当条命令执行完毕。
(1).第一条命令安装运行环境。本条命令执行时间大约12分钟(与电脑性能有关)
<pre mdtype="fences" cid="n255" lang="bash" spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">install.bat -r cx setup -A local_property:initialpassword.admin=%INITIAL_ADMIN%</pre>
2.第二天命令初始化环境环境。本条命令执行时间大约40分钟~3h之间(与电脑性能有关,CPU ,RAM,SSD)
<pre mdtype="fences" cid="n266" lang="bash" spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">install.bat -r cx initialize -A local_property:initialpassword.admin=%INITIAL_ADMIN%</pre>
3.执行cx项目启动命令
<pre mdtype="fences" cid="n248" lang="bash" spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">install.bat -r cx start </pre>
启动成功后的控制台输出:
(注意,此处进度条显示0%是正常的信息,后面跟的timer进度条是项目运行起来的时间)
<pre mdtype="fences" cid="n272" lang="" spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">.........
INFO [update-apparel-deIndex-cronJob::de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] (update-apparel-deIndex-cronJob) [SolrIndexerJob] Finished indexer cronjob.
<-------------> 0% EXECUTING [16h 18m 39s]
:recipes:cx:start</pre>
4.访问https://localhost:9002/可以看到登录页面,使用admin和环境变量中的密码登录
登录即可。
[图片上传失败...(image-82262e-1622091405828)]
2.切换到hybris123目录,运行测试
切换到C:\SAP\CXCOMM201100P_1-70005693\hybris123目录,运行测试命令:
<pre mdtype="fences" cid="n300" lang="bash" spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">mvn test -Dtest=com.hybris.hybris123.runtime.tests.Hybris123Tests#testAcceleratorQuickDiveIsOk test</pre>
测试通过
[图片上传失败...(image-e8e803-1622091405828)]
开始下一步
三、探索SAP的商业之旅
1.版本控制
1.确认执行如下命令测试失败,然后进行第2步
<pre mdtype="fences" cid="n342" lang="bash" spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">C:\SAP\CXCOMM201100P_1-70005693\hybris123 & mvn -Dtest=com.hybris.hybris123.runtime.tests.Hybris123Tests#gitRepoOk test</pre>
提示失败如图:
[图片上传失败...(image-5f9082-1622091405828)]
执行git仓库初始化命令
<pre mdtype="fences" cid="n363" lang="bash" spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">C:\SAP\CXCOMM201100P_1-70005693\hybris & git init</pre>
在hybris目录多了一个.git文件夹
2.保存到您的Git存储库中的文件,请将名为.gitignore的文件添加到<HYBRIS_HOME_DIR> / hybris文件夹中,其内容如下
<pre mdtype="fences" cid="n353" lang="txt" spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">/log
/temp
/bin/
!/bin/custom
/roles</pre>
没听懂说的是什么意思,直接执行命令吧:
<pre mdtype="fences" cid="n379" lang="bash" spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">xcopy /h /y C:\SAP\CXCOMM201100P_1-70005693\hybris123\src\main\webapp\resources.gitignore C:\SAP\CXCOMM201100P_1-70005693\hybris`</pre>
复制一个文件成功。
3.对本地Git存储库进行初始提交。
<pre mdtype="fences" cid="n347" lang="bash" spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">cd C:\SAP\CXCOMM201100P_1-70005693\hybris & git add . & git commit -m "Set Up a Git Repository"</pre>
执行成功后的截图
[图片上传失败...(image-3506b0-1622091405827)]
- 运行git日志 并确认您看到列出的第一个git commit。
<pre mdtype="fences" cid="n411" lang="bash" spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">git log</pre>
[图片上传失败...(image-6de74d-1622091405827)]
5.再次执行自动化测试脚本,再次运行 [gitRepoOk](javascript:runATest(%22com.hybris.hybris123.Hybris123Tests_gitRepoOk%22))接受测试,并确认它现在已通过。
<pre mdtype="fences" cid="n402" lang="bash" spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">cd C:\SAP\CXCOMM201100P_1-70005693\hybris123 & mvn -Dtest=com.hybris.hybris123.runtime.tests.Hybris123Tests#gitRepoOk test</pre>
执行成功结果
[图片上传失败...(image-618bb4-1622091405827)]
本小节完毕。
2.安装配方
<u style="box-sizing: border-box;">注意:</u>不要使用安装程序在同一SAP Commerce设置上一个接一个地运行配方。安装程序不会卸载配方,也不会将SAP Commerce文件系统还原到其原始设置。要安装其他配方,请使用原始的SAP Commerce文件和目录。
(1)执行以下命令来运行测试以确认测试失败:
[图片上传失败...(image-d4bd06-1622091405827)]