Running Against Staging and Test Settings Description
Two Important Files
Two files control how the automated UI tests are run.
- testsettings.json
- Constants.cs
A good practice would be to open these two files in your Visual Studio IDE and pin them open.
testsettings.json
{
"testSettings": {
Change these values to modify which browser is in control
// browser variables
"testChrome": true,
"testFirefox": false,
"testEdge": false,
"testSafari": false,
Change the endpoint for testing by modifying the comments below.
Note: 'storageType' is set to 0 for testing against a local copy of Rubex. Set 'storageType' to 1 when testing against all other endpoints.
// endpoint variables
"hubUrl": "https://hub.efilecabinet.net/",
//"targetUrl": "https://localhost:44334/",
//"storageType": 0,
"targetUrl": "https://account-staging.efilecabinet.net/",
//"targetUrl": "https://account.efilecabinet.net/",
//"targetUrl": "https://account-uk.efilecabinet.net/",
//"targetUrl": "https://account-ca.efilecabinet.net/",
//"targetUrl": "https://govcloud.efilecabinet.net/",
"storageType": 1,
For the most part, these values remain unchanged.
// file variables
"baseDownloadsPath": "C:\\ProgramData\\EFC\\downloads\\",
"baseFilePath": "C:\\ProgramData\\EFC\\automationDocs\\",
"s3Url": "https://downloads.efilecabinet.com/",
"s3BucketName": "SanitizedSampleFiles",
"s3ZipFileName": "automationDocs.zip",
"s3AccessId": "AKIA2LJW7OCU3QZIVOGD",
"s3Secret": "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",
For the most part, these values remain unchanged. Reducing the value of 'timeoutInSecs' from 45 to 30 may speed up testing (because failing tests will fail faster).
// wait time variables
"defaultFileInteractionWait": 45,
"roleSelectorSearchWaitTimeInMS": 500,
"timeoutInSecs": 45,
"workflowTimeoutInSecs": 20,
// other variables
"verificationEmailAddress": ""
}
}
Constants.cs
using System;
namespace AutomatedUITests.Configuration.SharedConstants
{
public static class Constants
{
public static TimeSpan DefaultImplicitWait { get; } = TimeSpan.FromSeconds(0.5);
public static TimeSpan SmallImplicitWait { get; } = TimeSpan.FromSeconds(1.0);
public static TimeSpan MediumImplicitWait { get; } = TimeSpan.FromSeconds(2.0);
public static TimeSpan LargeImplicitWait { get; } = TimeSpan.FromSeconds(3.0);
MaxThreadCount controls the number of tests that are run simultaneously. '2' is a good number. '3' is the maximum value to use.
HEADLESS_MODE = true; -> run a headless (invisible) browser. This results in much faster test runs.
HEADLESS_MODE = false; -> run a visible browser.
public const int MaxThreadCount = 2;
public const bool HEADLESS_MODE = false;
public const string CABINET_PREFIX = "CABINET-";
public const string DRAWER_PREFIX = "DRAWER-";
public const string FOLDER_PREFIX = "FOLDER-";
public const string FILE_PREFIX = "FILE-";
public const string ADMIN_USER_PREFIX = "ADMIN-";
public const string STANDARD_USER_PREFIX = "STANDARD-";
public const string SHARING_USER_PREFIX = "SHARING-";
public const string CUSTOM_USER_PREFIX = "CUSTOM-";
public const string GUEST_USER_PREFIX = "GUEST-";
public const string USER_SUFFIX = "@efilecabinet.com";
public const string GROUP_PREFIX = "GROUP-";
public const string PROFILE_PREFIX = "PROFILE-";
public const string TEMPLATE_PREFIX = "TEMPLATE-";
public const string SALESFORCE_PREFIX = "SALESFORCE-";
public const string MAIN_STRUCTURE_PREFIX = "MAIN-";
public const string SEARCH_STRING = "-eFile";
public const string UNIQUE_SEARCH_STRING = "-rubex";
}
}
No Comments