---
title: Test a component
project: UI Builder
version: 1.0
section: development
language: en
license: MIT
url: https://totaljs.es/docs/uibuilder/1-0/development/testing/
updated: 2026-11-19T11:56:16.260Z
---

# Test a component

> Try a component in the editor and in a published design, and find errors.

A component has two sides, so test both: the editor and the published design.

## In the editor

1. Put the files in the `public` folder of UI Builder, for example `public/components/greeting/`.
2. Import `editor.html` with **Import custom**. See [Your first component](../first-component/).
3. Drag the component onto the canvas, open its settings and change every field.
4. After you change a file, select **Re-load components** in the toolbar. The canvas is built again with the new code and the current design.

Test the component inside a **Form** if it holds a value, and with a component that follows it, such as **To JSON** with **Read value from** set to `@` and its id.

## In a published design

1. Select **Publish**, then **Download HTML**.
2. Put the downloaded page on the same server as the component, for example in `public/`, and open it in the browser.
3. Use the component as a visitor would. Check the value, the validation and the outputs.

The published page loads `render.html` from the address that the design names, so a page opened from your disk cannot read a component on another server unless that server allows it (CORS).

## Find errors

Open the console of your browser. UI Builder writes its messages there, starting with `UIBuilder:`:

| Message | Cause |
|---|---|
| `The component "..." not found` | The design uses a component that did not load, for example because its file has an error. |
| `Output "..." not found in the "..." component` | `instance.output()` names an output that the component does not declare. In a published design, the declaration in `render.html` counts. |
| `Invalid component content` (in the editor) | The address does not return a file with `exports.id` and `exports.make`. |

An error in the code of a component stops the component from loading, and the instances inside it are not shown. Use `instance.error(err)` to log an error with the name of the component and of the instance.

The `app` object of the page is available in the console as `app`: `app.instances` lists every instance, and `app.find(id)` returns one. See [App reference](../app-api/).
