---
title: Testing
project: Total.js V4
version: 0.0.99
section: guides
language: en
license: MIT
url: https://totaljs.es/docs/total-js-v4/0-0-99/guides/testing/
updated: 2026-11-16T15:41:15.818Z
---

# Testing

> Run groups of tests with TESTER() and send virtual requests to your routes with TEST() and ACTION().

There are two tools. `TESTER()` runs groups of tests in order and stops at the first failure. `TEST()` sends virtual requests to your routes with `ACTION()`, without any HTTP connection:

```js
require('total4');

LOAD('config,definitions,schemas,controllers', function() {
	TESTER(function(group, start) {
		group('Products', function(test) {
			test('List', function(next) {
				ACTION('GET /api/products/', function(err, response) {
					next(err);
				});
			});
		});
		start();
	});
});
```

`TEST()` collects many requests and reports the result as an object, as JSON or as an HTML page.
