Identifying your users
TestFairy allows the developer to correlate sessions to app specific information such as users, server-sessions or events.
This is useful in cases where sessions are anonymous and or when sessions are related to server activities that are critical to understanding test behaviour.
Furthermore, TestFairy allows identifying the user with traits such as name, email or phone number. These will later be available for the developer to search upon, or review when looking at a specific session recording.
In order to set session level attributes associated with your user, please see the document on Session Attributes.
First, please make sure you have integrated the TestFairy SDK
Identifying a session meaning setting a unique identifier for your user.
userId is a string representing an association to your backend. We recommend passing values such as email, phone number, or user id that your app may use. This value may not be nil, and is searchable via API and web search.
Example: identify user by email
setUserId:may be called many times.
- You may call
setUserIdbefore or after