Testing

Questions you may encounter while testing with Suitest. If you cannot find an answer to your question please contact us.

Do you have a continuous integration API?

Yes, check the Suitest Network API for more details. Add your API token in your profile.

How would I check if an element is in a focused state using the test editor?

This greatly depends on the platform you are testing and the implementation of your application.

HTML-based

There are several ways to check if an element is in a focused state:

  • Contents of class attribute
  • Comparing elements visual attributes (text color, border color etc.)

To check for a button in a focused state using the contents of the class attribute, the element of the button should have something along the lines of "Focused" or "ButtonFocused" in the elements class attribute (CSS Selector).

  1. Navigate to the element with the Virtual Remote Control (VRC) or your normal TV control so that the element is in a focused state.

  2. Go to the Element Repository (Elements tab) select the element that is in a focused state and save it. More information about selecting elements.

  3. Switch to the test editor (Tests tab).

  4. Use either an Assert or Wait until line based on your use case.

  5. Select element as the subject.

  6. Select the element you wish to do the assertions on. In the class attribute, switch to the comparator to contains and for example "ButtonFocused" or keep it as it is if you need it to exactly equal the class.

The second option is comparing elements visual attributes to see if the state of the element has changed.

  1. Repeat steps 1 to 5 as seen above. Additionally, you can save the element in normal (unfocused state) to the element repository to be able to tell what properties have changed.

  2. Select the element you wish to do the assertions on. In the properties of the element compare background color, for example, the color was rgba(0,0,0,1.0) in unfocused state and once focused the color is rgba(0,0,255,0). Depending on the style changes of your element there could be a multitude of properties to compare when the element is in a focused state. Find what attributes work for your particular element.

Xbox One Native

Xbox One Native has Focus properties which can be used to check if a particular element is in a focused state. Learn more about Focus properties.

When I export a test into a different application are my elements exported as well?

No. At the moment when you export a test to a different app the elements saved within the repository are only for that particular app, they are not tied to the test.