I have been trying to figure out if there is a built in way to maintain test context while a test is executing. The only way that i can see, after a read of the docs is to maintain context using a listener but they would require some boiler plate code. Let me explain why i need this.
We're trying to use robot framework for our integration testing. The tests must communicate with other components using a middleware layer. But i also need the tests to retain context so that complex communication is made possible using setup keywords. The context must be modifiable, ofcourse, for this to work. Additionally, this will also help in accessing results of a previous keyword internally without writing extra code in the higher level resource libraries.
Is this possible out of the box with robot framework?
Thanks,
Gaurav
On Mon, Jan 2, 2012 at 7:45 PM, Gaurav Arora <g.a...@iontrading.com> wrote:
> We're trying to use robot framework for our integration testing. The tests
> must communicate with other components using a middleware layer. But i also
> need the tests to retain context so that complex communication is made
> possible using setup keywords. The context must be modifiable, ofcourse, for
> this to work. Additionally, this will also help in accessing results of a
> previous keyword internally without writing extra code in the higher level
> resource libraries.
>
> Is this possible out of the box with robot framework?
It seems to me that you need to create your own custom test library
with a global scope (so that it is instantiated only once during the
test run). The library can the keep track of the execution context,
and expose necessary keywords to test cases.
You can find more about test libraries in the user guide[1].
thanks,
--J
--
Janne Härkönen | http://reaktor.fi
http://twitter.com/#!/janneharkonen