Best Practices Guide

Updated by Hyder Ali

In this guide, we go over a variety of best practices and general recommendations. By adhering to these recommendations, you can be sure that you're getting the most out of Sofy.

Universal

  • Active release error message: If you encounter an error message that tells you that you don’t have an active release, go to the main menu, click on the release menu item, and create a new release or extend the current release. Please note: If the end date of the release has passed, you cannot create a new release.

Device Lab

  • Browsers: When using Sofy, we recommend that PC users use Google's Chrome browser and that Apple system user use Apple's Safari browser.
  • Good internet connectivity: It's always to wise to confirm that you're operating with solid internet connectivity. Your device interaction is impacted by the speed of your internet connectivity and for best performance, we recommend connection speeds of 50 Mbps or above.
  • No preferred device: If you don’t have a preferred device, select premier (most recent) devices in the Lab. They will give you best performance.
    When you start a new app to begin testing with Sofy, start with premier devices (most recent) to create your tests and then run them on older devices.
  • View full set of devices: To see the full set of devices, always go to Device Lab by clicking Device menu on left menu item. What you see in the top of the Sofy Portal is only a subset of the available devices. It was designed for quick access.
  • Be wary of popup blockers: If you've acquired a device and found that Device Lab does not automatically open in a browser tab, this was mosely likely because it was was blocked by a popup blocker. To get around this, you can click the Open button to open the device.
    While the device session is already open, avoid using the Open button again because this action opens a new browser session on a new tab. Having multiple device sessions on multiple tabs causes unknown conflicts. The best practice here is to use an existing device session.
  • Release the device before closing: Before you close the browser, release the device by Clicking on the End button. This can be found among the left menu Items.

Creating automation

General

  • Element Explorer: To see if your app is designed to work well with Sofy's no-code automation, check Element Explorer to make sure component meta data is well defined.
  • Practice tests: We recommend always creating a few practice tests to become more familiar with how Sofy's no-code automation works.
  • Execute after test creation: After you create a test, execute it to see if it works as intended.
  • Refresh if missing: If a test you've just created does no show up in the list of Automated Tests, you need to hit refresh icon to see the test case.
  • View results after execution: Once you execute a test, be sure to look at the Test Results.
  • Use Start Refresh: When you want to save a Test, always use Start Fresh.
  • Template creation: To create a Template, use the "Continue from Here" option.
  • Templates equal efficiency: You can create a Template for actions that are constantly repeated such as login, setting up user profile, etc.
  • Test Data also helps with efficiency: Using Test Data avoids having to repeat typing into input box.
  • Use of Delays: A typical reason for test failure is the absence of delays between steps. When a particular step in a test case takes a longer time than expected to perform an action, add a corresponding delay. When a test fails, review the failed step by Comparing with the Recording. If the steps are out of sync, you can very likely fix the issue by introducing a delay.
  • Precision during recordings: When you peform a scroll action during a recording, be as precise as you can be and avoid multiple scroll actions in succession.
  • Completion or failure notification emails: If you want to be notified of the completion or failures of scheduled Runs, go to App Manager and set notification email to get notification.

iOS-specific

  • Use of Key Ring memory: When you app caches data in keyring memory (for example, login credentials), this impacts application flow. There are no APIs to clear Ring Memory. However, there are ways to handle Ring Memory cache issues during testing. They are as follows:
    • Make sure that you run your test in the same state in which it was recorded. For example, if a test is recorded with an app in a pre-login state, ensure that app does not have a user logged in when the test starts. Also, make sure this is the case when you run Scheduled Tests.
    • As a development best practice, clear keyring memory as part of an Uninstall event.
  • Sidestepping slow down: When you perform an Action in the Lab (such as clicking a button or typing text in a text box), wait until the status message on the top right corner displays "Ready". The indicates that Sofy has completed the action. If you don’t wait and perform more actions or repeat the same step, these actions become queued up and will cause slow down.
  • Test data and text boxes: When using test data to enter values into the text box, exercise patience since this takes a little longer than typing the text. Wait to make to see the "Ready" status before performing your next action. We are currently working to implement performance improvements that will benefit this task.
  • Cursor focus, text boxes, and text entry: When entering text into text box, ensure the cursor focus is set to the textbox before text entry. Please note that when the textbox is a password, iOS does not provide feedback for text entry (that is, when you are mirroring the device as Sofy does).


How did we do?