question

NMOLINERO avatar image
NMOLINERO asked NMOLINERO commented

how to stop a runtime iTest test case "automatically" given an external event

Hi!

I'd like to be able to abort a runtime execution (of a test case or job) when there is an external event performed by a user or a program: for example, if the user detects an execution is going wrong but it hasn't got access to the iTest Runtime (because it's running from a server without GUI), how could it be aborted? or how to end the iTest runtime process?

- is there any command that allow this?

- is there any identifier for the runtime execution?

- or maybe there is a way to do a test case to be run in parallel and close all the runtime executions when it detects a command defined by the user that indicates the execution should be aborted?

Thank you!

iTest Runtime (itestrt)test caseexecution
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

cwhitty avatar image
cwhitty answered NMOLINERO commented

You would need to kill the process from the OS. Velocity has a nice solution here, as a socket is open between the Velocity server and Velocity agent. When you want to abort a test, you'd go into the Velocity UI, click cancel, and the Velocity server sends an abort to the Velocity agent.

1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

NMOLINERO avatar image NMOLINERO commented ·

Thanks Clark! I also thought about killing the process but didn't know abut the Velocity possibility. I't really useful :)

0 Likes 0 ·
NMOLINERO avatar image
NMOLINERO answered

Hi @cecilia.voinea

Thanks a lot for this. Do you know if there is an event that can be triggered from the Windows cmd? For example, let's say the user is running a test case using iTestRT but then the user realizes the PC where the test is running needs to run another application, so the test needs to be stopped. Is there any event that can be triggered according to an event in the PC?

Alternatively, is there any way to get an ID of the process that it's running when the test case is running using the runtime? Because if there is, we can just input a command in the Windows cmd to stop that process.

Thank you! Regards,

Natalia.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

cecilia.voinea avatar image
cecilia.voinea answered cecilia.voinea edited

Hello @NMOLINERO,

I suggest modifying the event for OnFailTestAction from Testcase Global Events. Please find attached a sample of how to modify the event. fail-test-action.jpg

OnFailTestAction is triggered either manually (when you specifically set FailTest in an analysis rule when a criteria is not met) or when an error occurs.

OnFailTestAction is the default action for most of the cases where a particular event occurs during Execution.

You can find more details aboutiTest events & action in iTest HELP.

Please let me know if this is useful for you.

Regards,

Cecilia



10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.