diff --git a/test/Selenium/BaseTestCase.py b/test/Selenium/BaseTestCase.py index e2527a8a16c5adee6078337876f00fefeb344d34..4b718a424fec3c2c7f8bb888a0092f879a206883 100644 --- a/test/Selenium/BaseTestCase.py +++ b/test/Selenium/BaseTestCase.py @@ -14,14 +14,16 @@ import unittest from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait +from selenium.webdriver.firefox.service import Service class BaseTestCase(unittest.TestCase): # yes... a \ has to be escaped even in a raw string, and a string can not end with \, so we have to create a string that does not end with a \ and get the \ character from its index... - HTML_FILE = ("file:///" + os.path.abspath("../Test.html").replace(r"\\ "[0], r"/")) + HTML_FILE = ("file:///" + os.path.abspath("../WebGUI/htdocs/Test.html").replace(r"\\ "[0], r"/")) def setUp(self): - self.driver = webdriver.Firefox() + service = Service(executable_path="/usr/local/bin/geckodriver") + self.driver = webdriver.Firefox(service=service) self.driver.maximize_window() self.driver.implicitly_wait(3) # these are not built in members, but no one said we could not add them @@ -43,4 +45,4 @@ class BaseTestCase(unittest.TestCase): self.driver.quit() if __name__ == "__main__": - unittest.main(catchbreak=True, verbosity=2) \ No newline at end of file + unittest.main(catchbreak=True, verbosity=2) diff --git a/test/Selenium/Framework_CommonFunctions.py b/test/Selenium/Framework_CommonFunctions.py index 567f3a406d77bf750441dcf1b4540d3158c5da33..ea29b1af4d894faef14d1470cac7c375ae016de1 100644 --- a/test/Selenium/Framework_CommonFunctions.py +++ b/test/Selenium/Framework_CommonFunctions.py @@ -40,7 +40,7 @@ def browserCompatibilityCheck(driver): driver.applicationStarted = True time.sleep(1) try: - div = driver.find_element_by_id('UnsupportedBrowser').find_element_by_tag_name('button').click() + div = driver.find_element(By.ID,'UnsupportedBrowser').find_element(By.TAG_NAME,'button').click() time.sleep(1) except NoSuchElementException as e: - pass \ No newline at end of file + pass diff --git a/test/Selenium/Framework_LoadingWebApps.py b/test/Selenium/Framework_LoadingWebApps.py index 501fc469a18222ac3c55c0d3035f8fbac0183278..248d6897582c35a54a984675025c7e6d8ac4a2de 100644 --- a/test/Selenium/Framework_LoadingWebApps.py +++ b/test/Selenium/Framework_LoadingWebApps.py @@ -43,7 +43,7 @@ class Framework_LoadingWebApps(BaseTestCase): def checkApplicationStart(self, element_id): try: - element = self.driver.find_element_by_id(element_id) + element = self.driver.find_element(By.ID, element_id) except NoSuchElementException as e: self.fail("element by id " + element_id + " not found after starting application") @@ -66,7 +66,7 @@ class Framework_LoadingWebApps(BaseTestCase): def checkApplicationSwitch(self, element_id1, element_id2): try: - self.driver.find_element_by_id(element_id1) + self.driver.find_element(By.ID, element_id1) self.fail("element by id " + element_id + " found, but it should not exist after switching applications") except NoSuchElementException as e: pass @@ -90,4 +90,4 @@ class Framework_LoadingWebApps(BaseTestCase): self.checkApplicationSwitch("RequestConsole_MainView", "customAppMainview") if __name__ == "__main__": - unittest.main(catchbreak=True, verbosity=2) \ No newline at end of file + unittest.main(catchbreak=True, verbosity=2) diff --git a/test/Selenium/GuiEditor_CommonFunctions.py b/test/Selenium/GuiEditor_CommonFunctions.py index 3c656da092b9b10ca15a88465578b7ab4ef55fd0..fb1c9135eef58e11d195b53375082b9f83697a5b 100644 --- a/test/Selenium/GuiEditor_CommonFunctions.py +++ b/test/Selenium/GuiEditor_CommonFunctions.py @@ -28,7 +28,7 @@ def loadSetup(driver, setupName): radioId = "GuiEditor_Dialog_LoadSetup_RadioButton_" + setupName loadButton = driver.wait.until(EC.element_to_be_clickable((By.ID, 'GuiEditor_Button_Load'))) loadButton.click() - radioButton = driver.find_element_by_id(radioId) + radioButton = driver.find_element(By.ID, radioId) radioButton.click() dialogClickOk(driver, "LoadSetup") time.sleep(1) @@ -40,17 +40,17 @@ def saveSetup(driver): def saveSetupAs(driver, setupName, exists = False, overwrite = False): button = driver.wait.until(EC.element_to_be_clickable((By.ID, 'GuiEditor_Button_SaveAs'))) button.click() - editBox = driver.find_element_by_id("GuiEditor_Dialog_SaveSetupAs_Field") + editBox = driver.find_element(By.ID, "GuiEditor_Dialog_SaveSetupAs_Field") ActionChains(driver).move_to_element(editBox).send_keys(Keys.HOME).perform() ActionChains(driver).key_down(Keys.SHIFT).send_keys(Keys.END).key_up(Keys.SHIFT).send_keys(Keys.DELETE).perform() ActionChains(driver).send_keys(setupName).perform() dialogClickOk(driver, "SaveSetupAs") try: - driver.find_element_by_id("GuiEditor_Dialog_OverWrite") + driver.find_element(By.ID, "GuiEditor_Dialog_OverWrite") if overwrite: dialogClickOk(driver, "OverWrite") else: - closeButton = driver.find_element_by_class_name("ui-dialog-titlebar").find_element_by_class_name("ui-dialog-titlebar-close") + closeButton = driver.find_element(By.CLASS_NAME, "ui-dialog-titlebar").find_element(By.CLASS_NAME, "ui-dialog-titlebar-close") closeButton.click() return exists except NoSuchElementException as e: @@ -75,14 +75,14 @@ def addEmptyRequest(driver): # ---------- Editor manipulating functions ---------- def rightClickLabel(driver, editorId): - element = driver.find_element_by_id(editorId + "_Header") + element = driver.find_element(By.ID, editorId + "_Header") actions = ActionChains(driver) actions.context_click(element) actions.perform() time.sleep(0.25) def clickInContextMenu(driver, text): - listElements = driver.find_elements_by_css_selector("#GuiEditor_ContextMenu > li") + listElements = driver.find_element(By.CSS_SELECTOR, "#GuiEditor_ContextMenu > li") for element in listElements: if element.text == text: element.click() @@ -103,12 +103,12 @@ def closeCustomDataEditor(driver): # ---------- Connection creation ---------- def getNodeFromTreeByElements(driver, treeId, elements): - children = driver.find_elements_by_css_selector("#" + treeId + " > ul > li") + children = driver.find_element(By.CSS_SELECTOR, "#" + treeId + " > ul > li") nodeToReturn = None for i in range(len(elements)): missing = True for node in children: - nodeText = node.find_element_by_class_name("jstree-anchor").text + nodeText = node.find_element(By.CLASS_NAME, "jstree-anchor").text if nodeText == elements[i]: nodeToReturn = node missing = False @@ -116,33 +116,33 @@ def getNodeFromTreeByElements(driver, treeId, elements): if missing: return None if i < len(elements) - 1: if "jstree-closed" in nodeToReturn.get_attribute("class"): - nodeToReturn.find_element_by_class_name("jstree-icon").click() + nodeToReturn.find_element(By.CLASS_NAME, "jstree-icon").click() time.sleep(0.25) - children = nodeToReturn.find_elements_by_css_selector("ul > li") + children = nodeToReturn.find_element(By.CSS_SELECTOR, "ul > li") return nodeToReturn def getNodeFromTreeByPath(driver, treeId, path): - children = driver.find_elements_by_css_selector("#" + treeId + " > ul > li") + children = driver.find_element(By.CSS_SELECTOR, "#" + treeId + " > ul > li") nodeToReturn = None for i in range(len(path)): if not path[i] < len(children): return None nodeToReturn = children[path[i]] if i < len(path) - 1: if "jstree-closed" in nodeToReturn.get_attribute("class"): - nodeToReturn.find_element_by_class_name("jstree-icon").click() + nodeToReturn.find_element(By.CLASS_NAME, "jstree-icon").click() time.sleep(0.25) - children = nodeToReturn.find_elements_by_css_selector("ul > li") + children = nodeToReturn.find_element(By.CSS_SELECTOR, "ul > li") return nodeToReturn def clickInTreeContextMenu(driver, node, menuText): - anchor = node.find_element_by_class_name("jstree-anchor") + anchor = node.find_element(By.CLASS_NAME, "jstree-anchor") actions = ActionChains(driver) actions.context_click(anchor) actions.perform() time.sleep(0.5) - contextMenu = driver.find_element_by_class_name("jstree-default-contextmenu") - items = contextMenu.find_elements_by_tag_name("li") + contextMenu = driver.find_element(By.CLASS_NAME, "jstree-default-contextmenu") + items = contextMenu.find_element(By.TAG_NAME, "li") for element in items: if menuText in element.text: element.click() @@ -156,8 +156,8 @@ def pressDeleteOnNode(driver, node): time.sleep(0.25) def dragAndDrop(driver, fromId, toId): - source = driver.find_element_by_id(fromId) - target = driver.find_element_by_id(toId) + source = driver.find_element(By.ID, fromId) + target = driver.find_element(By.ID, toId) target.location_once_scrolled_into_view action_chains = ActionChains(driver) @@ -169,7 +169,7 @@ def dragAndDrop(driver, fromId, toId): def addEditor(driver, className, radioButtonToSelect, buttonSuffix): existingEditorIds = set() - existingEditors = driver.find_elements_by_class_name(className) + existingEditors = driver.find_element(By.CLASS_NAME, className) for editor in existingEditors: editorId = editor.get_attribute("id") existingEditorIds.add(editorId) @@ -181,7 +181,7 @@ def addEditor(driver, className, radioButtonToSelect, buttonSuffix): time.sleep(0.25) newEditorId = None - existingEditors = driver.find_elements_by_class_name(className) + existingEditors = driver.find_element(By.CLASS_NAME, className) for editor in existingEditors: editorId = editor.get_attribute("id") if editorId not in existingEditorIds: @@ -190,8 +190,8 @@ def addEditor(driver, className, radioButtonToSelect, buttonSuffix): return newEditorId def selectRadioButtonInDialog(driver, dialogName, className): - dialog = driver.find_element_by_id("GuiEditor_Dialog_" + dialogName) - radio_button = dialog.find_element_by_id("GuiEditor_Dialog_" + dialogName + "_RadioButton_" + className) + dialog = driver.find_element(By.ID, "GuiEditor_Dialog_" + dialogName) + radio_button = dialog.find_element(By.ID, "GuiEditor_Dialog_" + dialogName + "_RadioButton_" + className) radio_button.click() def dialogClickOk(driver, name): @@ -200,20 +200,20 @@ def dialogClickOk(driver, name): button.click() def getSetupName(driver): - label = driver.find_element_by_id("GuiEditor_SetupNameLabel") + label = driver.find_element(By.ID, "GuiEditor_SetupNameLabel") return label.text def treeExists(driver, id): try: - div = driver.find_element_by_id(id) - div.find_element_by_class_name("jstree-node") + div = driver.find_element(By.ID, id) + div.find_element(By.CLASS_NAME, "jstree-node") return True except NoSuchElementException as e: return False def editorTypeExists(driver, className): try: - driver.find_element_by_class_name(className) + driver.find_element(By.CLASS_NAME, className) return True except NoSuchElementException as e: return False @@ -221,7 +221,7 @@ def editorTypeExists(driver, className): def dialogExists(driver, name): dialogId = "GuiEditor_Dialog_" + name try: - driver.find_element_by_id(dialogId) + driver.find_element(By.ID, dialogId) return True except NoSuchElementException as e: return False diff --git a/test/Selenium/GuiEditor_EditorTests.py b/test/Selenium/GuiEditor_EditorTests.py index 29e7ee5bea7ec18c35169af2f221c8de7e27ab51..6a91079f4df7f4cc5ccabe1d3bcca91db08a70e6 100644 --- a/test/Selenium/GuiEditor_EditorTests.py +++ b/test/Selenium/GuiEditor_EditorTests.py @@ -96,7 +96,7 @@ class GuiEditor_EditorTests(BaseTestCase): script = "a = '" + customData + "';" + "view_editor = $('#GuiEditor_CustomDataEditor .CodeMirror')[0].CodeMirror; view_editor.setValue(a);" self.driver.execute_script(script) - editorHeader = self.driver.find_element_by_id("GuiEditor_CustomDataEditor_Header") + editorHeader = self.driver.find_element(By.ID, "GuiEditor_CustomDataEditor_Header") editorHeaderColor = editorHeader.value_of_css_property("color") self.assertEqual('#ff0000', str(Color.from_string(editorHeaderColor).hex), 'Custom data editor header should be red, it is ' + editorHeaderColor) @@ -123,4 +123,4 @@ class GuiEditor_EditorTests(BaseTestCase): self.assertFalse(editorTypeExists(self.driver, "GuiEditor_ViewEditor"), "ViewEditor element found after it was deleted") if __name__ == "__main__": - unittest.main(catchbreak=True, verbosity=2) \ No newline at end of file + unittest.main(catchbreak=True, verbosity=2) diff --git a/test/Selenium/GuiEditor_SetupHandlingTests.py b/test/Selenium/GuiEditor_SetupHandlingTests.py index 9e17b2a74f2dec94c06ff89fdaeb38b29a4ae71e..8fa34a08c65ea8ad428b47f36fb66b8f674c44e8 100644 --- a/test/Selenium/GuiEditor_SetupHandlingTests.py +++ b/test/Selenium/GuiEditor_SetupHandlingTests.py @@ -68,7 +68,7 @@ class GuiEditor_SetupHandlingTests(BaseTestCase): self.driver.get(self.HTML_FILE) startGuiEditor(self.driver) setupName = getSetupName(self.driver) - viewmodelEditor = self.driver.find_element_by_id("GuiEditor_ViewmodelEditor_0") + viewmodelEditor = self.driver.find_element(By.ID, "GuiEditor_ViewmodelEditor_0") time.sleep(0.5) rightClickLabel(self.driver, "GuiEditor_ViewmodelEditor_0") @@ -82,7 +82,7 @@ class GuiEditor_SetupHandlingTests(BaseTestCase): loadSetup(self.driver, setupName) try: - viewmodelEditor = self.driver.find_element_by_id("GuiEditor_ViewmodelEditor_0") + viewmodelEditor = self.driver.find_element(By.ID, "GuiEditor_ViewmodelEditor_0") self.fail("Deleted ViewModel Editor is still present in the saved setup") except NoSuchElementException as e: pass @@ -115,4 +115,4 @@ class GuiEditor_SetupHandlingTests(BaseTestCase): self.assertTrue(saveSetupAs(self.driver, "Test2", True, False), "SaveAs overwrite checking is not ok") if __name__ == "__main__": - unittest.main(catchbreak=True, verbosity=2) \ No newline at end of file + unittest.main(catchbreak=True, verbosity=2) diff --git a/test/Selenium/RequestConsole_Tests.py b/test/Selenium/RequestConsole_Tests.py index d153873c3de8ceb5e6507abcca3435bccca7f792..ec7872741597260dae2f8f70af2ec4b42166f9bc 100644 --- a/test/Selenium/RequestConsole_Tests.py +++ b/test/Selenium/RequestConsole_Tests.py @@ -23,7 +23,7 @@ def loadSetup(driver, setupName): radioId = "RequestConsole_Dialog_LoadSetup_RadioButton_" + setupName loadButton = driver.wait.until(EC.element_to_be_clickable((By.ID, 'RequestConsole_Button_Load'))) loadButton.click() - radioButton = driver.find_element_by_id(radioId) + radioButton = driver.find_element(By.ID, radioId) radioButton.click() dialogClickOk(driver, "LoadSetup") time.sleep(1) @@ -34,13 +34,13 @@ def dialogClickOk(driver, name): button.click() def getSetupName(driver): - label = driver.find_element_by_id("RequestConsole_SetupNameLabel") + label = driver.find_element(By.ID, "RequestConsole_SetupNameLabel") return label.text def treeExists(driver, id): try: - div = driver.find_element_by_id(id) - div.find_element_by_class_name("jstree-node") + div = driver.find_element(By.ID, id) + div.find_element(By.CLASS_NAME, "jstree-node") return True except NoSuchElementException as e: return False @@ -62,7 +62,7 @@ def sendRequest(driver): def editorTypeExists(driver, className): try: - driver.find_element_by_class_name(className) + driver.find_element(By.CLASS_NAME, className) return True except NoSuchElementException as e: return False @@ -104,7 +104,7 @@ class RequestConsole_SetupHandlingTests(BaseTestCase): def test_requestEditorTree_dragAtomicRequestWithinTheRequestObject(self): init(self.driver, self.HTML_FILE) - treeElements = self.driver.find_elements_by_xpath("//*[contains(@id, '_anchor')]") #for elem in treeElements: print elem.get_attribute('innerHTML') + treeElements = self.driver.find_element(By.XPATH, "//*[contains(@id, '_anchor')]") #for elem in treeElements: print elem.get_attribute('innerHTML') ActionChains(self.driver).drag_and_drop(treeElements[7], treeElements[8]).perform() script = "code_editor = $('#RequestConsole_CodeEditor .CodeMirror')[0].CodeMirror; return code_editor.getValue();" textInEditor = self.driver.execute_script(script) @@ -153,11 +153,11 @@ class RequestConsole_SetupHandlingTests(BaseTestCase): def test_requestEditorTree_dragRequestFromHelpTree(self): init(self.driver, self.HTML_FILE) - treeElements = self.driver.find_elements_by_xpath("//*[contains(@id, '_anchor')]") + treeElements = self.driver.find_element(By.XPATH, "//*[contains(@id, '_anchor')]") ActionChains(self.driver).double_click(treeElements[0]).perform() - treeElementsAfterExpand = self.driver.find_elements_by_xpath("//*[contains(@id, '_anchor')]") + treeElementsAfterExpand = self.driver.find_element(By.XPATH, "//*[contains(@id, '_anchor')]") ActionChains(self.driver).drag_and_drop(treeElementsAfterExpand[1], treeElements[8]).perform() script = "code_editor = $('#RequestConsole_CodeEditor .CodeMirror')[0].CodeMirror; return code_editor.getValue();" @@ -234,7 +234,7 @@ class RequestConsole_SetupHandlingTests(BaseTestCase): newSetup(self.driver); addEmptyRequest(self.driver); - editorHeader = self.driver.find_element_by_id("RequestConsole_CodeEditor__Header") + editorHeader = self.driver.find_element(By.ID, "RequestConsole_CodeEditor__Header") editorHeaderColor = editorHeader.value_of_css_property("color") self.assertEqual('#000000', str(Color.from_string(editorHeaderColor).hex), 'RequestEditor\'s header should be black, it is ' + str(Color.from_string(editorHeaderColor).hex)) @@ -245,7 +245,7 @@ class RequestConsole_SetupHandlingTests(BaseTestCase): script = "a = '" + request + "';" + "code_editor = $('#RequestConsole_CodeEditor .CodeMirror')[0].CodeMirror; code_editor.setValue(a);" self.driver.execute_script(script) - editorHeader = self.driver.find_element_by_id("RequestConsole_CodeEditor__Header") + editorHeader = self.driver.find_element(By.ID, "RequestConsole_CodeEditor__Header") editorHeaderColor = editorHeader.value_of_css_property("color") self.assertEqual('#000000', str(Color.from_string(editorHeaderColor).hex), 'RequestEditor header should be red, it is ' + str(Color.from_string(editorHeaderColor).hex)) @@ -256,7 +256,7 @@ class RequestConsole_SetupHandlingTests(BaseTestCase): script = "a = '" + request + "';" + "code_editor = $('#RequestConsole_CodeEditor .CodeMirror')[0].CodeMirror; code_editor.setValue(a);" self.driver.execute_script(script) - editorHeader = self.driver.find_element_by_id("RequestConsole_CodeEditor__Header") + editorHeader = self.driver.find_element(By.ID, "RequestConsole_CodeEditor__Header") editorHeaderColor = editorHeader.value_of_css_property("color") self.assertEqual('#ff0000', str(Color.from_string(editorHeaderColor).hex), 'RequestEditor\'s header should be red, it is ' + str(Color.from_string(editorHeaderColor).hex)) @@ -273,7 +273,7 @@ class RequestConsole_SetupHandlingTests(BaseTestCase): textInEditor = re.sub(r"\s", "", textInEditor) self.assertEqual(request, textInEditor, "Response editor content can't be set") - editorHeader = self.driver.find_element_by_id("RequestConsole_ResponseDisplay__Header") + editorHeader = self.driver.find_element(By.ID, "RequestConsole_ResponseDisplay__Header") editorHeaderColor = editorHeader.value_of_css_property("color") self.assertEqual('#000000', str(Color.from_string(editorHeaderColor).hex), 'ResponseDisplay header should be red, it is ' + str(Color.from_string(editorHeaderColor).hex)) @@ -284,7 +284,7 @@ class RequestConsole_SetupHandlingTests(BaseTestCase): script = "a = '" + request + "';" + "code_editor = $('#RequestConsole_ResponseDisplay .CodeMirror')[0].CodeMirror; code_editor.setValue(a);" self.driver.execute_script(script) - editorHeader = self.driver.find_element_by_id("RequestConsole_ResponseDisplay__Header") + editorHeader = self.driver.find_element(By.ID, "RequestConsole_ResponseDisplay__Header") editorHeaderColor = editorHeader.value_of_css_property("color") self.assertEqual('#ff0000', str(Color.from_string(editorHeaderColor).hex), 'ResponseDisplay header should be red, it is ' + str(Color.from_string(editorHeaderColor).hex)) @@ -293,7 +293,7 @@ class RequestConsole_SetupHandlingTests(BaseTestCase): sendRequest(self.driver); - editorHeader = self.driver.find_element_by_id("RequestConsole_ResponseDisplay__Header") + editorHeader = self.driver.find_element(By.ID, "RequestConsole_ResponseDisplay__Header") editorHeaderColor = editorHeader.value_of_css_property("color") self.assertEqual('#000000', str(Color.from_string(editorHeaderColor).hex), 'ResponseDisplay header should be red, it is ' + str(Color.from_string(editorHeaderColor).hex)) @@ -346,4 +346,4 @@ class RequestConsole_SetupHandlingTests(BaseTestCase): self.assertEqual(expectedResponse, textInEditor, "sendData is not returning the expexted result") if __name__ == "__main__": - unittest.main(catchbreak=True, verbosity=2) \ No newline at end of file + unittest.main(catchbreak=True, verbosity=2) diff --git a/test/Selenium/runTestsWithXvfb.sh b/test/Selenium/runTestsWithXvfb.sh index f3d9fcaae01a91cbe8c957d5bcddb33cc19f9ffe..0cd0662d040405b5e6bceab6f1c6ca138cf37922 100755 --- a/test/Selenium/runTestsWithXvfb.sh +++ b/test/Selenium/runTestsWithXvfb.sh @@ -8,18 +8,26 @@ #// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html // #/////////////////////////////////////////////////////////////////////////////// +#set -e + echo "Checking if Xvfb is running..." XVFB_PID=`pgrep Xvfb` if [ "$?" == "0" ]; then - + echo "Xvfb is running, finding display port..." DISPLAY=`ps --format command --no-headers -ww --pid $XVFB_PID | grep -o ':[0-9]*'` echo "Found display port: "$DISPLAY export DISPLAY=$DISPLAY.0 chmod u+x runTests.py - ./runTests.py + + echo "INFO: Running the tests" + python3 runTests.py + if [ "$?" == "0" ]; then + echo "ERROR: Running of the tests failed" + exit 1 + fi exit 0 @@ -41,8 +49,11 @@ else export DISPLAY=:999.0 chmod u+x runTests.py - result=$(./runTests.py) - echo $result + result=$(python3 runTests.py) + if [ "$result" == "0" ]; then + echo "ERROR: Running of the tests failed. Exit status: $result" + exit 1 + fi killXvfb_trap diff --git a/test/createOfflineWebGUI.sh b/test/createOfflineWebGUI.sh index 32a477387e1d186d28250fa1f5bdbfa86cfa13cd..3895c6ca9e09c304240a7cd52cb9770eb199fc1c 100755 --- a/test/createOfflineWebGUI.sh +++ b/test/createOfflineWebGUI.sh @@ -8,6 +8,8 @@ #// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html // #/////////////////////////////////////////////////////////////////////////////// +set -e + CURRENT_DIR=`pwd` #---COPY_TO="." COPY_TO="./WebGUI" @@ -54,6 +56,8 @@ SELENIUM_LOC=$COPY_TO/htdocs/Selenium MAIN_HTML=$COPY_TO/htdocs/Main.html TEST_HETML=$COPY_TO/htdocs/Test.html +echo "INFO: Preparation: deleting old files and copying" + # create target directory if it does not exist if [ ! -d $COPY_TO ]; then mkdir $COPY_TO @@ -89,6 +93,8 @@ cp -arL $TESTCASES_DIR/* $TESTCASES_LOC cp -arL $MOCKTEST_DSSERVERDESCRIPTOR $WEBAPP_LOC/MockTest/DsRestAPITestConfig.js +echo "INFO: Creating Test.html file" + awk '{ if ($0 ~ /FileHandler.js/) { sub("FileHandler.js", "DsRestAPI/MockedServer/FileHandler.js");