internal override IEnumerable <AAction> CreateTestActions(AActionContext context) { // Run Test yield return(new ARunAllMCutTestCasesAction("Run Determinism Test")); if (context.MCutTestRun != null) { // View w/Concurrency Explorer yield return(new AViewConcurrencyExplorerAction()); // Repeat Test yield return(new ARerunMChessTestAction("Repeat Test") { ChildrenIfApplicable = new[] { MChessTestController.CreateMChessOptionsModifier_WithBounds(), //MChessTestController.CreateMChessOptionsModifier_WithTracing(false), MChessTestController.CreateMChessOptionsModifier_WithDebugger(), MChessTestController.CreateMChessOptionsModifier_WithLogging(), } }); // Repro Chess Result if (context.ChessResult != null) { yield return(new SeparatorFauxAction()); foreach (var a in MChessTestController.CreateChessResultActions()) { yield return(a); } } } }
internal override IEnumerable <AAction> CreateTestActions(AActionContext context) { // NOTE: For data race tests, we're not giving the user as many of the options as a normal MChess test // If users want certain options available, then we can add back as we go. // Run Test yield return(new ARunAllMCutTestCasesAction <MChessTestRunOptions>("Run Schedule Test") { ChildrenIfApplicable = MChessTestController.CreateChessBoundsActions(), }); if (context.MCutTestRun != null) { // View w/Concurrency Explorer yield return(new AViewConcurrencyExplorerAction()); // Repeat Test yield return(new ARerunMChessTestAction("Repeat Test") { ChildrenIfApplicable = new[] { MChessTestController.CreateMChessOptionsModifier_WithBounds(), //MChessTestController.CreateMChessOptionsModifier_WithTracing(false), MChessTestController.CreateMChessOptionsModifier_WithDebugger(), MChessTestController.CreateMChessOptionsModifier_WithLogging(), } }); // Continue Test yield return(new AContinueMChessTestRunAction() { ChildrenIfApplicable = new[] { MChessTestController.CreateMChessOptionsModifier_WithBounds(), //MChessTestController.CreateMChessOptionsModifier_WithTracing(true), } }); // Repro Last Schedule yield return(new AReproLastMChessTestRunScheduleAction() { ChildrenIfApplicable = new[] { MChessTestController.CreateMChessOptionsModifier_WithTracing(false), MChessTestController.CreateMChessOptionsModifier_WithDebugger(), MChessTestController.CreateMChessOptionsModifier_WithLogging(), } }); // Repro Chess Result if (context.ChessResult != null) { yield return(new SeparatorFauxAction()); foreach (var a in MChessTestController.CreateChessResultActions()) { yield return(a); } } } }
internal override IEnumerable <AAction> CreateTestActions(AActionContext context) { // Run Test yield return(new ARunAllMCutTestCasesAction <MChessTestRunOptions>("Run Chess Test") { ChildrenIfApplicable = CreateRunChessTestActions(true), }); if (context.MCutTestRun != null) { // View w/Concurrency Explorer yield return(new AViewConcurrencyExplorerAction()); // Repeat Test yield return(new ARerunMChessTestAction("Repeat Test") { ChildrenIfApplicable = new[] { CreateMChessOptionsModifier_WithBounds(), //CreateMChessOptionsModifier_WithTracing(false), CreateMChessOptionsModifier_WithDebugger(), CreateMChessOptionsModifier_WithLogging(), new AMChessOptionsModifier("With Instrumentation Diagnosis", new MChessOptions { PrintDiagnosticInformation = true }), } }); // Continue Test yield return(new AContinueMChessTestRunAction() { ChildrenIfApplicable = new[] { CreateMChessOptionsModifier_WithBounds(), //CreateMChessOptionsModifier_WithTracing(true), } }); // Repro Last Schedule yield return(new AReproLastMChessTestRunScheduleAction() { ChildrenIfApplicable = new[] { CreateMChessOptionsModifier_WithTracing(false), CreateMChessOptionsModifier_WithDebugger(), CreateMChessOptionsModifier_WithLogging(), } }); // Repro Chess Result if (context.ChessResult != null) { yield return(new SeparatorFauxAction()); foreach (var a in CreateChessResultActions()) { yield return(a); } } } }
internal static void BuildContextMenu(ContextMenuStrip strip, EntityBase entity) { AActionContext acontext = new AActionContext(entity); AddActions(strip.Items, acontext.Actions); AddSeparatorSmartly(strip.Items); //System.Diagnostics.Debug.WriteLine(entity.GetType(), "PopupMenu.BuildContextMenu"); string itemTypeName = entity.MenuItemTypeName(); var runEntity = entity as TaskRunEntity; var testProj = entity as TestProjectEntity; // Clear tasks if (entity.CanDeleteTasks()) { strip.Items.Add(new ThunkMenuItem("Clear Tasks", () => { model.controller.AddNewCommand(new DeleteCommand(entity, true, true, false)); })); } // observation file if (entity.DataElement.Attribute(XNames.AObservationFile) != null) { string obsFile = entity.DataElement.Attribute(XNames.AObservationFile).Value; AddSeparatorSmartly(strip.Items); strip.Items.Add(new ThunkMenuItem("Open Observation File", () => { model.controller.AddNewCommand(BrowseCommand.OpenNotepad(obsFile)); })); } // Delete generated observation files if (entity.CanDeleteObservationFiles()) { strip.Items.Add(new ThunkMenuItem("Delete Observation Files", () => { model.controller.AddNewCommand(new DeleteObservationFilesCommand(entity)); }) { Enabled = entity.HasObservationFilesToDelete() }); } // add test/group specific section AddSeparatorSmartly(strip.Items); // Delete self if (entity.IsDeleteable()) { strip.Items.Add(new ThunkMenuItem("Delete " + itemTypeName, () => { model.controller.AddNewCommand(new DeleteCommand(entity, entity.DeletesTasksOnDelete(), true, false)); })); } }
internal override IEnumerable <AAction> CreateTestActions(AActionContext context) { // Run Test yield return(new ARunAllMCutTestCasesAction("Run Observation Generator")); if (context.MCutTestRun != null) { // View w/Concurrency Explorer yield return(new AViewConcurrencyExplorerAction()); // Repro Chess Result if (context.ChessResult != null) { yield return(new SeparatorFauxAction()); foreach (var a in MChessTestController.CreateChessResultActions()) { yield return(a); } } } }
internal override IEnumerable <AAction> CreateTestActions(AActionContext context) { yield return(new ARunAllMCutTestCasesAction("Run Unit Test")); yield return(new ARerunTestAction("Repeat Test")); }
internal abstract IEnumerable <AAction> CreateTestActions(AActionContext context);