How to using multiple object maps in the same test suite (squish)?

164 views Asked by At

I try to build up a usable framework for squish based test cases. Actually it uses one gigantic Object map, which is surely not works later. So, I wanted to split the text based Object map to several script based, according to a logic, but some of them need to be accessible from each test suite.

My problem, that in some case the same test suite would use more then one Object map... if I split it into more, squish doesn't recognize them, and gives me a lookup error, but creates always (even if I delete it / rename it) the names.py script file. If I copy there my objects, it works. But with a custom name (eg. custom_name_map.py) doesn't work.. I didn't found any solution on Froglogic or on QT sits/videos, and in test suite settings I cannot select the default object map, only the fallback object map (which is my custom_name_map.py) In the suite.conf the OBJECTMAP = custom_name_map.py

*suite_example

  • /shared
  •    /scripts
    
  •        custom_name_common_map.py
    
  •        names.py
    
  •        names.pyc (?????? what is  this? cannot be opened)
    
  •    /steps
    
  •        example_steps.py
    
  • /tst-example
  •    /**suite_tst_example_1**
    
  •        /shared
    
  •            /scripts
    
  •                names.py - **works only if here defined the object map, cannot use custom_name_common map**
                 names.pyc
    
1

There are 1 answers

0
Molnár Katalin On

For anyone who is new at squish+python :p:

  1. .pyc is a cashed python file, do not care about it...
  2. names.py is always where squish searching the object map. You can split into several different files as common.py and special_to_this_scenario.py, but you need to import them into names (avoiding circular reference) - so squish will see it together as one big object map, relates to the actual test suite.