ATF - Shared Parameter on Test basis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Currently, once we enable the "Parameterized Test" option on a test, all shared parameters defined in the system automatically become available and show up in that test.
Is there anyway ServiceNow allows to remove or add existing shared parameters on test basis? If another team(say ITSM) don't want to see the shared parameters defined for my tests (say HRSD), no option to remove without deleing the shared parameter itself which would remove all the tests' references. I don't want to add exclusive parameter every time.
Any inputs would be helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Shan C -
No, ServiceNow does not have a built-in option to hide or remove specific shared parameters for individual tests in ATF. Shared parameters are available to all parameterized tests. A common workaround is to use a clear naming convention for shared parameters so that different teams can easily identify which parameters belong to their area and ignore those that are not relevant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @Shan C
I reproduced this on my PDI to see how these are stored. There's no way to do what you're after, but here's the reason, which might at least help rule things out.
A shared parameter is a column added to the sys_atf_parameter_set table — just a dictionary entry, with no reference to any test. An exclusive parameter is a row in sys_atf_parameter_variable where the model field holds the test's sys_id.
Only exclusive parameters are linked to a test. Shared ones were never associated with one, so there's no link to break. That's why deleting the definition is the only option and why it removes it everywhere.
I tried 3 things none of them helped:
Application scope — I created a new test in a scoped app, that test still sees every Global shared parameter. Shared parameters can also only be created from a Global session; the "Add Shared Parameters" button disappears in a scoped one.
Copy Test UI Action on test form — the copy does carry exclusive parameters across, each getting its own sys_atf_parameter_variable row anchored to the new test. But it shows all the shared parameters too, so the list looks the same.
Naming conventions — helps with identifying which parameters belong to which team, but they're still present on every test and in every Test Run Data Set, so it doesn't reduce what each team has to work with.
The only way to get a clean per-team list is to stop using shared parameters entirely and define everything as exclusive — which means deleting the existing shared ones, i.e. the destructive step you're trying to avoid.
Please Mark Helpful, if my Reply added any Value
Regards
Raghavendra G
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Sardash @RaghavendraGund I am already using like module name as prefix, but still it's not useful as it will show up in every test rather just link it from the list if needed;
Anyway, thanks for your comments. Hope ServiceNow will do something for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago - last edited 2 weeks ago
@Shan C -
I would like to clarify my earlier comment. I did not mean that using a prefix would prevent it from showing up in every test. My intention was to highlight that prefixes can make it easier for different teams to identify the parameters relevant to their area and ignore those that are not applicable.
