def testSetIssueUrl(self): """Test is issue url is set""" issueUrl = 'http://www.example.com' name = 'this is the test name' t = Test(name) t.setIssueUrl(issueUrl) self.assertEqual(t.issueUrl, issueUrl)
def testSetIssueUrl(self): """test the issue url is set.""" issueUrl = 'http://www.example.com' name = "this is the test name" t = Test(name) # do test t.setIssueUrl(issueUrl) self.assertEqual(t.issueUrl, issueUrl)
def functionalTests(): test = Test('Functional test') test.addStep('Step 1', prestep=lambda: True, isVerifyStep=True) test.addStep('Step 1', prestep=lambda: True, isVerifyStep=True) test.setIssueUrl("http://www.example.com") return [test]
def functionalTests(): try: from qgistester.test import Test except: return [] openPluginManagerTest = Test('Verify that Boundless Connect can start Plugin Manager') openPluginManagerTest.addStep('Check that OpenGeo Explorer listed in Plugin Manager as well as plugins from QGIS repository', prestep=lambda: _openPluginManager(False), isVerifyStep=True) openPluginManagerTest.setIssueUrl("https://issues.boundlessgeo.com:8443/browse/QGIS-325") openPluginManagerBoundlessOnlyTest = Test('Verify that Boundless Connect can start Plugin Manager only with Boundless plugins') openPluginManagerBoundlessOnlyTest.addStep('Check that Plugin manager is open and contains only Boundless plugins', prestep=lambda: _openPluginManager(True), isVerifyStep=True) openPluginManagerBoundlessOnlyTest.setIssueUrl("https://issues.boundlessgeo.com:8443/browse/QGIS-325") coreConnectUpdateTest = Test('Test updating core Connect plugin via Plugin Manager') coreConnectUpdateTest.addStep('Downgrade installed Connect plugin', lambda: _downgradePlugin('boundlessconnect')) coreConnectUpdateTest.addStep('Check that Connect plugin is upgradable', prestep=lambda: _openPluginManager(True), isVerifyStep=True) coreConnectUpdateTest.addStep('Upgrade Connect plugin') coreConnectUpdateTest.addStep('Check that Connect plugin updated, loaded from user folder and has latest version', isVerifyStep=True) coreConnectUpdateTest.setIssueUrl("https://issues.boundlessgeo.com:8443/browse/QGIS-602") coreConnectUpdateTest.setCleanup(lambda: _restoreVersion('boundlessconnect')) return [openPluginManagerTest, openPluginManagerBoundlessOnlyTest, coreConnectUpdateTest]
def functionalTests(): try: from qgistester.test import Test except: return [] # advanced setting editing are reset after closing of options gui - #26327 testAdvancedSettings = Test('Advanced settings editor saves changes', category='Regression tests') testAdvancedSettings.setIssueUrl( 'https://github.com/qgis/QGIS/issues/26327') testAdvancedSettings.addStep( 'Open QGIS Settings and change some values using Advanced Settings Editor and close dialog by pressing OK button.', prestep=lambda: _showOptions(), busyCursor=False) testAdvancedSettings.addStep( 'Open QGIS Settings again. Check that previously changed settings have correct values.', prestep=lambda: _showOptions(), isVerifyStep=True, busyCursor=False) # adding WMTS from Browser paner - #36264 testBrowserAddWmts = Test('Adding WMTS from Browser', category='Regression tests') testBrowserAddWmts.setIssueUrl('https://github.com/qgis/QGIS/issues/36264') testBrowserAddWmts.addStep('Create test WMTS connection.', function=lambda: _addWmtsConnection()) testBrowserAddWmts.addStep( 'Expand "WMS/WMTS" node in the Browser panel. Then expand "TesterPlugin" connection.' ) testBrowserAddWmts.addStep( 'Try to add layer "112 Par satellite" from the Browser to QGIS canvas. Check that QGIS prompts for date and after setting a date layer added to canvas and visible.', isVerifyStep=True) testBrowserAddWmts.setCleanup(lambda: _removeWmtsConnection()) # adding rows in the Processing batch interface - #39696 testAddBatchRows = Test('Adding new rows in Processing batch interface', category='Regression tests') testAddBatchRows.setIssueUrl('https://github.com/qgis/QGIS/issues/39696') testAddBatchRows.addStep('Start native "Buffer" algorithm in batch mode', prestep=lambda: _runProcessingBatch(), busyCursor=False) testAddBatchRows.addStep( 'Check that every time green plus button in the dialog toolbar is pressed a new row added to the batch.', isVerifyStep=True) testAddBatchRows.addStep('Close dialog by pressing "Close" button.') # filename prefix not shown when loading GPX or similar files - #37551 testGpxFilenamePrefix = Test( 'Filename prefix is not shown when adding layers from GPX', category='Regression tests') testGpxFilenamePrefix.setIssueUrl( 'https://github.com/qgis/QGIS/issues/37551') testGpxFilenamePrefix.addStep( 'Add GPX layer to QGIS. Ensure that all layers in the "Select Vector Layers to Add" dialog are selected and "Add layers to group" checkbox is checked. Press "OK" button', prestep=lambda: iface.addVectorLayer( os.path.join(dataPath, 'elev.gpx'), 'elev', 'ogr'), busyCursor=False) testGpxFilenamePrefix.addStep( 'Check that in the layer tree there is an "elev" group with 5 layers inside it and layer names are not prefixed with the "elev".', isVerifyStep=True) testGpxFilenamePrefix.addStep( 'Remove group with layers from the project.', function=lambda: QgsProject.instance().clear()) testGpxFilenamePrefix.addStep( 'Add GPX layer to QGIS. Ensure that all layers in the "Select Vector Layers to Add" dialog are selected and "Add layers to group" checkbox is NOT checked. Press "OK" button', prestep=lambda: iface.addVectorLayer( os.path.join(dataPath, 'elev.gpx'), 'elev', 'ogr'), busyCursor=False) testGpxFilenamePrefix.addStep( 'Check that in the layer tree there are 5 layers and their layer names are prefixed with the "elev".', isVerifyStep=True) testGpxFilenamePrefix.setCleanup(lambda: QgsProject.instance().clear()) # check Processing providers testProcessingProviders = Test('Processing providers are functional', category='Installation Smoke tests') testProcessingProviders.addStep( 'Open Processing toolbox from the "Processing -> Toolbox" menu') testProcessingProviders.addStep( 'Verify that native QGIS tools groups are exist in the Processing toolbox.', isVerifyStep=True) testProcessingProviders.addStep( 'Verify that the GDAL group is exist in the Processing toolbox and that it contains several sub-groups.', isVerifyStep=True) testProcessingProviders.addStep( 'Verify that the GRASS group is exist in the Processing toolbox and that it contains several sub-groups.', isVerifyStep=True) testProcessingProviders.addStep( 'Verify that the SAGA group is exist in the Processing toolbox and that it contains several sub-groups.', isVerifyStep=True) return [ testAdvancedSettings, testBrowserAddWmts, testAddBatchRows, testGpxFilenamePrefix, # generic tests not linked to any ticket testProcessingProviders ]