MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / get_suite

Function get_suite

web/regression/runtests.py:158–201  ·  view source on GitHub ↗

This function add the tests to test suite and return modified test suite variable. :param server_information: :param module_list: test module list :type module_list: list :param test_server: server details :type test_server: dict :param test_app_client: test clien

(module_list, test_server, test_app_client, server_information,
              test_db_name, driver_passed, parallel_ui_test)

Source from the content-addressed store, hash-verified

156
157
158def get_suite(module_list, test_server, test_app_client, server_information,
159 test_db_name, driver_passed, parallel_ui_test):
160 """
161 This function add the tests to test suite and return modified test suite
162 variable.
163 :param server_information:
164 :param module_list: test module list
165 :type module_list: list
166 :param test_server: server details
167 :type test_server: dict
168 :param test_app_client: test client
169 :type test_app_client: pgadmin app object
170 :return pgadmin_suite: test suite with test cases
171 :rtype: TestSuite
172 :param driver_passed: driver object to run selenium tests
173 :type driver_passed: webdriver object
174 :param parallel_ui_test: whether ui tests to be run in parallel
175 :type parallel_ui_test: boolan
176 :param test_db_name: database name
177 :type test_db_name: string
178 """
179 modules = []
180 pgadmin_suite = unittest.TestSuite()
181
182 # Get the each test module and add into list
183 for key, klass in module_list:
184 # Separate each test class from list of classes and store in modules
185 for item in klass:
186 gen = item
187 modules.append(gen)
188
189 # Set the test client to each module & generate the scenarios
190 for module in modules:
191 obj = module()
192 obj.setApp(app)
193 obj.setTestClient(test_app_client)
194 obj.setTestServer(test_server)
195 obj.setDriver(driver_passed)
196 obj.setParallelUI_tests(parallel_ui_test)
197 obj.setServerInformation(server_information)
198 obj.setTestDatabaseName(test_db_name)
199 scenario = scenarios.generate_scenarios(obj)
200 pgadmin_suite.addTests(scenario)
201 return pgadmin_suite
202
203
204def get_test_modules(arguments):

Callers 1

execute_testFunction · 0.85

Calls 8

appendMethod · 0.80
setTestClientMethod · 0.80
setTestServerMethod · 0.80
setDriverMethod · 0.80
setParallelUI_testsMethod · 0.80
setServerInformationMethod · 0.80
setTestDatabaseNameMethod · 0.80
setAppMethod · 0.45

Tested by

no test coverage detected