Forum Discussion

phlegay's avatar
phlegay
Occasional Contributor
7 years ago

Evolution of the content of the context (Scriptiing)

Hello,

 

I push some value in the context in a testStep. Then in the associate TestCase  teardown script, is it possible to get it back.

 

But this value is not yet in the context in project teardown script.

 

How to save data from a Test Step in order to get it in the proeject teardown script.

 

Thanks,

 

 

  • Lucian's avatar
    Lucian
    Community Hero
    Hey, can you be more specific on what do you want to achieve? What do you mean you pushed some value in the context of a test step? Can you show as your script/ print screens etc?
  • phlegay's avatar
    phlegay
    Occasional Contributor

    Hello,

     

    In a test Step, I have a groovy assertion that compare the response against an expected one that is stored in a file.

     

    So I would like to push in context push(assertionID, filename)

     

    So in the project teardown code, i would like to get thos information back in ordere to build a report with the list of files.

     

    I found that ExcecutionId is in the testStep context and in the project context. But other information have been lost.

     

    Just write a groovy assertion, push a data and you will get it in the testcase teaderdown step, not in the project teardown script.

     

     

    Thansk,

    PHL