Hero Background

Power Your Software Testing with AI Agents and Cloud

The Native AI-Agentic Cloud Platform to Supercharge Quality Engineering. Test Intelligently and Ship Faster.

Kane CLICRM

Test lead creation and the owner it lands on

Required fields enforced, a lead created, and an owner assignment that decides who actually follows it up.

Published on:

A lead that reaches the CRM with no owner is a lead nobody calls. The record exists, the dashboard counts it, and the pipeline loses it without a trace.

This use case creates a lead on the Salesfource clone and follows it into the list view.

The flow under test

The ownership assertion is the only one of these that decides whether a human ever actually sees the lead.

  • Required fields are enforced - an empty save produces inline errors on last name and company.
  • The lead is created - with an id of 00Q101 and the details entered.
  • The owner is assigned - Marco Oduya, asserted on the confirmation and again in the list.
  • The list count moves - the all open leads view reporting two rows.

Asserting the owner in the list view rather than only on the confirmation is what catches an assignment that is accepted on the form and dropped on save. That is a common CRM defect and it is invisible from the record page.

Note

Note: Kane CLI drives a CRM the same way a sales rep does, from the labels on screen, so no object metadata or API setup sits between the test and the interface. Start on TestMu AI. Start for free

The test file

The empty save comes first, which is both the cheapest place to test validation and what a distracted rep actually does.

---
mode: testing
url: https://my-testing-repo-main.vercel.app/salesforce-clone-app/leads?reset=true
max_steps: 45
tags: [salesforce, crm, leads]
---

# Salesfource 28.1: Lead creation

Catalog objective: create a lead through the form with its required fields.
Key assertion: the lead appears in the list view with the correct owner.

## Open the new lead form
Click "New Lead" and verify a "New Lead" form appears with "Last Name *" and "Company *" marked as required.

## Verify the required fields are enforced
Click "Save" with the form empty and verify inline errors appear on "Last Name *" and "Company *".

## Fill in the lead
Type "Rivera" into "Last Name *", "Riverfield FC" into "Company *", "sam@riverfield.test" into "Email", select "Partner Referral" in "Lead Source", and select "Marco Oduya" in "Lead Owner".

## Verify the lead is in the list with the right owner
Click "Save" and verify a green banner titled "Lead created" names lead "00Q101" for Rivera at Riverfield FC owned by Marco Oduya, and the "All Open Leads (2)" table shows that row with an owner of "Marco Oduya".

The required markers are asserted as part of the form, so a field that stops being required is visible in the test rather than only surfacing as dirty data months later.

Step by step coverage

A form, a refusal, the data and the record.

StepWhat it proves
Open the new lead formThe form renders with its required fields marked
Verify the required fields are enforcedAn empty save is refused with inline errors
Fill in the leadName, company, email, source and owner are all accepted
Verify the lead is in the list with the right ownerThe lead exists with its id and the owner survived the save

Lead source is captured too. It is the field that decides attribution reporting, and it is the one most often left to a default nobody chose.

Next-generation test execution with TestMu AI

Running it

kane-cli testmd run tests/salesforce/lead-creation_test.md

Point this at a sandbox org. The flow creates a real record in whichever environment the front matter names.

CRM customisation changes faster than the code around it, which makes a plain English test more durable than a selector-based one. How browser agents read a page covers why, and the test.md format covers the file layout.

Author

...

Bhawana

Blogs: 75

  • Twitter
  • Linkedin

Bhawana is a Community Evangelist at TestMu AI with over 3 years of experience creating technically accurate, strategy-driven content in software testing. She has authored 50+ blogs on test automation, cross-browser testing, mobile testing, and real device testing. She also serves as Product Marketing Manager for Kane CLI, the command-line tool that runs browser automation from the terminal using natural-language flows in a real Chrome browser. Bhawana is certified in KaneAI, Selenium, Appium, Playwright, and Cypress, reflecting her hands-on knowledge of modern automation practices. On LinkedIn, she is followed by 6000+ QA engineers, testers, AI automation testers, and tech leaders.

Add to Google preferred sources

Summarise with AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Lead Creation FAQs

Did you find this page helpful?

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests