public void InitFeatureToggle() { TranslationFeature = new TranslationFeature(); SaucelabFeature = new SaucelabFeature(); EncryptFeature = new EncryptFeature(); AmazonEC2Feature = new AmazonEC2Feature(); }
private async void RunSauceTest(object sender, RoutedEventArgs e) { var saucelabFeature = new SaucelabFeature(); if (!saucelabFeature.FeatureEnabled) { MessageBox.Show("This feature is not enabled."); return; } //get workflowid from project tree var selected = ProjectTreeView.SelectedItem as TreeViewItem; if (selected == null) { MessageBox.Show("Please select a test suite from the project tree!"); return; } var selectedItem = selected.DataContext as XElement; if (selectedItem == null) { return; } var workflowId = selectedItem.GetAttributeValue(Constants._ID); var type = selectedItem.GetAttributeValue(Constants._TYPE); var scriptType = selectedItem.GetAttributeValue(Constants.SCRIPT_TYPE); if (!type.Equals(Constants.SCRIPT) || !scriptType.Equals("TestSuite")) { MessageBox.Show("Selected Item MUST be a Test Script!"); return; } //popup a dialog to get the browser os version PopupBrowsersDialogSetDefaultConfig(); _config.Set("HostType", "Sauce"); _autoClient = new AutoClient(_config); await Task.Factory.StartNew(() => RunWorkflowById(workflowId)); //when finished, show a message MessageBox.Show("Your Test finished."); }
private async void RunSauceTest(object sender, RoutedEventArgs e) { var saucelabFeature = new SaucelabFeature(); if (!saucelabFeature.FeatureEnabled) { MessageBox.Show("This feature is not enabled."); return; } //get workflowid from project tree var selected = ProjectTreeView.SelectedItem as TreeViewItem; if (selected == null) { MessageBox.Show("Please select a test suite from the project tree!"); return; } var selectedItem = selected.DataContext as XElement; if (selectedItem == null) return; var workflowId = selectedItem.GetAttributeValue(Constants._ID); var type = selectedItem.GetAttributeValue(Constants._TYPE); var scriptType = selectedItem.GetAttributeValue(Constants.SCRIPT_TYPE); if (!type.Equals(Constants.SCRIPT) || !scriptType.Equals("TestSuite")) { MessageBox.Show("Selected Item MUST be a Test Script!"); return; } //popup a dialog to get the browser os version PopupBrowsersDialogSetDefaultConfig(); _config.Set("HostType", "Sauce"); _autoClient = new AutoClient(_config); await Task.Factory.StartNew(() => RunWorkflowById(workflowId)); //when finished, show a message MessageBox.Show("Your Test finished."); }
public void InitFeatureToggle() { SaucelabFeature = new SaucelabFeature(); }