ATF test set values not setting values

Community Alums
Not applicable

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

find_real_file.png

 

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:

find_real_file.png

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

 

 

 

 

 

 

 

10 REPLIES 10

PaulP
Kilo Contributor

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.

Community Alums
Not applicable

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. 

  1. In Studio, open the NeedIt table and adjust the Application Access settings.
    1. Use the Application Explorer to open Data Model > Tables > NeedIt.
    2. Open the Application Access form section (tab).
    3. Update the configuration.
      1. Accessible from: All application scopes
      2. Can read: selected (checked) probably already checked, but do not uncheck it.
      3. Can create: selected (checked)
      4. Can update: selected (checked)
    4. Click the Update button.

find_real_file.png

 

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

Thanks bsweetser, that worked like a charm:

find_real_file.png

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

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...