TestNeo
TestNeo Docs NLP testing
TestNeoDocs › NLP Web & API
Test Manager & Playground

NLP Web & API Testing

Write browser and REST tests in plain English. This guide covers Steps (what runs), Objective goals (Generate steps), and data-driven CSV/JSON loops — the same contracts as the in-app Playground.

One rule: Run always executes Steps — never the Objective text alone. Write Steps directly, or write a goal → Generate steps → review Steps → Run.

Objective vs Steps

LayerWhat it isWho edits it
Objective Human goal / intent. Optional authoring layer. You write a goal, then click Generate steps.
Steps (NLP) Executable lines the runner understands. You, or Generate steps. This is what Run uses.
Run Playwright / API executor. Expands data loops, then runs each NLP line.

In Test Manager you will see Objective and Steps tabs. In Playground, Show goal builds an Objective you can paste; the card NLP is the Steps script.

Web UI NLP (normal Steps)

Browser flows use Navigate, Wait, Click, Fill, Verify, and table helpers.

Navigate to https://www.saucedemo.com
Fill Username with "standard_user"
Fill Password with "secret_sauce"
Click on Login
Wait for 2 seconds
Verify page contains "Products"

Useful Web patterns

After Navigate on React sites (e.g. DemoQA), keep a short Wait for 3 seconds (or wait for the table) before verifies.

API NLP (normal Steps)

REST calls never use browser Navigate to an API host. Use Call API / POST / Verify response.

Call API GET https://fakestoreapi.com/products/1
Verify API response status equals 200
Verify response.id is a number
Verify response.title is a string
POST to https://fakestoreapi.com/products with body {"title": "TestNeo", "price": 9.99, "description": "demo", "category": "electronics", "image": "https://fakestoreapi.com/img/71.jpg"}
Verify API response status equals 201
Verify response.title equals "TestNeo"

Chaining with {{variables}}

Double braces are stored / env variables (not CSV row columns).

Call API GET https://fakestoreapi.com/users/1
Verify API response status equals 200
Store response.id as userId
Call API GET https://fakestoreapi.com/carts/user/{{userId}}
Verify API response status equals 200

Objective goals in detail

Goals are for authoring. Generate steps turns them into NLP. Simple flows use a short Confirm + checklist. Data-driven flows must embed the full loop script.

Simple Web goal

Confirm login at https://www.saucedemo.com:
Fill username/password, click login, land on products.
- page contains "Products"

Generate steps should produce Navigate + Fill + Click + Verify (and usually a Wait).

Simple API goal

Use (API): in the header — not at https://api… (that can plan a browser Navigate).

Confirm GET product (API):
Fetch one product and check types.
- Call API GET https://fakestoreapi.com/products/1
- Verify API response status equals 200
- Verify response.id is a number
- Verify response.title is a string

Data-driven goal (must include the loop)

Soft bullets alone (- POST … {title}) cannot drive a CSV loop. Playground Show goal for data-driven cards embeds the full script and marks [data-driven].

Confirm CSV loop — POST multiple products (API) [data-driven]:
Each CSV row creates a product via FakeStore.

Data:
title,price,description,category
TestNeo Laptop,999.99,Created via CSV POST loop,electronics
TestNeo Watch,149.50,Smart watch from data row,jewelery
End Data:

For each row:
  POST to https://fakestoreapi.com/products with body {"title": "{title}", "price": {price}, "description": "{description}", "category": "{category}", "image": "https://fakestoreapi.com/img/71.jpg"}
  Verify API response status equals 201
  Verify response.title equals "{title}"
  Verify response.category equals "{category}"
End For

After Generate steps, Steps should still show Data:For each row:End For — not only the four POST/Verify lines.

Data-driven loops

PatternPlaygroundTest Manager
Data:End Data: + For each row: Yes (inline) Yes
JSON array inside Data: Yes Yes
Use data from "file.csv" No upload Yes — upload in Test Data first
with body from file "payload.json" No upload Yes — Test Data tab

Row columns use single braces: {productId}, {title}. Env / Store vars use double braces: {{base_url}}, {{authToken}}. In JSON bodies, quote strings ("{title}") but not numbers ({price}).

Use data from (goal that works)

Confirm Use data from CSV (API) [data-driven]:
Upload post-products-valid.csv in Test Data, then run.

Use data from "post-products-valid.csv"

For each row:
  Call API GET {{base_url}}/resource/{name}
  Verify API response status equals 200
  Verify response.description equals "{description}"
End For

Playground sample card: Use data from — project CSV file (Test Manager) (demo file fakestore-products.csv).

Copy-paste recipes

1) Web — SauceDemo login (Steps)

Navigate to https://www.saucedemo.com
Fill Username with "standard_user"
Fill Password with "secret_sauce"
Click on Login
Wait for 2 seconds
Verify page contains "Products"

2) API — FakeStore GET (Steps)

Call API GET https://fakestoreapi.com/products?limit=5
Verify API response status equals 200
Verify response is an array

3) API — CSV GET by category (Steps or full Objective)

Data:
categoryName
electronics
jewelery
End Data:

For each row:
  Call API GET https://fakestoreapi.com/products/category/{categoryName}
  Verify API response status equals 200
End For

4) API — JSON array in Data block

Data:
[{"productId": 5, "expectedCategory": "jewelery"}, {"productId": 9, "expectedCategory": "electronics"}]
End Data:

For each row:
  Call API GET https://fakestoreapi.com/products/{productId}
  Verify API response status equals 200
  Verify response.category equals "{expectedCategory}"
End For

Don’t do this

Broken data-driven Objective — placeholders without a Data / Use data from block. Generate steps will reject this (or produce a single POST with literal {title} on older builds).

Confirm CSV POST (API):
- POST to https://fakestoreapi.com/products with body {"title": "{title}", "price": {price}, ...}
- Verify API response status equals 201

Where to try it

  1. Playground — filter api, data-driven, or nlp-reference; use Show goal then paste into Test Manager.
  2. Test Manager — Objective → Generate steps → Steps → Run. Upload CSVs under Test Data for Use data from.
  3. CLI / VS Code — same NLP Steps format in .testneo files (Steps-first; no Objective tab).

Related: CLI · VS Code · Playwright AI SDK · All docs