T
time_error
Hi
I have previously used perl as a framework for testing an embedded
device via. telnet. It was quite easy, just send input data (commands,
mails, network traffic) and analyze logfiles and telnet output for
expected output – obvious it was a little more complex than that, but
I think you get the idea.
My new project is a pure windows console application. So what I want
is to stimulate my application with input (mails, SMS´s, UDP data,
direct application input (it has a built-in command shell)) and
analyze the console output and logfiles.
My test starts with an empty prompt - I write something like this: >
perl framework.pl test_file1.pl and hit <enter>. The framework then
does a lot of stuff and finally launches the application.
1)
The application writes output to the console, but I cannot figure out
how to read the output.
2)
I would like to read a log file generated by the application. If I try
something like this: system(“type logfile.log”) nothing happens.
Perhaps I can use some Perl specific fileroutines to read filecontent?
I suspect that the Perlscript is blocked until the application exists.
So my real question is in fact: Can I start and stop the application
in another prompt (context) and how is this accomplished using Perl?
Then I just analyze logfiles for test results (and abandon reading
console output).
I have previously used perl as a framework for testing an embedded
device via. telnet. It was quite easy, just send input data (commands,
mails, network traffic) and analyze logfiles and telnet output for
expected output – obvious it was a little more complex than that, but
I think you get the idea.
My new project is a pure windows console application. So what I want
is to stimulate my application with input (mails, SMS´s, UDP data,
direct application input (it has a built-in command shell)) and
analyze the console output and logfiles.
My test starts with an empty prompt - I write something like this: >
perl framework.pl test_file1.pl and hit <enter>. The framework then
does a lot of stuff and finally launches the application.
1)
The application writes output to the console, but I cannot figure out
how to read the output.
2)
I would like to read a log file generated by the application. If I try
something like this: system(“type logfile.log”) nothing happens.
Perhaps I can use some Perl specific fileroutines to read filecontent?
I suspect that the Perlscript is blocked until the application exists.
So my real question is in fact: Can I start and stop the application
in another prompt (context) and how is this accomplished using Perl?
Then I just analyze logfiles for test results (and abandon reading
console output).