简体   繁体   English

[Test Setup for Test Modules] CANoe中如何运行所有的TestModule

[英]How to run all TestModule in [Test Setup for Test Modules] CANoe

My [Test Setup for Test Modules] same here:我的 [测试模块的测试设置] 同样在这里:

Environment1 (Test_Environment.tse)环境 1 (Test_Environment.tse)
-TestEnv1Folder (Folder) -TestEnv1Folder(文件夹)

  • TestModuleEnv1-1测试模块环境 1-1
  • TestModuleEnv1-2测试模块环境 1-2
    -TestFolder (Folder) -TestFolder(文件夹)
    • TestModuleInFolder1 TestModuleInFolder1
    • TestModuleInFolder2文件夹中的测试模块 2
      -TestFolder2 (Folder) -TestFolder2(文件夹)
      • TestModuleEnv2-1测试模块环境 2-1
      • TestModuleEnv2-2测试模块环境 2-2

I understand use:我了解使用:

 test_environment = self.application.Configuration.TestSetup.TestEnvironments.Item("Environment1")
 test_environment = win32.CastTo(test_environment, "ITestEnvironment2")
 testM = test_environment.Folders.Item("TestFolder")

and I run Test Module in [TestFolder] folder... I understand that I have to use p"Folders.Item (index)" in order to run the test Module.我在 [TestFolder] 文件夹中运行测试模块...我知道我必须使用 p"Folders.Item (index)" 才能运行测试模块。 (Index will increase gradually). (指数会逐渐增加)。

Question: How can I run the all testModule in all folders(TestEnv1Folder, TestFolder and TestFolder2)?问题:如何在所有文件夹(TestEnv1Folder、TestFolder 和 TestFolder2)中运行所有 testModule?

You can use the ExecuteAll method under the TestEnvironment object. This will execute all the test cases in all the folders under that TestEnvironment.您可以使用TestEnvironment object 下的ExecuteAll方法。这将执行该 TestEnvironment 下所有文件夹中的所有测试用例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM