Create a test

The first step is to create a test resource in the project:


After creating the test, the test editor is opened.

A test contains a hierarchy (tree) of steps. The root step is always a group of other steps. New tests also contains a step that logs a message to the event log. It is there as an example, remove that step if you don't need it.


Adding a step to the test

I start by selecting the root step and then adding an new step to open a browser:


Then configure it to use the browser and provider that we created earlier. You can double-click a step to edit it.


Editing a step initially starts out with the Inline Step Editor that uses a simple expression language to quickly configure parameters for a step. There is also a simple point-and-click editor as well as an expert mode - these are all explained on the Step Editor page.

In this case, the parameters reference the chrome-any and local-provider project resources that we created in the previous section of the tutorial. The format for these expressions is #"resource_id". I will cover more of these expressions in later sections.

Add more steps

Next, I want the browser to load a page, so add and configure a Goto Url step:


You can add a step to close the browser at the end of the test. This is optional - Muse will automatically do this when the test ends.


Step through the test

Use the Play or Step buttons to step through the test. Try stepping through to watch how each step executes. The event log shows detailed information about the execution of each step.


Note that entering and exiting a compound step (such as the root step of every test) is a distinct action and requires a push of the Step button.

After the test finishes (or you stop it), the editor remains in run mode until you reset the editor. This allows you to inspect the test state and event log before clearing the editor.


With a basic test working, I'm ready to interact with elements on the page.

Return to Tutorials page