public void Run() { if (string.IsNullOrWhiteSpace(DataExchangeApiUri)) { throw new InvalidOperationException("No runtime API URI was provided. Cannon connect to NeoLoad server."); } if (string.IsNullOrWhiteSpace(this.ApiKey)) { throw new InvalidOperationException("No NeoLoad API Key provided."); } string tsName = "<No test suite available>"; if (TestSuite.Current != null) { tsName = TestSuite.Current.Name; } var ctx = new NeoloadApi.NeoloadContextData() { hardware = this.Hardware, software = this.Software, location = this.Location, script = tsName, osFriendlyName = GetOSFriendlyName(), }; api.ConnectToDataExchangeApi(this.DataExchangeApiUri, this.ApiKey, ctx); }