Testing Online Customer Forms

Testing Online Forms can be challenging as the beginning of most test cases is to select the record for start. Here we demonstrate how to test an online form

Select the Online Form to be Tested

Note the Lead Source Value

Also note the Publishable Form URL

Copy this value somewhere handy. You will be placing this value in a custom test step.

When building our test, we must find a link to a record inside of NetSuite. In many cases the record is simply a newly created record in NetSuite. In this scenario we need to track a record created by outside sources (Online Customer Form). We find a record linked to newly created data. In this case we will begin our test on the Marketing Campaign Record used as the Lead Source of our Online Form.

Now on to the Test itself

Assertology>Scenarios>Test Cases>New

Name: Choose a unique test name

Start with Record Type: We will not be creating a new record in the UI so we can just choose Assertology Test Step. As the recorder begins, we will move directly to the Marketing Campaign record for our first step

Under the Preferences tab choose RECORD OTHER USERS

This will pick up activity in the account that is not the logged in user.

START RECORDING

Go to the Marketing Campaign tied to your Online Form

Choose EDIT and simply RESAVE without making any changes. The recorder is now picking up this record.

Add a Custom Test Step

URL: (note the url is only relative to our example. Your instance will vary)

https://tstdrv1969727.extforms.netsuite.com/app/site/crm/externalleadpage.nl?compid=TSTDRV1969727&formid=1&h=AACffht_NNHlLZ6at_q4lenGjdu1UqiDfA4

HTTP METHOD: POST

CONTENT TYPE: application/x-www-form-urlencoded; charset=UTF-8

HEADERS: leave this field blank

POST DATA: Here I choose to populate the required fields in the form. I’m choosing Bobs Burgers and the Contact will be Jimmy Pesto

companyname=Bobs%20Burgers&firstname=Jimmy&lastname=Pesto

EXPECTED RESPONSE: leave this field blank

Select SAVE & RUN

Click Stop Recording

Post Processing Finalizes and we move to a readily available test

Let’s review what it captured…

Steps

  1. My Form Demo: Edit Existing Campaign Record, Internal ID #100002

  2. Integration

  3. My Form Demo: Check Assertions for Entity, From Step #1

  4. My Form Demo: Check Assertions for Entity, From Step #1

Step 1 - Below is just page one of the values captured from the campaign record.

Step 2 – Our integration step to generate the form data

Step 3 – Entity Data generated (Contact) this is 25 of 40 fields

Step 4 – Entity Data generated (Customer) this is 25 of 167 fields

Now simply run the Test Case

The assertions check show that 2 values changed from the expectation.

  • Cost per Lead is 63.10

  • Leads Generated is 42

All the data created matched expectations, but these fields changed since they are based on a calculation. Every time we create a new lead the math changes. Going forward we should probably deactivate these assertions.


Featured Posts
Recent Posts
Archive
Search By Tags
No tags yet.