Skip to main content

Identifying Your Users

With TestFairy's user identification feature, you can enhance your testing and debugging process by efficiently correlating session recordings with specific users and their traits. This capability empowers you to gain deeper insights into how different users interact with your app and aids in the diagnosis of user-specific issues during testing.

Example Configuration

Below are code examples illustrating how to utilize TestFairy's setUserId method on various platforms:

TestFairy.setUserId("<userId>");
Example
// Be sure to import TestFairy
import com.testfairy.TestFairy;

TestFairy.setUserId("john@example.com");

Where userId is a string representing an association to your backend. We recommend passing values such as email, phone number, or user ID your app may use. This value may not be nil and is searchable via API and web search.

Important Notes

To make the most effective use of TestFairy's user identification feature, it's essential to keep in mind the following important notes:

  • The setUserId method can be called multiple times to update the user identifier for different sessions.
  • You can call setUserId before or after initializing a session with begin.
  • The user identifier you provide must not be null and should be chosen from user attributes like email, phone number, or user ID.
  • The user identifier you set using setUserId() will be searchable through the TestFairy API and web search interface.