Пример #1
0
        public static void AssemblyInitialize(TestContext testContext)
        {
            string workingDir = Path.Combine(ProcessProvider.GetEntryProcessApplicationPath(), "Demos", "TestAPI");

            _testApiProcess = ProcessProvider.StartProcess("dotnet", workingDir, " run", true);
            ProcessProvider.WaitPortToGetBusy(55215);
        }
Пример #2
0
 public void AssemblyInitialize()
 {
     // TODO: Remove this code once you use your own web service! It is needed only to run the sample tests.
     if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
     {
         string workingDir = Path.Combine(ProcessProvider.GetEntryProcessApplicationPath(), "Demos", "TestAPI");
         _testApiProcess = ProcessProvider.StartProcess("dotnet", workingDir, " run", true);
         ProcessProvider.WaitPortToGetBusy(55215);
     }
 }
Пример #3
0
        public static void AssemblyInitialize(TestContext testContext)
        {
            var app = new App();

            app.UseMsTestSettings();
            app.UseExecutionTimeUnderExtensions();
            app.UseApiAuthenticationStrategies();
            app.UseApiExtensionsBddLogging();
            app.UseAssertExtensionsBddLogging();
            app.UseLogExecution();
            app.UseRetryFailedRequests();
            app.UseAllure();
            string workingDir = Path.Combine(ProcessProvider.GetEntryProcessApplicationPath(), "Demos", "TestAPI");

            _testApiProcess = ProcessProvider.StartProcess("dotnet", workingDir, " run", true);
            ProcessProvider.WaitPortToGetBusy(55215);
        }
Пример #4
0
        public static void PreBeforeTestRun()
        {
            var app = new App();

            app.UseMsTestSettings();
            app.UseExecutionTimeUnderExtensions();
            app.UseApiExtensionsBddLogging();
            app.UseAssertExtensionsBddLogging();
            app.UseLogExecution();
            app.UseRetryFailedRequests();
            app.UseAllure();
            string workingDir = Path.Combine(ProcessProvider.GetEntryProcessApplicationPath(), "Demos", "TestAPI");

            _testApiProcess = ProcessProvider.StartProcess("dotnet", workingDir, " run", true);
            ProcessProvider.WaitPortToGetBusy(55215);

            InitializeTestExecutionBehaviorObservers(TestExecutionProvider);
        }
Пример #5
0
        public static void AssemblyInitialize(TestContext testContext)
        {
            var app = new App();

            app.UseExceptionLogger();
            app.UseMsTestSettings();
            app.UseExecutionTimeUnderExtensions();
            app.UseApiAuthenticationStrategies();
            app.UseApiExtensionsBddLogging();
            app.UseAssertExtensionsBddLogging();
            app.UseLogExecution();
            app.UseRetryFailedRequests();
            app.Initialize();

            // TODO: Remove this code once you use your own web service! It is needed only to run the sample tests.
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                string workingDir = Path.Combine(ProcessProvider.GetEntryProcessApplicationPath(), "Demos", "TestAPI");
                _testApiProcess = ProcessProvider.StartProcess("dotnet", workingDir, " run", true);
                ProcessProvider.WaitPortToGetBusy(55215);
            }

            // Software machine automation module helps you to install the required software to the developer's machine
            // such as a specific version of the browsers, browser extensions, and any other required software.
            // You can configure it from BELLATRIX configuration file testFrameworkSettings.json
            //  "machineAutomationSettings": {
            //      "isEnabled": "true",
            //      "packagesToBeInstalled": [ "googlechrome", "firefox --version=65.0.2", "opera" ]
            //  }
            //
            // You need to specify the packages to be installed in the packagesToBeInstalled array. You can search for packages in the
            // public community repository- https://chocolatey.org/
            //
            // To use the service you need to start Visual Studio in Administrative Mode. The service supports currently only Windows.
            // In the future BELLATRIX releases we will support OSX and Linux as well.
            //
            // To use the machine automation setup- install Bellatrix.MachineAutomation NuGet package.
            // SoftwareAutomationService.InstallRequiredSoftware();
        }