Hi there,
I’m performing a prove of concept to use the Robot Framework plus Telnet Library to validates some projects, but I’m stuck after facing a problem to connect the server. And it is the reason why I’m here.
Below are described the scenario, the current result, the expected result from my side and a brief analysis of the robot framework outputs.
ERROR DESCRIPTION:
Given a tcp/ip server is running over “localhost” and port “1123”
And, currently, this server can be connected directly using the telnet.
When I execute script below:
*** Settings ***
Documentation Telnet Test Concept
...
... Test Pilot for using Robot Framwork to validate Telnet server
Library Telnet
*** Variables ***
${host} localhost
${port} 1123
*** Test Cases ***
Connect to Server using Telnet
Open Connection ${host} port=${port}
Close All Connections
ACTUAL RESULT
Then Open Connection fails with the error: "gaierror: [Errno 11001] getaddrinfo failed"
EXPECTED RESULT:
The connection to the host=localhost and port=1123 should be opened like it is opened when using telnet directly.
ANALYSIS
I verified in the output.xml, that the argument port was set to “1123:23” instaed of “23” (as showed in the log below). I know that the port “23” is the default value for the argument port. But I suppose it should be replaced by the new value “1123”
KEYWORD Telnet . Open Connection ${host} port=${port}
Documentation:
Opens a new Telnet connection to the given host and port.
Start / End / Elapsed: 20220204 13:18:02.547 / 20220204 13:18:02.564 / 00:00:00.017
13:18:02.547 INFO Opening connection to localhost port=1123:23 with prompt: None
13:18:02.564 FAIL gaierror: [Errno 11001] getaddrinfo failed
00:00:00.000KEYWORD Telnet . Close All Connections
Documentation:
Closes all open connections and empties the connection cache.
Start / End / Elapsed: 20220204 13:18:02.565 / 20220204 13:18:02.565 / 00:00:00.000
QUESTION:
- Someone have idea why the value “1123:23” is set instead of the value “1123”?
- How I could to fix it to get the connection opened properly?
Thanks in advance,
Jefferson