|
Re: Manual Operations [message #1726477 is a reply to message #1726473] |
Mon, 14 March 2016 09:11 |
|
Hi Philipp,
not that I know of; I suppose this is a consequence of the philosophy of TTCN, which sees itself as a close system communicating with the external world via test ports only.
A simple , but sub-optimal solution to this would be the usage of timers:
timer t:=20.0;
t.start;
action("do something");
t.timeout;
but I admit this is not very practical as it keeps the operator on toes all the time and extends execution unnecessarily.
Best regards
Elemer
[Updated on: Mon, 14 March 2016 09:12] Report message to a moderator
|
|
|
Re: Manual Operations [message #1726528 is a reply to message #1726477] |
Mon, 14 March 2016 12:59 |
|
Hi Philipp,
some time ago, I had to achieve something similar to your case. This is what I did at the time:
1- I used a tcp listener (already existing in Titan) to listen in a specific port (example: listen in port 9010)
2- I coded a pause function that would pause the testcase and listen for an event (any event for that matter) in this port 9010
3- whenever I wanted the test to continue, I opened my browser (chrome, firefox) and directed it to the IP of the computer running Titan, port 9010, example: http://12.13.14.15:9010
4- the browser hits the listener port, the pause function will detect a request in the listener then continue with the flow of the testcase
5- now that the browser is directed to the titan listener, if the pause function is called again all it takes is a refresh (F5 in most browsers) to un-pause again my test
alternatively, you could replace the browser with a more sophisticated GUI button coded in whatever language of your choice, but the browser did the job for me
hope it helps!
Gustavo.
|
|
|
Re: Manual Operations [message #1726907 is a reply to message #1726528] |
Thu, 17 March 2016 11:44 |
|
Hi Philipp,
this could be solved using the PIPE test port:
https://github.com/eclipse/titan.TestPorts.PIPEasp
please check the /demo
The following code:
testcase TC_basic0() runs on PIPE_CT {
map(self:PIPE_PCO, system:PIPE_PCO);
// start nedit, should be stopped manually
// execution stops here until nedit exits with 0
PIPE_PCO.send(t_PExecute("nedit yyy_PLEASE_CLOSE_MANUALLY", "abcd"));
alt {
[] PIPE_PCO.receive(t_PResult(?, ?, 0)) -> value v_ASP_PResult {
log("PResult msg received: ", v_ASP_PResult);
}
}
unmap(self:PIPE_PCO, system:PIPE_PCO);
}
will start a nedit window with a message, and exec will continue only after
user presses "exit nedit";
of course , instead of nedit , some other executable can be used.
Best regards
Elemer
[Updated on: Thu, 17 March 2016 12:44] Report message to a moderator
|
|
|
Re: Manual Operations [message #1726923 is a reply to message #1726907] |
Thu, 17 March 2016 13:24 |
|
Hi Philipp,
a simplified version with xterm:
testcase TC_simple() runs on PIPE_CT {
map(self:PIPE_PCO, system:PIPE_PCO);
PIPE_PCO.send(t_PExecute("xterm -hold -e echo DO SOMETHING!!!! ", "abcd"));
alt {
[]PIPE_PCO.receive(t_PResult(?, ?, 0));
}
unmap(self:PIPE_PCO, system:PIPE_PCO);
setverdict(pass);
}
BR Elemer
|
|
|
Powered by
FUDForum. Page generated in 0.03962 seconds