Searching for a way to run a groovy script when closing a project
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Searching for a way to run a groovy script when closing a project
Hi,
I am looking for a way to cleanup run testcase get properties only once, preferrably when closing a project. I know now how to cleanup those properties. Purpose is to be able to use Git combined with run testcases.
Does anybody has suggestions? I did look at events but I have not found an event when closing or maybe saving a project.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You mean to clean up custom properties of a test case on closing of the project (or saving the project)?
Clean up means remove the values alone? or property names as well?
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, did not get what you mean by - "get properties of a run test case".
Could you please show a screen shot along with the script you have for the review?
How many such cases there for you to be clean up?
Where the current script placed? Is it in a common place or in a specific test case ?
As you know there is no out-of-the-box functionality, need to understand the use case. So answering above info will help.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
ReadyApi provides the concepts of Setup and Tear down scripts. The Setup script runs before a certain phase (either Project, Test Suite or Test Case) while the Tearn down script runs after a certain phase.
That being said, if you want to run a script after the project is run, you can click on the project in the Navigator, click on Tear down script and add your code there.
Later edit: it was only after I posted that I saw you wanted this to happen when closing a project and not after the project was ran. I don't really have a solution for this.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rao and Lucian,
Thanks for your remarks. First i learned that describing something in a post is not that easy. You believe that it is clear but that is certainly not always the case.
I was looking for a way to call a groovy script when closing a project. I will now have a more closer look at teardown scripts and maybe again events.
Thanks!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When there is script already, why let the others to imagine ?
Depends on the context, the same script may work from certain place and the same may not work from other place.
For example, if script is provided at Script Assertion level, many not work in a groovy script test step. A script of groovy script test step is placed in test suite tear down, may or many not work depending the context variables being used.
That's the reason why asking for the information.
And there is no use of providing some random info to try without full knowledge of understanding of the problem.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regards,
Rao.
