Adding Test Set Description content to Defect Description
A user has asked if when logging a defect during a manual test run at the point that the step has failed if it is possible to capture the Description of the Test Set and add it automatically to the Description of the Defect being opened during the test run? Has anyone attempted this before and would be so kind as to share how this might be done?
It is definitely possible as I've done similar before at another client site. You basically need to work out what action is called (should be in the admin guide), trap the action in action can execute and add the text then. You may not be able to still have the auto text generate though without it overwriting your test set description so you might need to generate it yourself. There are also potentially multiple actions to trap as the action changes depending on if step is the only place they want the text added or they want the same functionality from the run or the test instance or even the test set itself. I think there were complications due to not getting access to the link object as it wasn't created at the time I needed the run id etc so I needed to use global variables to move data between the lab module and the defect module (actually I think I might have the user environment object or something adapting some code in the admin guide and making it more generic), but this was two years ago so I may be mis-remembering. And if you want to extend the functionality to sprinter then there are additional actions to trap again.
I was able to identify that the "StepsView.NewDefect" action is what is called when you initiate adding a defect during a test run from the Manual Runner (we currently don't use Sprinter). However I can't seem to take the text captured from the Test Set Description and pass it into the Description field of the new Defect that is being opened. Any ideas?
as Brendan say, if you would like only to catch the description of the TestSet and then copy this information to the defect you can do this using global variable.
I suggest you to retreive the Description Information of the TestSet in the MoveTo event (TestSet_MoveTo). When you identify that the "StepsView.NewDefect" action is called than set the Bug field with this information.