[Jenkins] TestComplete 使用Jenkins进行持续集成测试

1.安装正确的TestComplete插件

在Jenkins里面搜索TestComplete,找到正确的插件然后安装,可以重启jenkins或者选择不重启

在Install Tab 下面可以查看到正确的安装插件信息

2.安装插件以后,就可以新建一个Job

创建新的Build - TestComplete Test,根据工程不同,选择对应的测试方式,由于我们工程比较适合Script Test.所以根据Project,Unit,Routine进行配置

  

具体的配置信息可以查看URL: 

Select the test of the project suite to be run:

Entire suite – runs the entire project suite.

Project test – runs a specified project in the project suite.

Script test – runs a script routine.

Keyword test – runs a keyword test.

Other – runs the specified project item. Enter the name of the project to the Project field and the full path to the project item to the Test name field. Use vertical bars (|) as separators. For example, enter Script|Unit1|foo to run the foo routine from the Unit1 script unit.

CrossBrowserTesting tests (TestComplete 12.20 or later with the Web module license is required) – runs tests in CrossBrowserTesting environments.

Your slave nodes must have TestComplete installed. TestExecute cannot run tests in CrossBrowserTesting environments.
TestComplete on your slave nodes must be able to access the CrossBrowserTesting cloud, and your project suite must include environments and tests assigned to them.

To learn more, see Prepare Jenkins Nodes to Run Tests in CrossBrowserTesting Environments.

3.执行TestCompele需要使用的账号权限设置

 

权限设置是由于TC版本超过12,就需要设置是用什么账号执行脚本,如果没有这个设置的过程,就无法正确的开展脚本执行过程。

具体设置可以参考以下内容:

Test runner – Specifies whether the step will use TestComplete or TestExecute for the test run. If both are installed and (Any) is selected, TestExecute is run.

Notes:

The selected product must be installed on the node. If the 64-bit version of the product is available on the node, it will be used to run tests. Otherwise, the 32-bit version will be used.

To run tests in CrossBrowserTesting environments, select TestComplete.

Version – Specifies the TestComplete or TestExecute version to be used in case you have several versions of these products installed on the node. Jenkins uses the latest installed version by default.

Action on warnings – Specifies whether Jenkins should mark the entire build as failed or unstable when the TestComplete test log contains warnings.

Action on errors – Specifies whether Jenkins should mark the entire build as failed or unstable when the TestComplete test log contains errors.

Additional command-line arguments – Specifies arbitrary command-line arguments to be passed to TestComplete. To learn more about the TestComplete command line, see TestComplete Command Line.

Use test timeout – Specifies the maximum test execution time in seconds.

The timeout includes both the startup time of TestComplete (TestExecute) and the test run time. If you run tests in the CrossBrowserTesting cloud, the timeout will also include the startup time of CrossBrowserTesting environments.

If the test is not finished until the specified period elapses, Jenkins will mark the entire build as failed.

Run interactive user session – Specifies whether your TestComplete test will run in an interactive session.

This option is effective only if you use TestComplete or TestExecute 10.60 or later.

If this option is disabled and Jenkins is running as a service, your TestComplete tests will fail.

For information on when you need to use this option, see Requirements.

User – The user profile that will be used to run the test.

Password – The password used to log in to the user account.

Use active session – Specifies whether an existing user session will be used to run a TestComplete test. If it is selected, TestComplete will run in the current session. Otherwise, Jenkins will close all the applications, terminate the currently active session, start a new session under the specified user account and then start the test.

Note: Jenkins will not stop the user session if another user is logged on.

Session screen resolution - Select a screen resolution for the user session in which your TestComplete test will run. The default value is 1280×1024.

If you use a TestComplete version earlier than 12.30, the specified screen resolution will be ignored and the default screen resolution (1280×1024) will be used.

If the Use active session option is enabled, the specified screen resolution will be ignored and the actual screen resolution of the corresponding user session will be used.

Note: The maximum resolution that can be set for a user session depends on the operating system version and on the Remote Desktop Protocol version installed on the target computer. To learn more, see Remote Desktop Protocol Maximum Supported Resolutions.

Generate MHT log file – If this option is enabled, TestComplete exports test results to a .mht file after the build is over. You can download this file from the Jenkins page displaying test results.

If this option is disabled, TestComplete does not export test results in the MHT format, but you can still examine results in Jenkins. See Viewing TestComplete Test Results in Jenkins.

Generate JUnit-style report – Specifies whether Jenkins will generate JUnit-style reports. For more information on how JUnit reports are represented in Jenkins, see Viewing TestComplete Test Results in Jenkins.

 4.设置执行的工具是TestComplet or TestExecution

 

5.开始执行job

原文地址:https://www.cnblogs.com/hexianl/p/10874791.html