Running Against Staging and Test Settings Description
DescriptionTwo ofImportant eachFiles
Two settingfiles control how the automated UI tests are run.
- testsettings.json
- Constants.cs
A good practice would be to open these two files in theyour testSettings.Visual Studio IDE and pin them open.
testsettings.json
{
Browser Controls"testSettings": -{
SetChange truethese or falsevalues to controlmodify which browsersbrowser seleniumis willin attemptcontrol
to run: // browser variables
"testChrome": [true/false],true,
"testFirefox": [true/false],false,
"testEdge": [true/false],false,
"testSafari": [true/false]false,
UrlChange the endpoint for testing by modifying the comments below.
Note: 'storageType' is set to run0 thefor teststesting against (Note:a youlocal needcopy theof trailingRubex. slash andSet nothing'storageType' elseto behind1 thewhen basetesting url)against all other endpoints.
// endpoint variables
"hubUrl": "https://hub.efilecabinet.net/",
//"targetUrl": ["https://localhost:44334/",
//"storageType": 0,
"targetUrl": "https://account-staging.efilecabinet.net/"],
Url of the hub, this is used for signing the test accounts
//"hubUrl"targetUrl": "https://hub-staging.account.efilecabinet.net/",
How long Selenium will implicitly wait before failing an action//"targetUrl": "timeoutInSecs"https://account-uk.efilecabinet.net/",
//"targetUrl": 10,"https://account-ca.efilecabinet.net/",
Automation Files//"targetUrl": -"https://govcloud.efilecabinet.net/",
S3 info"storageType": and1,
filepath to store any documents to be used byFor the testsmost 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,
"storageType": 0,
Token used to sign the test accounts
"testAccountSigningToken": "52812BA9-0ED7-4C19-A818-C9CE4B9A8849",
Separate wait time for the role selector "roleSelectorSearchWaitTimeInMS": 500,
Where files downloaded from rubex will be stored "baseDownloadsPath"timeoutInSecs": 45,
"workflowTimeoutInSecs": 20,
// other variables
"verificationEmailAddress": "C:\\ProgramData\\EFC\\downloads\\"
How}
}
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 againsta staging:headless (invisible) Changebrowser. 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 = "targetUrl"CABINET-";
to thepublic appropriateconst urlstring
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";
azure, 1public const string UNIQUE_SEARCH_STRING = "-rubex";
S3)
}
If tests are failing during account initialization, the storageType is probably the reason why