You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Read Until extensively in my testing, however on failed tests I do not have any way of knowing what the serial output was. All I know is that it did not find what it was expecting. For some cases seeing what was sent during a failed test can greatly help debug.
Python not being my forte, I have been trying to implement something with the same functionality as Read Until but have it also return the data.
I have had no luck. Can you provide some insight as to how you would accomplish this?
The text was updated successfully, but these errors were encountered:
EdwinFairchild
changed the title
Read Until dumps read data
Read Until discards read data on failed test
Oct 28, 2022
Best I could do was this Expect And Timeout keyword which passes the NONE parameter in place of a delimiter which according do the code causes Read Until to read until a LF is received. At which point I log that data and then check if it contains my expected string.
Expect And Timeout
[Arguments] ${data} ${timeout} ${port}
[Timeout] ${timeout}
${EMPTY}= Set Variable ""
Log To Console \n
WHILE True limit=500000
${source}= Read Until NONE NONE NONE ${port}
Log To Console ${source}
${contains}= Run Keyword And Return Status Should Contain ${source} ${data}
IF ${contains}
Pass Execution ------------------------------------------------------------------------------
END
END
Fail "Test Failed"
I am using
Read Until
extensively in my testing, however on failed tests I do not have any way of knowing what the serial output was. All I know is that it did not find what it was expecting. For some cases seeing what was sent during a failed test can greatly help debug.Python not being my forte, I have been trying to implement something with the same functionality as
Read Until
but have it also return the data.I have had no luck. Can you provide some insight as to how you would accomplish this?
The text was updated successfully, but these errors were encountered: