Although Expressium generates most of the framework source code, an initial verification and minor customization may be required after code generation.
Be aware that the code generation process will generally overwrite existing files in the IDE solution. However, any page object classes with custom implementation contained within the 'Extensions' regions will remain preserved during code generation. Furthermore, UI test classes will only be updated as long as 'TODO' comments exist in the files.
Parallel test execution is by default enabled for both UI and BDD tests. To disable this feature, simply comment out or remove the relevant lines in the AssemblyInfo class file.
The snippets below represent typical customizations applied to the generated source code.
#region Extensions public void LoginWithCredentials(string username, string password) { logger.InfoFormat("LoginWithCredentials()"); SetUsername(username); SetPassword(password); ClickLogIn(); } #endregion
public void InitializeBrowserWithLogin() { InitializeBrowser(); var loginPage = new LoginPage(logger, driver); loginPage.LoginWithCredentials(configuration.Username, configuration.Password); }
[OneTimeSetUp] public void OneTimeSetUp() { InitializeBrowserWithLogin();// TODO - Implement potential missing page navigations...var mainMenuBar = new MainMenuBar(logger, driver); mainMenuBar.ClickHome(); homePage = new HomePage(logger, driver); }
using NUnit.Framework; //[assembly: Parallelizable(ParallelScope.Fixtures)] //[assembly: LevelOfParallelism(4)]
{ "Profiles": { "Development": { "Company": "Expressium", "Project": "Coffeeshop", "Environment": "Development", "Url": "https://expressium.dev/coffeeshop/index.html", "Username": "john.doe@microsoft.com", "Password": "1234567890", "Logging": true, "LoggingPath": ".\\TestResults", "Chrome": "Chrome", "Maximize": true, "Headless": false, "WindowSize": false, "WindowWidth": 1920, "WindowHeight": 1080, "Highlight": true, "HighlightTimeOut": 250, "Screenshot": true, "ShowAlerts": false, "ShowAlertsTimeOut": 2500 } } }