Menu

Help needed for executing test cases

Help
2009-04-05
2013-05-29
  • sonali sohoni

    sonali sohoni - 2009-04-05

    Hi,

    When I try to execute test cases, "Can't open test case source ".....\TestCases.TCF".

    Are there any prerequisites for running GUI Replay tool?

    Help appreciated.

    Thanks,

    Sonali Sohoni

     
  • Pekka Aho

    Pekka Aho - 2009-11-04

    Hello,

    I managed to use JFCRipper, convert GUI to EFG, and generate test cases. However JFCReplayer doesn't seem to be able to run the generated test cases. I get the following error after "Executing test case…"

    ERROR Window ID not found

    ERROR GUITAR Exception
    edu.umd.cs.guitar.exception.ComponentNotFound
            at edu.umd.cs.guitar.replayer.Replayer.executeStep(Unknown Source)
            at edu.umd.cs.guitar.replayer.Replayer.execute(Unknown Source)
            at edu.umd.cs.guitar.replayer.JFCReplayer.execute(Unknown Source)
            at edu.umd.cs.guitar.replayer.JFCReplayerMain.main(Unknown Source)
       
    Thanks,

    -Pekka

     
  • Bao N. Nguyen

    Bao N. Nguyen - 2009-11-12

    Can you double check if the right GUI file was used as the replayer input?

     
  • Pekka Aho

    Pekka Aho - 2009-11-12

    Yep, the GUI file should be the right one and the sWidgetID is found from there. I'll try debugging this and give you some more info later.

     
  • Pekka Aho

    Pekka Aho - 2009-11-12

    I put some debugging code into replayer:

            java.io.File file = new java.io.File(sGUIFile);
            log.info("sGUIFile exists: "+file.exists());
            docGUI = builder.parse(sGUIFile);
            log.info("docGUI: "+docGUI);

    And the result was:

           INFO  sGUIFile exists: true
           INFO  docGUI:

    On other words it seems that the name of the GUI file  is ok (file exists) but the parsing fails for some reason. Any ideas why?

     
  • Pekka Aho

    Pekka Aho - 2009-11-12

    My GUI.xml file is quite big: 1268 kb and 41693 lines - could the xml parser run out of memory? No exceptions are visible when the parsing is executed.

     
  • Bao N. Nguyen

    Bao N. Nguyen - 2009-11-12

    No, the parser can handle that size. Did you get any exception? Maybe it's another bug

     
  • Pekka Aho

    Pekka Aho - 2009-11-16

    Hi, made some more debugging, maybe the problem is in xpathExpression:

            docGUI = builder.parse(sGUIFile);
            NodeList nodeList = docGUI.getElementsByTagName("Value");
            for(int i=0;i<nodeList.getLength();i++){
            if(((String)nodeList.item(i).getTextContent()).equalsIgnoreCase("w227")) {
            log.info("nodeList: index "+i+" value is "+nodeList.item(i).getTextContent());
            }
            }

    Result:

           INFO  nodeList: index 7729 value is w227

    And the exception while getting the window name (I added some more debug info):

           INFO  EventID: e54
           INFO  sWidgetID: w227
           INFO  getting window name….
           INFO  xpathExpression: /GUIStructure/GUI[Container//Property]/Window/Attributes/Property/Value/text()
           INFO  docGUI:
           INFO  nodes: 0
           ERROR Window ID not found
           ERROR GUITAR Exception
          edu.umd.cs.guitar.exception.ComponentNotFound

     

Log in to post a comment.