Ask a Question

OnStartTestCase not getting triggered when test is executed using Tags

pankhuri
Occasional Contributor

OnStartTestCase not getting triggered when test is executed using Tags

Hi,

 

We have used OnStartTestCase/OnStopTestCase event handlers in our test and also added a tag to few of them.

Now, when we run the tagged tests in Jenkins pipeline, these event handlers are not getting triggered.

 

We also tried running manually form TestComplete Projects section. When we run them from Projects->Run All Tests, it gets triggered but when we run using Projects-> Run tagged tests, it doesn't get triggered. 

Can someone help us understand why OnStopTestCase not getting triggered for tagged tests?

 

Thanks,

Pankhuri

3 REPLIES 3
hkim5
Staff

Re: OnStartTestCase not getting triggered when test is executed using Tags

these are the prerequisite conditions associated with the event handler of type onstarttestcase

hkim5_0-1623867874477.png

 

so in fact, if the execution model you've defined within your jenkins pipeline does not fit those conditions, the event handlers will not get triggered.

 

for instance, if you've used the filter of /Project:ProjectName to specify a specific project to run via Jenkins pipeline (and the items within your project's execution plan are marked as a test item) the event handler should be triggered.

 

additionally, if you have script routines that are associated with BDD feature files, and the feature file OR scenarios have been tagged, these tagged items can be run as a test item (by right click running run tag @exampleTag ) which should also trigger the event handler. Ordinary tags embedded within KDT's will not get considered as a valid prerequisite to trigger the event handlers.

 

if those conditions are not met, the event handlers will not trigger. if you see that those conditions are being met AND the event handlers are not getting triggered, please submit a support ticket.

 

- similar prerequisite conditions apply to all other types of event handlers. view the list here

Best,
Justin Kim
pankhuri
Occasional Contributor

Re: OnStartTestCase not getting triggered when test is executed using Tags

Hi Justin,

 

Thank you for replying!

 

We are using below syntax when calling tests in pipeline. Our tests are categorized under different tags and we have different Jenkins job for each tag.

 

/ProjectPath:"{abs_path_old}/{project_path}" /project:"{project_name}" /tags:"{tags}

 

Let me know if we need to modify the filter to ensure OnStartTestCase handler is getting triggered.

 

Thanks,

Pankhuri

pankhuri
Occasional Contributor

Re: OnStartTestCase not getting triggered when test is executed using Tags

@hkim5 - any update on this one?

cancel
Showing results for 
Search instead for 
Did you mean: