Forum Discussion

mortenb123's avatar
mortenb123
Contributor
5 years ago

testcomplete jobselector

I need to edit the projectfile the *.mds file to enable and disable the tests I like to run, this is easy to do, but require I either fire up testComplete or edit the file manually.

 

Is there a simple script, or webfrontend that can edit this file, if not I will create my own.

  • mortenb123's avatar
    mortenb123
    5 years ago

    During the weekend I spent some hours on this.

     

    You can just save a separate *.mds file for each template.

    But this does not take into account updates, so we ended up with a single *.mds file,

    then using python's built in xml parser xml.etree.ElementTree and disable everything, then turn on all test that should be on and then turn on based on a template. so in case of Errors I can easily only run that subgroup of tests and save 3hours compared to the full test.

     

    The only tricky part where tests that were parents but not groups, I needed to hardcode as both tests and group.

     

    But what I would say this is pure xml and all xml libraries can surely edit and save it without missing any content.

     

  • I forgot to mention this is for machines that do not have testcomplete, only TestExecute

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Just to clarify BenoitB 

         

        The first suggestion means that all your Test Items in your MDS project would be enabled (checked) and you would use the command line to run the specific ones you want.  Each one you run would require another command-line to execute it individually unless you have them grouped where you can run the parent and it would execute the children.

         

        The second suggestion requires code work to read from the CSV/INI file and run the code routines directly that are referenced by the Test Items.  The Test Item objects themsevles, within code, do not have a "Run" or "Execute" method on them.  But say the Test Item points to a Keyword test or a Script routine, you can execute those based upon what's in the CSV/INI file.

         

        To answer your question about editing the MDS...  while it can be done, I wouldn't recommend it.  

         

        As for Web interface, that's what test management tools like QAComplete or Jenkins or other such things are there for.  TestComplete doesn't have one itself (t's a client tool, not a web tool) but QA Complete can control what tests run.