> For the complete documentation index, see [llms.txt](https://learning.contextqa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learning.contextqa.com/packaged-application-testing/salesforce-testing/insurance.md).

# Insurance

Test Salesforce first notice of loss through claim closure with practical UI and API steps, negative cases, and release-readiness evidence.

> **Documentation owner:** [Deep Barot](https://contextqa.com/academy/) · **Last updated:** November 12, 2026

## Quick answer

To test insurance with ContextQA, automate first notice of loss through claim closure, verify saved records and role-specific outcomes, and attach the results to the release decision. Start with your org’s actual schema and active rules, then test both successful and rejected transitions.

## Key takeaways

* Protect claim state, evidence completeness, and the settlement handoff.
* Pair visible outcomes with record-level assertions and negative tests.
* Base sign-off on candidate-specific evidence and unresolved coverage gaps.

## When to use this guide

Protect claim state, evidence completeness, and the settlement handoff. Use it when changing fields, rules, integrations, permissions, or AI-generated code that touches this process.

## Before you start

Claims handler, adjuster, and supervisor; synthetic policies, coverage dates, loss details, deductible, claim amounts, and approved settlement rules. Use an approved test org and isolate data by run. Record the active rule versions and expected outcomes with the process owner.

Claims may use Case, industry objects, or custom objects. Confirm the actual schema and enabled validation rules. A demo that leaves a rule inactive cannot prove that the control is enforced.

## How to build the end-to-end test

Start with [Salesforce test generation and execution](https://learning.contextqa.com/packaged-application-testing/salesforce-testing/test-generation-and-execution.md). Create or generate the case from the reviewed requirement, add a reusable role-specific login prerequisite, and parameterize environment and record data.

1. **Register first notice of loss.** Create a claim linked to the synthetic policy; verify loss date, coverage reference, and reported amount.
2. **Assign and investigate.** Assign an adjuster and record investigation findings, attachments, and root cause where required.
3. **Decide and settle.** Exercise settlement and denial separately; verify the decision reason, permitted amount, deductible treatment, and approver.
4. **Close and reconcile.** Verify closure evidence, final status, and a simulated payment handoff tied to the same claim identifier.
5. Read back the saved records through an authorized API or supported query. Assert exact relationships and business values; a success notification alone is insufficient.
6. Run the case from a clean session, review screenshots and logs, and attach the result to the relevant requirement. Clean up only records owned by this test run.

## Extend coverage to quote-to-bind and underwriting

The claims journey is one part of insurance release coverage. Create separate suites for these related modules using the same reviewed UI/API method:

| Module                           | Steps to automate                                                                                             | Assertions and negative checks                                                                                               |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| Quote-to-bind                    | Create a synthetic request, check eligibility, calculate quote, approve, bind                                 | Expected premium and coverage, required disclosures, policy reference; reject ineligible combinations and unapproved binding |
| Underwriting submission          | Create application, submit evidence, review, quote, bind or decline                                           | Permitted stage sequence, reviewer authority, required evidence, decline reason; prevent skipping a mandatory review         |
| Agency/broker servicing          | Link the synthetic account and opportunity, assign producer, progress the submission, verify servicing access | Producer/account relationships and access; reject cross-account access under the configured sharing policy                   |
| Rating and product combinations  | Parameterize permitted state/product inputs and boundary values; compare reviewed expected prices             | Explicit calculation oracle and rounding; unsupported combinations rejected rather than silently defaulted                   |
| Policy documents and disclosures | Generate the test document and compare approved content and layout                                            | Correct version, customer/product references, required wording; visual checks supplement content assertions                  |

Connect quote-to-bind to the [Revenue Cloud and CPQ guide](https://learning.contextqa.com/packaged-application-testing/salesforce-testing/revenue-cloud-cpq.md) only when that product or a corresponding custom workflow is installed. A successful simulated quote does not establish coverage of a carrier’s pricing engine. Use authorized test integrations for external rating and policy administration.

## Negative and boundary tests

| Scenario             | Expected evidence                                                                     |
| -------------------- | ------------------------------------------------------------------------------------- |
| Missing root cause   | If the configured rule requires root cause, closure fails and the claim remains open. |
| Out-of-coverage loss | The configured coverage exception is raised and no automatic settlement is issued.    |
| Duplicate notice     | The configured duplicate handling prevents an unintended second settlement.           |

Create separate cases or data rows for these scenarios. An expected rejection passes only when the correct error is observed and protected state remains unchanged. An unrelated timeout is a failure to validate the scenario.

## Practical release-readiness example

A claim-closure validation rule changes. Run one complete claim, one missing required evidence, and one denial; reconcile downstream settlement references.

Use [Salesforce release readiness](https://learning.contextqa.com/packaged-application-testing/salesforce-testing/seasonal-release-readiness.md) to record the change, affected roles, mapped cases, build, org, run links, unresolved defects, and owner decision. Include selected regression and critical unaffected journeys when shared configuration is involved.

## What evidence should the reviewer see?

* A screenshot of the key transition and its visible result, with synthetic data.
* A sanitized record readback proving identifiers, relationships, and final state.
* Results for the relevant allowed and restricted roles, including expected rejections.
* The tested configuration/build, case revision, and triage outcome for failures or blocked cases.

These are acceptance criteria for your run, not a claim that this guide has executed your org. Use [hybrid UI and API testing](https://learning.contextqa.com/packaged-application-testing/salesforce-testing/hybrid-ui-api-testing.md) to connect the evidence.

## Frequently asked questions

### Can ContextQA generate these cases from requirements?

Yes. Supply the actual objects, roles, rules, and expected business outcomes. Review the generated steps and assertions before running them; example field names and stage values are not universal Salesforce configuration.

### What if the required rule is inactive?

Record a configuration gap and agree the intended behavior with the owner. Do not mark a negative scenario passed because the test could save invalid data. Activate a rule only through your approved configuration process.

### How does this support agentic workflows?

Use the configured [Slack and Linear workflow](https://learning.contextqa.com/enterprise-application-testing/ship/slack-linear-to-release.md) to turn a reported failure into a reproducible case and evidence. After an approved fix, rerun the case and affected regression against the candidate build before closing the issue.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://learning.contextqa.com/packaged-application-testing/salesforce-testing/insurance.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
