TL; DR
我正在尝试创建一个简单的RCPTT测试并使用rcptt-maven-plugin运行它,但由于未在上下文中找到我的过程声明,所以我无法这样做。
有没有一种方法可以指定上下文位置,或通过其他方法使它们在Maven插件中工作?
嗨
我有一个RCPTT项目,其中包含一个测试用例和一个声明全局过程的上下文文件。当我从RCP测试工具IDE运行测试时,它工作正常,但是当我通过rcptt-maven-plugin运行测试时,测试结束并显示一条错误,指出未找到该过程。
带有过程声明的上下文文件的内容:
Format-Version: 1.0
Context-Type: org.eclipse.rcptt.ctx.ecl
Element-Name: projectsList
Element-Type: context
Element-Version: 2.0
Id: _N9ok0BEVEeqDjsfnLlxoAg
Runtime-Version: 2.4.3.201909171500
Save-Time: 11/27/19 2:11 PM
------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998
Content-Type: text/ecl
Entry-Name: .ecl.context
proc createNewProject [val projectName] {
get-view "Projects list" | get-tree | get-menu -path "New/Project..." | click
with [get-window "New Project"] {
with [get-tree] {
select "Configuration Console" | double-click
select "Configuration Console/New Project" | double-click
}
get-editbox -after [get-label "Project name:"] | set-text $projectName
get-button Finish | click
}
get-view "Projects list" | get-tree | get-item -path $projectName | get-property caption | equals $projectName
| verify-true
}
------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998--
测试用例本身:
--- RCPTT testcase ---
Format-Version: 1.0
Contexts: _N9ok0BEVEeqDjsfnLlxoAg
Element-Name: CreateProject
Element-Type: testcase
Element-Version: 3.0
External-Reference:
Id: _MVZ5QBBFEeqrQZijmLKSfA
Runtime-Version: 2.4.3.201909171500
Save-Time: 11/28/19 1:57 PM
Testcase-Type: ecl
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content
get-eclipse-window | maximize
createNewProject "TEST_PROJECT"
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
当我执行Maven构建时,将运行测试,测试的应用程序已成功部署,但最终出现以下错误:
[INFO] Fail 1 (1) processed. 1 failed. spent: 0:01, 0:00 mins remaining. CreateProject. time: 784ms Cause: Scriptlet CreateNewProject not found
任何帮助将不胜感激。
为了子孙后代,我努力了。什么对我有帮助:
rcptt.properties
文件,但不确定。