Hi,
I am creating test cases that i am using to debug communication with an MCU. When i communicate i get responses, if i send a faulty message i am supposed to get error codes back, i want to catch the error codes that i want to happen, seeing as it responds as i want.
How i have structured this up is that i read the communication, if i don't get a proper message, i send it to a parser that checks the error codes and raises an exception containing the error in text instead of bytes, making it easier to read. I want to catch these exceptions in robot framework, instead of for example, in the python code.
So it's errors, exceptions, that must occur for the test to PASS.
On Saturday, August 8, 2015 at 8:40:56 AM UTC+2, Hélio Guilherme wrote:
A possible solution is for you to create a keyword that calls `Run Keyword And Ignore Error` which obtains the error message (or keyword result), and then you would test the error message.
What are the error conditions you expect? A list of errors that must occur, or a list of possible errors?
sexta-feira, 7 de Agosto de 2015 às 14:10:46 UTC+1, Pether Pettersson escreveu:
Is it possible to expect several errors? I have tried using list variables to no avail.
I need to be able to check if the Keyword runs into one of several possible exceptions.
If i try to use a list all it says is that there are no Keywords with the name of an error i want to look for
Run Keyword and Expect Error Meow Keyword # Works as it's only one Error
Run Keyword and Expect Error @{errors} Keyword # Doesn't work, claims no keyword with the name of the second item in the list