[ell-i-developers] Re: Robot Framework Testing: Test Cases Design, Scripting and other Issues

  • From: Pekka Nikander <pekka.nikander@xxxxxx>
  • To: ell-i-developers@xxxxxxxxxxxxx
  • Date: Thu, 24 Apr 2014 10:41:10 +0300

> I wanted to write C-python module for robot framework test case. I have some 
> issues regarding it.
> - I wanted to encapsulate the arduino function calls (pin_mode(), 
> digitalRead, digitalWrite etc) in the c-python module.
> - Then I would use such module in actual test script to call appropriate 
> function for C-emulator functionality e.g. 
>    -> Set Pin High would call module.pinHigh(...)
>    -> Check Pin High would call module.checkPin(...)
>    -> Set Pin Low would call module.pinLow(...)
>    -> Check Pin Low would call module.checkPin(...)
> - I am confused with the emulator functions such as setup(), loop() and main()
> In the test cases, every arduino API function is called from the setup(). If 
> I want to call them sequentially according to robot framework test case, how 
> would I do that? Any suggestions?
> May I call arduino API functions directly in c-python module, neglecting the 
> setup(), loop() and main() ?

Yes, you can call them directly.  If you link against the emulator, I think you 
can simply call the APIs, without even considering the device initialisation, 
as the emulator does not currently implement any kind of real peripheral state. 
 However, if the emulator is later enhanced with some peripheral state support, 
this may become an issue.

However, if the same test cases are later run on the real hardware, then there 
will be the problem of how exactly to "call" the functions.  For that there 
will probably need to be some kind of an interpreter process on the device.  
With 64k of flash we can probably include a small Lua interpreter or something.


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Other related posts: