Assertions and test subjects

The application changes in reaction to user input. For example a button turns green when pressed or a particular network request is made just before video starts playing.

Suitest lets you inspect different objects inside the application and provides flexible ways to create assertions about the object's properties.

Creating assertion

To create assertion in the Suitest Test editor use the Assert or the Wait until lines:

Assert and Wait until "homeMenu" is loaded
Assert and Wait until "homeMenu" is loaded

Assert makes a single immediate check and returns the result. Wait until will make the same checks periodically and will give up after the specified amount of time.

To perform this operation in the Suitest JavaScript API use the assert.

await suitest.assert.element('homemenu').matches([

await suitest.assert.element('homemenu').matches([

Assertions operate on a test subject. Every test subject has it's own set of comparison operations.

Available test subjects

Some test subjects are platform-specific and are available on certain platforms only. Here is the full list: