This project is read-only.

Model Testing error

May 11, 2009 at 4:53 AM

Hi

        I am currently doing a model to test a GUI program. I have finish part of the model and tried testing the program but keep receiving the error of "TestResult(0, Verdict("Failure"), "Action symbol 'ParentItemAdded_Finish' not enabled in the model". I understand that for every action that return a value is a split action.  in my testHarness i have a case of comparing the imp result and the model result :

case ("ParentItemAdded_Start"):
                  return CompoundTerm.Create("ParentItemAdded_Finish",
                                 c.testAdded());

 

and the action in my model is :

  [Action]
        public static int ParentItemAdded()
        {
            int returnValue = 999;
            userEvent = ControlEvent.addnewItem;
           // return (allToDoItemList.Count == checkItemAdded);
            return returnValue;

        }

and finally i have a testsuit of :

 

TestSuite(
   TestCase(
        LoadProgram(),
        LoadToDolist(),
           addNewItem(),
        AddParentItem(),
    ParentItemAdded_Start()
   
    ))

 

Can anyone enlighten me on this?

 

cheers

 

May 17, 2009 at 11:44 PM

Hi taizhi!

Try modeling ParentItemAdded_Start() and ParentItemAdded_Finish() as separate actions in your model. Use the return type as an argument to ParentItemAdded_Finish().

Hope that is of some help,

jpe