Identifying Your Users
TestFairy allows developers to correlate sessions to app-specific information such as users, server sessions, or events.
This is useful in cases where sessions are anonymous or when sessions are related to server activities that are critical to understanding test behavior.
Furthermore, TestFairy enables the identification of users with traits such as name, email, or phone number. These traits will later be available for the developer to search or review when looking at a specific session recording.
Syntax
TestFairy.setUserId("<userId>");
Where 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.
Code Example
// Be sure to import TestFairy import com.testfairy.TestFairy; TestFairy.setUserId("john@example.com");
Syntax
[TestFairy setUserId:@"<userId>"];
Where 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.
Code Example
// Be sure to import TestFairy #import "TestFairy.h" [TestFairy setUserId:@"john@example.com"];
Syntax
TestFairy.setUserId("<userId>");
Where 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.
Code Example
TestFairy.setUserId("john@example.com");
Syntax
TestFairy.setUserId("<userId>");
Where 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.
Code Example
// Be sure to import TestFairy const TestFairy = require('react-native-testfairy'); TestFairy.setUserId("john@example.com");
Syntax
TestFairySDK.setUserId("<userId>");
Where 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.
Code Example
// Be sure to import TestFairy import { TestFairySDK } from 'nativescript-testfairy'; TestFairySDK.setUserId("john@example.com");
Syntax
TestFairy.SetUserId ("<userId>");
Where 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.
Code Example
// Be sure to import TestFairy using TestFairyLib; TestFairy.SetUserId ("john@example.com");
Syntax
TestFairy.setUserId("<userId>");
Where 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.
Code Example
// Be sure to import TestFairy using TestFairyUnity; TestFairy.setUserId("john@example.com");
Syntax
AirTestFairy.setUserId("<userId>");
Where 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.
Code Example
// Be sure to import TestFairy import com.testfairy.AirTestFairy; AirTestFairy.setUserId("john@example.com");
Syntax
TiTestFairy.setUserId("<userId>");
Where 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.
Code Example
// Be sure to import TestFairy var TiTestFairy = require('com.testfairy.titestfairy'); TiTestFairy.setUserId("john@example.com");
Notes
setUserId:
may be called many times- You may call
setUserId
before or afterbegin
Last updated on 2023-05-23