Skip to content
Back to discussion

Replies to Option to automatically set Automation Key to match Test Key?

Niharika

Permalink

Hello Cameron,

Automation keys created by AIO on import results are normally fully qualified names corresponding to code structure. Putting the test key as automation key seems to be a very specific use case.

One of the ways to achieve this is to use the APIs to update the automation key. You can reindex and then use the REST APIS of Get Case and Update Case to update the automation key to the latest case key.

Hope that helps.

-N

floramae Dani Kilan

Permalink

Hello

cameron.fairburn

Permalink

Hi N,

I am not sure if it is a very specific use case, because this is a guaranteed way to align automation keys and titles in any automation framework.

Is there any reason other than re-indexing that makes you think this is a bad idea? Otherwise what is the purpose of the test key, as keys ideally should be immutable.

Thanks,

Cameron

Niharika

Permalink

Parent reply

Hello @cameron.fairburn ,

Apologies for missing this. If we automatically set the automation keys to the case keys, then on re-indexing, the automation key may be, say AT-TC-12 and the case key may have reindexed to AT-TC-10. Now there can be another case, which has been newly reindexed to the case key - AT-TC-12.

When a user marks the tag of the case as AT-TC-12, we would get to two cases , one with automation key as 12 and one with case key as 12. This would cause a problem and incorrect cases will be updated.

Even if the functionality was given, then after running the utility, the casekey and auto key would become AT-TC-10 and the automation case in the automation repo would still be pointing to AT-TC-12.

So, in both cases, this solution wouldn't work. However, we do understand reindexing creates a problem with automation and will discuss internally if a solution can be provided to address it.

Regards,

N

cameron.fairburn

Permalink

Parent reply

Do you have any examples of what an automation key is typically set to?

It seems like the suggestion is to never create any tests manually in AIO which will be used for automation, because you need to set the test key so if you create them manually (even through bulk uploads) you are creating yourself a lot of work to set the automation keys as well.

Niharika

Permalink

Parent reply

Automation keys are used in the absence of case keys to identify a case. In case of Junit, TestNG, the fully qualified name ie classname.methodname (eg. com.aio.auto.samples.TestNGDataProviderTests.mixDPTest). makes the automation key. In case of cucumber, the scenario id in the cucumber.json makes the automation key.

AIO parsers need some value from the result files [ generated by frameworks ] to search in AIO db in absence of case keys and hence these conventions differ by framework since each framework generates a different result file and we need to pick something which is gauranteed to be there in the report.

If you could let us know your framework details, we can let you know specifics on that.

Regards,

N

Replies to Option to automatically set Automation Key to match Test Key? · Page 1 | AIO Tests