简体   繁体   English

如何在UFT中的测试中重新排列Action的执行?

[英]How to rearrange Action's execution in a Test in UFT?

I am facing a problem while executing multiple Actions in a single Test in UFT . 我在UFT中的单个Test中执行多个Actions时遇到问题。 I have 3 Actions namely Action1 , Action2 and Action3 and I need to run Action3 first then Action1 and lastly the Action2 . 我有3个动作即措施1, 措施2措施3,我需要运行措施3第然后措施1,最后的措施2。 But the problem is when I execute my test UFT always runs the Action1 first then Action2 and lastly Action3 . 但问题是,当我执行我的测试UFT总是先运行措施1,然后措施2,最后措施3。

So, is there any way to rearrange my Actions in UFT ? 那么,有没有办法在UFT中 重新安排我的动作?

I also found one solution to it which is: When we create a Test in UFT then at the directory structure level it makes a Action0 folder 我还找到了一个解决方案:当我们在UFT中创建一个Test然后在目录结构级别创建一个Action0文件夹 在此输入图像描述 .

In this Action0 Folder there is a file named as "SCRIPT" . 在这个Action0文件夹中有一个名为“SCRIPT”的文件。 What you need to do is just open this Script in any editor and rearrange the Action's statements in the order we want them to run. 您需要做的只是在任何编辑器中打开此脚本 ,并按照我们希望它们运行的​​顺序重新排列Action的语句。

For Example: RunAction "Action3", oneIteration RunAction "Action1", oneIteration RunAction "Action2", oneIteration 例如:RunAction“Action3”,oneIteration RunAction“Action1”,oneIteration RunAction“Action2”,oneIteration

By doing this UFT will execute Action3 first then Action1 and lastly Action2. 通过这样做,UFT将首先执行Action3,然后执行Action1,最后执行Action2。 The sole purpose of Action0 is to rearrange the Action's Execution. Action0的唯一目的是重新安排Action的执行。

You can drag and drop the actions in the test pane. 您可以在测试窗格中拖放操作。 Double click the test name (highlighted in the screen shot). 双击测试名称(在屏幕截图中突出显示)。 Then you'll see the flow of the actions, just drag them in the order you want. 然后你会看到动作的流程,只需按你想要的顺序拖动它们。

截图

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

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