I have an ITestPlanImportCustomDialog that imports test plans from Excel. Many of my users use it exclusively, they rarely directly open TapPlan files. To simplify their workflow, I set about to eliminate the Import process by creating an alternative “Excel Test Plan” test step. The step just has one string property, the path to the Excel test plan.
In the setter of the step’s Excel file property, the Excel file is automatically imported as child steps. Then I can successfully run the test plan, so far so good.
But here’s where things get tricky. When the user initiates a test plan run, I am checking whether the Excel file has been modified, and if it has, I would like to re-import it, thereby modifying ChildTestSteps. But OpenTap doesn’t allow this, TestStep.ChildTestSteps.Add throws an exception when TestPlan.IsRunning == true.
Any thoughts? Is there a better way to approach this? Is this all just a bad idea?