ATF test set values not setting values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2018 07:12 PM
Hi,
I'm having an issue with an ATF Test, following instructions in the DEV training. The Exercise is test a business rule in the NeedIt app. Unfortunatley everything I try fails.
The test steps are:
1. Impersonate user, Fred Luddy
2. Insert NeedIt request setting values for:
when needed: 100 days in the future
Requested for: The impersonated user
Requested for Email: The impersonated users email
3. Record Validation:
when needed: is not empty
Requested for: The impersonated user
Requested for Email: The impersonated users email
Unfortunately it fails everytime on the business rule, checking the When needed date is not in the past or today.
So I tried another test using the Record creation on the form, using the same values:
This also fails but I can see when it runs that the test is not setting any of the values using the set field values!!
Any ideas why this would be?
I'm using London: Build tag: glide-london-06-27-2018__patch1-08-15-2018
Thanks,
Barry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2019 07:16 PM
Someone from the team at ServiceNow Developer Program has informed me that this issue is known to occur in some PDIs but the causes, and the fix, are unknown.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2019 12:56 PM
Hi everyone,
Sorry for the delay. I did not know about this post until PaulP pointed it out to me the other day. Here is a workaround for this issue that should get you working again.
- In Studio, open the NeedIt table and adjust the Application Access settings.
- Use the Application Explorer to open Data Model > Tables > NeedIt.
- Open the Application Access form section (tab).
- Update the configuration.
- Accessible from: All application scopes
- Can read: selected (checked) probably already checked, but do not uncheck it.
- Can create: selected (checked)
- Can update: selected (checked)
- Click the Update button.
After this change, you should be able to successfully run the test. Please let me know if you have any issues.
Thanks,
Ben
ServiceNow Developer Program
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2019 02:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2019 06:04 AM
Hello,
but actually, this is not a solution. The point seems to be, that setting values in Scoped Apps, that give no permissions to enter them from other scopes, can be tested. But this (private Scoped tables) is a very important feature of ServiceNow (data encapsulation) and a testing framework should not force a developer/implementer to change his architecture to the worse.
When will this epic bug be fixed by ServiceNow?
Kind Regards
Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2019 08:45 AM
I am having this same issue when trying to run ATF tests I have created. I did as this post says and I am still having the same issue. Field values are not being set properly, please advise...