I am New to Robot Framework , here i am trying to create a Mock server on Rammock lib in RF my IDE is Ride , which takes a json input and sends out the response , can any body through an example on this? if not a Python example to create a mock and use the keywords to execute it
iam trying to create a Tcp listener
and generate a customized response here is the my approach
* Settings * Library Rammbock
* Test Cases * Send message Define simple protocol Start server Start client Send message status:0xcafebabe Verify server gets status [Teardown] Reset Rammbock
* Keywords * Define simple protocol u8 msgId u8 messageLength pdu messageLength - 2 End protocol
Start server Start UDP server 128.0.2.1 8282 protocol=SimpleProtocol
Start client Start UDP client protocol=SimpleProtocol Connect 128.0.2.1 8282
Send message New message SimpleRequest SimpleProtocol msgId:0xff u32 status Client Sends Message ${message}
Verify server gets status ${msg} = Server receives message Should be equal ${msg.status.hex}
Aucun commentaire:
Enregistrer un commentaire