void MoveBackwardAndBrakeThenForward() { InitVehicles(true); runTrigger = true; //triggerTime = this.triggerTime; trigger = new RunTest(AddBrakeTorque); }
/// <summary> /// First verifies the dependencies defined in the depency XML file. After dependencies /// have been verified, we then call the getTestClass(...) method overloaded by the /// tester in their test control class to get an instance of one of the test case /// classes. We then execute the code associated with that test case (and class). /// </summary> /// <param name="testCaseID">The ID representing the test class.</param> /// <param name="dependencyFile">The dependency XML file to use to check dependencies.</param> /// <remarks> /// Author(s): teejay /// Revision: 1.0 /// Modified: 6/04/2003 /// </remarks> public void performRun(string testCaseID, string dependencyFile) { // share the information about the test ID to all... TestCaseID = testCaseID; RunTest testClass = null; try { // DEPENDENCY CHECKING IS DISABLED IN THIS VERSION! IF WE DETERMINE THAT WE // NEED IT WE CAN ADD IT BACK IN. // check the file dependencies... // checkDependencies( dependencyFile ); // get the instance of the test class created by the tester... testClass = (RunTest)getTestClass(testCaseID); Log.Log.printSuccess("EXECUTING Test Case", testCaseID); // set the test ID... testClass.TestCaseID = TestCaseID; // run the executeTest(...) method defined by the test class... testClass.executeTest( ); } catch (RunTestExceptions e) { TestExceptions.printException(e); // rethrow the exception... throw e; } }
void MoveForwardAndBrake() { InitVehicles(false); runTrigger = true; //triggerTime = this.triggerTime; trigger = new RunTest(AddBrakeTorque); }
public async void StartRunTestOverAllSuccessTest(string homeExercisePath1) { //Arrange HomeExercise homeExercise1 = new HomeExercise() { HomeExercisePath = homeExercisePath1 }; List <HomeExercise> homeExercises = new List <HomeExercise>(); homeExercises.Add(homeExercise1); string inputFilePath = @"C:\Users\anton\Desktop\HETS.Project\Matala3\JavaExercises\Exc1\HW1-inout\in1.txt"; string outputFilePath = @"C:\Users\anton\Desktop\HETS.Project\Matala3\JavaExercises\Exc1\HW1-inout\out1.txt"; string input = InputOutputParser.Parser(inputFilePath); string output = InputOutputParser.Parser(outputFilePath); InputOutputModel inputOutputModel = new InputOutputModel() { InputText = input, OutputText = output }; List <InputOutputModel> inputOutputModels = new List <InputOutputModel>(); inputOutputModels.Add(inputOutputModel); int secondsToWait = 5; //Act await RunTest.StartRunTest(homeExercises, inputOutputModels, secondsToWait); //Assert Assert.NotNull(homeExercise1.IsRunTestOk); }
void MoveForwardAndStop() { InitVehicles(false); runTrigger = true; //triggerTime = this.triggerTime; trigger = new RunTest(StopVehicles); }
public void inputCommandTest() { string command = @"//[##][2*2][%^]25364\n-42*254,7%^90##,,3"; string actual = RunTest.RunWithParameter("1", command); string expected = "150"; Assert.AreEqual(expected, actual); }
// This is the main entry point of the application. static void Main(string[] args) { // if you want to use a different Application Delegate class from "AppDelegate" // you can specify it here. UIApplication.Main(args, null, "AppDelegate"); RunTest.Start("api"); mXparser.consolePrintln(".NET version:" + System.Diagnostics.FileVersionInfo.GetVersionInfo(typeof(int).Assembly.Location).ProductVersion); }
private void 시작ToolStripMenuItem1_Click(object sender, EventArgs e) { this.Enabled = false; foreach (MacroNode macronode in Nodes) { RunTest.Run(macronode, true); } this.Enabled = true; }
public XmlNode Execute(RunTest instruction) { var filterBuilder = _filterService.GetTestFilterBuilder(); filterBuilder.AddTest(instruction.FullName); var res = _runner.Run(null, filterBuilder.GetFilter()); return(res); }
static void Main(string[] args) { RunTest.Start("reg"); mXparser.consolePrintln(".NET CLR version:" + Environment.Version); mXparser.consolePrintln(".NET version:" + System.Diagnostics.FileVersionInfo.GetVersionInfo(typeof(int).Assembly.Location).ProductVersion); #if PCL Console.WriteLine(mXparser.getConsoleOutput()); #endif }
void SteerLeftThenRight() { InitVehicles(true); foreach (Vehicle vehicle in this.vehicles) { vehicle.frontSteerAngle = -20f; } runTrigger = true; trigger = new RunTest(RotateRight); }
private void EnqueueTest(ISender sender, TestRequest request) { RunTest message = new RunTest { TestRequestId = request.TestRequestId, FullName = request.TestName }; sender.Send(message); }
private bool StatisticVerificationMinReach(MDPStat mdp, VerificationOutput verificationOutput) { mdp.setNonZeroStates(); var sml = new Simulation(mdp); var pl = new Policy(mdp); var tst = new RunTest(); tst.initRunTest(StatisticalParameters[1], StatisticalParameters[2], StatisticalParameters[3], StatisticalParameters[0]); // string str; return(tst.verifyMDPSPRT(sml, pl, out str)); }
void AutoStopMoveForward() { InitVehicles(false); foreach (Vehicle vehicle in this.vehicles) { vehicle.implementAutoStop = true; vehicle.autoStopBrakeTorque = this.brakeTorque; } runTrigger = true; trigger = new RunTest(StopVehicles); }
private RunTest[] CreateTestObject(Parameters[] parameter) { RunTest[] test = new RunTest[3]; test[0] = new RunTest(parameter[0]); test[1] = new RunTest(parameter[1]); test[2] = new RunTest(parameter[2]); //for (int index=0; index <3; index++) //{ // test[index] = new RunTest(parameter[index]); //} return(test); }
static void Main(string[] args) { RunTest.Start("perf"); mXparser.consolePrintln(".NET CLR version:" + Environment.Version); mXparser.consolePrintln(".NET version:" + System.Diagnostics.FileVersionInfo.GetVersionInfo(typeof(int).Assembly.Location).ProductVersion); #if PCL Console.WriteLine(mXparser.getConsoleOutput()); #endif for (var i = 0.0; i < 25; i += 0.1) { Console.WriteLine($@"{i}, {org.mariuszgromada.math.mxparser.mathcollection.SpecialFunctions.BesselJ(i, 0)}"); } }
/// <summary> /// The function that executed by every thread runnig singe run test case. /// </summary> /// <param name="testCase"></param> public void ExecuteSingleTest(object testCaseObject) { RunTest testCase = (testCaseObject as RunTest); //Execution of the test case. try { testCase.Exceute(testCase.TestParams); } catch (Exception e) { Console.WriteLine(e.Message.ToString()); } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); // Get our button from the layout resource, // and attach an event to it Button button = FindViewById <Button>(Resource.Id.MyButton); button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); }; RunTest.Start("api"); mXparser.consolePrintln(".NET version:" + System.Diagnostics.FileVersionInfo.GetVersionInfo(typeof(int).Assembly.Location).ProductVersion); }
//called on Start Test click private async void ExecuteStartTest() { try { CanStartTest = false; await RunTest.StartRunTest(_homeExercises, InputOutputModels, NumberOfSecondsToWait, _eventAggregator); // change view to ResultsView and publish changes in _homeExercises _eventAggregator.GetEvent <UpdateHomeExercisesEvent>().Publish(_homeExercises); _regionManager.RequestNavigate("ContentRegion", "ResultsView"); } catch (Exception e) { MessageBox.Show(e.Message); } finally { CanStartTest = true; _eventAggregator.GetEvent <UpdateProgressBarEvent>().Publish(0); } }
static void Main(string[] args) { RunTest.Start("syn", "api", "reg"); }
public void ResetAndRun() { Step = 0; SubStep = 0; RunTest run = new RunTest(); run.ProgressUpdate += Run_ProgressUpdate; run.Advance += Run_Advance; run.PatientUpdate += Run_PatientUpdate; _testThread = new Thread(run.Run); _testThread.Start(); }
/* * /// <summary> * /// 각각의 워킹플로우를 실행하는 스레드입니다. * /// </summary> * public void RealRun() * { * for (int i = 0; i < NodesList.Count; i++) * { * if (!threadRunning) break; * int SnapCount = 0; * foreach (MacroNode node in NodesList[i]) * { * if (!threadRunning) break; * SnapCount = RunTest.Run(node, textBox_SnapPath.Text, FilenameList[i], SnapCount, (ImageExtensions)comboBox_ImageFormat.SelectedIndex, SaveScreen); * } * } * } */// RealRun 백업 /// <summary> /// 각각의 워킹플로우를 실행하는 스레드입니다. /// </summary> public void RealRun() { for (int i = 0; i < NodesList.Count; i++) { if (!threadRunning) { break; } if (saveLog | saveScreen) { DirectoryInfo di = new DirectoryInfo(string.Format("{0}\\{1}", textBox_SnapPath.Text, FilenameList[i])); if (!di.Exists) { di.Create(); } } if (SaveLog) { using (FileStream fs = new FileStream(string.Format("{0}\\{1}\\Log.{2}", textBox_SnapPath.Text, FilenameList[i], comboBox_LogFormat.SelectedItem.ToString()), FileMode.Append, FileAccess.Write)) // + "\\" + FilenameList[i] + "\\Log.csv", FileMode.Append, FileAccess.Write)) using (StreamWriter sw = new StreamWriter(fs, Encoding.UTF8)) { sw.WriteLine("No,Time,Event,X,Y,Interval,InputString,Tag,Window Class,Window Caption,Control Type,Name"); int no = 1; foreach (MacroNode node in NodesList[i]) { if (!threadRunning) { break; } RunTest.Run(node, textBox_SnapPath.Text, FilenameList[i], no, (ImageExtensions)comboBox_ImageFormat.SelectedIndex, SaveScreen); if (SaveLog) { StringBuilder className = new StringBuilder(256); StringBuilder caption = new StringBuilder(256); IntPtr hwnd = (IntPtr)WindowFromPoint(Cursor.Position); AutomationElement AE = AutomationElement.FromHandle(hwnd); GetClassName(hwnd, className, 256); GetWindowText(hwnd, caption, 256); sw.WriteLine(string.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11}", (no++).ToString(), DateTime.Now.ToString("yyyy.MM.dd HH:mm:ss"), node.state.ToString(), node.x.ToString(), node.y.ToString(), node.interval.ToString(), node.inputString, node.tag, className, caption, AE.Current.ControlType.LocalizedControlType, AE.Current.Name )); } } sw.Flush(); } } else { int SnapCount = 1; foreach (MacroNode node in NodesList[i]) { if (!threadRunning) { break; } SnapCount = RunTest.Run(node, textBox_SnapPath.Text, FilenameList[i], SnapCount++, (ImageExtensions)comboBox_ImageFormat.SelectedIndex, SaveScreen); } } } }
private bool StatisticVerificationMinReach(MDPStat mdp, VerificationOutput verificationOutput) { mdp.setNonZeroStates(); var sml = new Simulation(mdp); var pl = new Policy(mdp); var tst = new RunTest(); tst.initRunTest(StatisticalParameters[1], StatisticalParameters[2], StatisticalParameters[3], StatisticalParameters[0]); // string str; return tst.verifyMDPSPRT(sml, pl, out str); }
static void Main(string[] args) { RunTest.Run(); }
public void TupleInTuple() { RunTest(1, (2, (3, 4))); }
RemoteExecutor.Invoke( RunTest, providerDump,
public async Task StartBuild(BuildRunRequest request) { try { ReportStatus($"[{request.Build}] Staring"); RunBuild buildInstruction = CreateBuildInstruction(request); string testOutput; using (DockerWrapper docker = new DockerWrapper()) { CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(); //cancellationTokenSource.CancelAfter(TimeSpan.FromSeconds(60)); Dictionary <string, string> environmentVariable = new Dictionary <string, string> { { "TESTER_LISTTESTS", "true" } }; testOutput = await docker.Run(buildInstruction.Image, environmentVariables : environmentVariable, command : buildInstruction.Command, cancellationToken : cancellationTokenSource.Token); } List <RunTest> tests = new List <RunTest>(); string[] testNames = testOutput.Split('\n'); foreach (string testName in testNames) { if (!string.IsNullOrEmpty(testName)) { RunTest item = new RunTest { Build = request.Build, FullName = testName.Trim() }; tests.Add(item); } } AddTestsToDictionary(_expectedTests, tests); // Configure receivers statusMessageReceiver = ConfigureReceiver(QueueNames.Status(request.Build)); testResultReceiver = ConfigureReceiver(QueueNames.TestResponse(request.Build)); // Add all the tests to the queue ReportStatus($"[{request.Build}] Sending Test Instructions ..."); testInstructionSender = ConfigureSender(QueueNames.TestRequest(request.Build)); SendTestInstructions(testInstructionSender, tests); ReportStatus($"[{request.Build}] Test Instructions sent."); // Add the build instruction to the queue ReportStatus($"[{request.Build}] Sending Build Instruction ..."); buildInstructionSender = ConfigureSender(QueueNames.Build()); buildInstructionSender.Send(buildInstruction); ReportStatus($"[{request.Build}] Build Instruction sent."); // Subscribe to the test result queue until all the tests have been completed (notifying subscribers) testResultReceiver.Receive <TestResult>(TestResultReceived); statusMessageReceiver.Receive <StatusMessage>(StatusMessageReceived); // Wait for tests to complete await TestsStillRunning(_cancellationTokenSource.Token); ReportStatus($"DONE"); // Notify cubscribers that the run is complete _testResultMonitor.notifyComplete(); _statusMessageMonitor.notifyComplete(); } catch (Exception ex) { ReportError(ex.Message); } }
static void Main(string[] args) { RunTest.Start("reg"); }
public void Init() { m_rt = new RunTest("TE"); m_rt.AddVariable("TestBranchDir", testBranchDir); }