Beispiel #1
0
        protected async Task <IApprendaTestSession> StartSession(TestIsolationLevel isolationLevel = TestIsolationLevel.None, [CallerMemberName] string testName = "")
        {
            if (isolationLevel == TestIsolationLevel.CompletelyIsolated)
            {
                await WaitUntilNoOtherTestsAreRunnning();
            }

            var connectionProperties = await _connectionSettingsFactory.GetSmokeTestSettings();

            if (connectionProperties.UserLogin == null)
            {
                connectionProperties.UserLogin = _userLoginRepository.GetNextAvailableUserLogin();
            }
            var session = new ApprendaTestSession(_apiClientFactory, connectionProperties, isolationLevel, _reportingService, testName);

            //ping that we've started!
            _reportingService?.ReportInfo($"Starting test {testName}", new List <string> {
                "teststart", testName
            });

            return(session);
        }