Skip to content

Commit

Permalink
Added compulsory RF5 precheck to affected tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joergschultzelutter committed Feb 4, 2022
1 parent fcbc90a commit b213bf3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
23 changes: 13 additions & 10 deletions src/rf5_echo_aprsis_traffic.robot
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ ${filter} t/m
*** Test Cases ***
RF5 Echo APRS-IS Raw Traffic
[Documentation] Capture APRS messages from APRS-IS and display them on the console
Log To Console \nAPRS-IS Echo Server
Log To Console Press CTRL-C to quit
WHILE ${True}
Receive Packet From APRS-IS
END
Expand All @@ -38,11 +40,12 @@ Open APRS-IS Connection
Set APRS-IS Passcode ${passcode}
Set APRS-IS Filter ${filter}

Log Connecting to APRS-IS
Log To Console Connecting to APRS-IS
Connect to APRS-IS
Log To Console Connected to APRS-IS

Close APRS-IS Connection
Log Disconnect from APRS-IS
Log To Console Disconnect from APRS-IS
Disconnect from APRS-IS

Receive packet from APRS-IS
Expand All @@ -55,13 +58,13 @@ Receive packet from APRS-IS
Log To Console ${packet}

Check Robot Framework Version
[Documentation] Checks the robotframework's version and aborts if we don't use minimum version 5.x.x
# Get the version. Will be in x.x.x format, e.g. 4.1.2
${ver}= Evaluate (robot.version.VERSION)
[Documentation] Checks the robotframework's version and aborts if we don't use minimum version 5.x.x
# Get the version. Will be in x.x.x format, e.g. 4.1.2
${ver}= Evaluate (robot.version.VERSION)

# Split up the string and get the major and minor versions, then convert the values to integer
${words}= Split String ${ver} .
${major}= Convert To Integer ${words[0]}
# Split up the string and get the major and minor versions, then convert the values to integer
${words}= Split String ${ver} .
${major}= Convert To Integer ${words[0]}

# Check the version and fail the test if necessary
Run Keyword If '${major}' < '5' Fatal Error msg=This test suite can only be run with Robot Framework 5.x.x. Present Version is '${ver}'
# Check the version and fail the test if necessary
Run Keyword If '${major}' < '5' Fatal Error msg=This test suite can only be run with Robot Framework 5.x.x. Present Version is '${ver}'
24 changes: 12 additions & 12 deletions src/rf5_receive_and_send.robot
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Receive packet from APRS-IS
[Documentation] VERY simplified ack-and-respond-to-message test case. Sends ack & msg to user, then terminates the test
# Get the packet from APRS-IS
Log Receive message from APRS-IS
Log To Console Receive message from APRS-IS
${packet} = Receive APRS Packet

Log To Console Receive complete
Expand Down Expand Up @@ -150,7 +150,7 @@ Process APRS Response
Send Packet to APRS-IS
[Documentation] Send packet to APRS-IS
[arguments] ${message}
Log Send Packet to APRS-IS
Log To Console Send Packet to APRS-IS
Send APRS Packet ${message}

Open APRS-IS Connection
Expand All @@ -166,22 +166,22 @@ Open APRS-IS Connection
Set APRS-IS Passcode ${passcode}
Set APRS-IS Filter ${filter}

Log Connecting to APRS-IS
Log To Console Connecting to APRS-IS
Connect to APRS-IS

Close APRS-IS Connection
[Documentation] Closes an existing connection to APRS-IS
Log Disconnect from APRS-IS
Log To Console Disconnect from APRS-IS
Disconnect from APRS-IS

Check Robot Framework Version
[Documentation] Checks the robotframework's version and aborts if we don't use minimum version 5.x.x
# Get the version. Will be in x.x.x format, e.g. 4.1.2
${ver}= Evaluate (robot.version.VERSION)
[Documentation] Checks the robotframework's version and aborts if we don't use minimum version 5.x.x
# Get the version. Will be in x.x.x format, e.g. 4.1.2
${ver}= Evaluate (robot.version.VERSION)

# Split up the string and get the major and minor versions, then convert the values to integer
${words}= Split String ${ver} .
${major}= Convert To Integer ${words[0]}
# Split up the string and get the major and minor versions, then convert the values to integer
${words}= Split String ${ver} .
${major}= Convert To Integer ${words[0]}

# Check the version and fail the test if necessary
Run Keyword If '${major}' < '5' Fatal Error msg=This test suite can only be run with Robot Framework 5.x.x. Present Version is '${ver}'
# Check the version and fail the test if necessary
Run Keyword If '${major}' < '5' Fatal Error msg=This test suite can only be run with Robot Framework 5.x.x. Present Version is '${ver}'

0 comments on commit b213bf3

Please sign in to comment.