diff --git a/HA/README.md b/HA/README.md deleted file mode 100644 index 009e726..0000000 --- a/HA/README.md +++ /dev/null @@ -1,26 +0,0 @@ -HA Testing Scripts -============ - - The scripts for OpenStack Murano HA testing. - -How To Test -============ - To run HA tests need to perform the following steps: - -1. Copy agent.py on all controller nodes (with services, which we want to control) - -2. Copy controller.py and controller.conf on your personal host (to manage services on controller modes) - -3. Change controller.conf - need to fix IP addresses of controller nodes and parameters file1 and file2 - -4. Execute agent.py on all controller-nodes (with services, like Murano Conductor service): - - sudo python agent.py - -5. Execute controller.py on your personal host and start to testing. For example, you can start to deploy environment. In this case Murano Conductor service on the first node will start to deploy VMs and these testing scripts will detect node with Active Murano Controller service - and will stop it for several secconds. In case of properly HA the same service on the other nodes should start and continue to deploy environment. - - - - - - Mirantis Inc (C) 2013. diff --git a/HA/agent.py b/HA/agent.py deleted file mode 100644 index e7ef8e6..0000000 --- a/HA/agent.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) 2013 Mirantis Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import shlex -import subprocess -import filecmp -import xmlrpclib -import time -from SimpleXMLRPCServer import SimpleXMLRPCServer - -""" - This is simple XML-RPC server which can: - 1. Execute any shell commands by the request - 2. Compare two files - - This server should be run on OpenStack controller nodes - to control services on these nodes. -""" - - -def run_bash_command(cmd, timeout=0): - args = shlex.split(cmd) - p = subprocess.Popen(args, shell=False, stdout=subprocess.PIPE) - for line in p.stdout: - print line - time.sleep(timeout) - return p.stdout - - -def check_diff_files(file1, file2): - return not filecmp.cmp(file1, file2) - - -server = SimpleXMLRPCServer(("0.0.0.0", 7007),allow_none=True) -print "Listening on port 7007..." -server.register_function(run_bash_command, "run_bash_command") -server.register_function(check_diff_files, "check_diff_files") - -server.serve_forever() diff --git a/HA/controller.conf b/HA/controller.conf deleted file mode 100644 index 5ad8cd8..0000000 --- a/HA/controller.conf +++ /dev/null @@ -1,21 +0,0 @@ -[HA_Testing] - -nodes = n1 n2 - -port = 7007 - -mode = compare_files -file1 = /var/log/murano-conductor.log -file2 = /var/log/murano-conductor.log.diff - -activate_cmd = service murano-conductor start -deactivate_cmd = service murano-conductor stop - -minimum_count_of_active_nodes = 1 - - -[n1] -host = 172.18.79.81 - -[n2] -host = 172.18.79.82 diff --git a/HA/controller.py b/HA/controller.py deleted file mode 100644 index 922de62..0000000 --- a/HA/controller.py +++ /dev/null @@ -1,156 +0,0 @@ -# Copyright (c) 2013 Mirantis Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import xmlrpclib -import ConfigParser -import time -from bottle import route, run - - -class ControllerNode(): - def __init__(self, status='on', host='', port='7007', file1='', file2='', - activate_cmd='', deactivate_cmd='', agent=None): - self.status = status - self.host = host - self.port = port - self.file1 = file1 - self.file2 = file2 - self.activate_cmd = activate_cmd - self.deactivate_cmd = deactivate_cmd - self.agent = agent - self.checks_timeout = -1 - - def check_files(self, access): - self.checks_timeout -= 1 - if self.checks_timeout == 0: - self.activate() - return 1 - - if self.agent.check_diff_files(self.file1, self.file2) and access: - self.deactivate() - return -1 - - return 0 - - def activate(self, timeout=5): - print 'Start to activate node ' + self.host - self.agent.run_bash_command(self.activate_cmd) - - if self.file1 and self.file2: - init_cmd = 'cp %s %s' % (self.file1, self.file2) - time.sleep(timeout) - self.agent.run_bash_command(init_cmd) - - def deactivate(self, timeout=5): - print 'Start to diactivate node ' + self.host - time.sleep(timeout) - self.agent.run_bash_command(self.deactivate_cmd) - self.checks_timeout = 10 - - -class Controller(): - nodes = [] - - def __init__(self, config_file='controller.conf'): - self.config = ConfigParser.ConfigParser() - self.config.read(config_file) - - self.agents_list = self.get_from_cfg('HA_Testing', 'nodes').split(' ') - self.port = self.get_from_cfg('HA_Testing', 'port', '7007') - - self.activate_cmd = self.get_from_cfg('HA_Testing', 'activate_cmd') - self.deactivate_cmd = self.get_from_cfg('HA_Testing', 'deactivate_cmd') - - self.mode = self.get_from_cfg('HA_Testing', 'mode', 'compare_files') - self.file1 = self.get_from_cfg('HA_Testing', 'file1') - self.file2 = self.get_from_cfg('HA_Testing', 'file2') - - parameter = 'minimum_count_of_active_nodes' - self.min_active_nodes = self.get_from_cfg('HA_Testing', - parameter, 1) - - for agent in self.agents_list: - host = self.get_from_cfg(agent, 'host') - port = self.get_from_cfg(agent, 'port', self.port) - file1 = self.get_from_cfg(agent, 'file1', self.file1) - file2 = self.get_from_cfg(agent, 'file2', self.file2) - activate_cmd = self.get_from_cfg(agent, 'activate_cmd', - self.activate_cmd) - deactivate_cmd = self.get_from_cfg(agent, 'deactivate_cmd', - self.deactivate_cmd) - - new_agent = xmlrpclib.ServerProxy("http://%s:%s" - % (host, port), allow_none=True) - - new_node = ControllerNode('on', host, port, file1, file2, - activate_cmd, diactivate_cmd, new_agent) - - new_node.activate() - " If all OK, add this node to the list " - self.nodes.append(new_node) - - self.active_nodes = len(self.nodes) - print 'Minimal count of active nodes: ' + str(self.min_active_nodes) - print 'Active nodes: ' + str(self.active_nodes) - - def get_from_cfg(self, p1, p2, default=''): - try: - result = self.config.get(p1, p2) - return result - except: - return default - - def execute(self): - if 'compare_files' in self.mode: - self.monitor_file_changes() - - def monitor_file_changes(self): - while self.active_nodes != self.min_active_nodes: - for node in self.nodes: - access = int(self.active_nodes) > int(self.min_active_nodes) - self.active_nodes += node.check_files(access) - - -ctrl = Controller() -ctrl.execute() - -@route('/HA/nodes', method='GET') -def get_nodes(): - result = [] - for node in ctrl.nodes: - result.append({'name': node.host, 'status': node.status}) - - return result - -@route('/HA/activate/', method='PUT') -def activate(activate_nodes=[]): - for node in ctrl.nodes: - if node.name in activate_nodes: - node.activate() - ctrl.active_nodes += 1 - - return ctrl.active_nodes - -@route('/HA/deactivate/', method='PUT') -def activate(deactivate_nodes=[]): - for node in ctrl.nodes: - if node.name in deactivate_nodes: - if int(self.active_nodes) > int(self.min_active_nodes): - node.deactivate() - ctrl.active_nodes -= 1 - - return ctrl.active_nodes - -run(host='0.0.0.0', port=7007, debug=False) diff --git a/JIRA_with_launchpad_sync/README.md b/JIRA_with_launchpad_sync/README.md deleted file mode 100644 index d738e5f..0000000 --- a/JIRA_with_launchpad_sync/README.md +++ /dev/null @@ -1,28 +0,0 @@ -Script for JIRA and launchpad bug descriptions sync -============ - - This script allows to sync bug titles, descriptions, statuses and priorities between two different systems: JIRA and launchpad. - - Please, see more detailed information about the JIRA and launchpad by the following links: - - - https://www.atlassian.com/software/jira - - - https://launchpad.net/ - -How To Sync -============ - To run sync script need to perform the following steps: - -1. Fix sync.cfg file - fill information about JIRA credentials for the project in JIRA. - -2. Execute sync.py and wait for a few seconds: - - python sync.py - -3. Script will open browser with launchpad configuration page, need to confirm access and close browser. After that need to wait for the full sync of JIRA and launchpad. - - - - - - Mirantis Inc (C) 2013. diff --git a/JIRA_with_launchpad_sync/sync.cfg b/JIRA_with_launchpad_sync/sync.cfg deleted file mode 100644 index 53a1849..0000000 --- a/JIRA_with_launchpad_sync/sync.cfg +++ /dev/null @@ -1,8 +0,0 @@ -[JIRA] -URL = https://mirantis.jira.com/ -user = user -password = password -project_key = MRN - -[project] -name = murano diff --git a/JIRA_with_launchpad_sync/sync.py b/JIRA_with_launchpad_sync/sync.py deleted file mode 100644 index 8a8a655..0000000 --- a/JIRA_with_launchpad_sync/sync.py +++ /dev/null @@ -1,383 +0,0 @@ -# Copyright (c) 2013 Mirantis Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import re -import sys -import httplib2 -import ConfigParser -from dateutil import parser -from jira.client import JIRA -from launchpadlib.launchpad import Launchpad - - -httplib2.debuglevel = 0 - - -def update_status_of_jira_issue(jira, issue, new_status): - new_status_id = None - for status in jira.transitions(issue): - if get_str(status['name']) == new_status: - new_status_id = status['id'] - - if not new_status_id: - raise RuntimeError('No jira_status_id exists for status {0}'.format( - new_status)) - - jira.transition_issue(issue, new_status_id, - comment="Automatically updated by script.") - - -def get_str(parameter): - if not parameter: - parameter = '' - return str(parameter.encode('ascii', 'ignore')) - - -def get_date(parameter): - date = parser.parse(parameter) - return date - - -def get_status(parameter): - parameter = get_str(parameter) - if parameter in ['In Testing', 'To Test']: - return {'jira': parameter, 'launchpad': 'Fix Committed', 'code': 0} - elif parameter == 'Fix Committed': - return {'jira': 'To Test', 'launchpad': 'Fix Committed', 'code': 0} - elif parameter == 'Resolved': - return {'jira': 'Resolved', 'launchpad': 'Fix Released', 'code': 3} - elif parameter == 'Fix Released': - return {'jira': 'Closed', 'launchpad': 'Fix Released', 'code': 3} - elif parameter in ['Reopened', 'To Do']: - return {'jira': parameter, 'launchpad': 'New', 'code': 1} - elif parameter == 'Rejected': - return {'jira': parameter, 'launchpad': 'Invalid', 'code': 2} - elif parameter == 'Closed': - return {'jira': parameter, 'launchpad': 'Fix Released', 'code': 3} - elif parameter in ['New', 'Incomplete', 'Opinion', 'Confirmed', 'Triaged']: - return {'jira': 'ToDo', 'launchpad': parameter, 'code': 1} - elif parameter in ['Invalid', "Won't Fix"]: - return {'jira': 'Rejected', 'launchpad': parameter, 'code': 2} - else: - return {'jira': parameter, 'launchpad': parameter, 'code': 4} - - -def get_priority(parameter): - parameter = get_str(parameter) - if parameter in ['Blocker', 'Critical']: - return {'jira': parameter, 'launchpad': 'Critical', 'code': 0} - elif parameter in ['High', 'Medium']: - return {'jira': 'Major', 'launchpad': parameter, 'code': 1} - elif parameter == 'Major': - return {'jira': 'Major', 'launchpad': 'Medium', 'code': 1} - elif parameter in ['Nice to have', 'Some day']: - return {'jira': parameter, 'launchpad': 'Low', 'code': 2} - elif 'Low' in parameter: - return {'jira': 'Nice to have', 'launchpad': 'Low', 'code': 2} - else: - return {'jira': parameter, 'launchpad': parameter, 'code': 3} - - -def get_jira_bugs(url, user, password, project, - issues_count=1000000, - issues_fields='key,summary,description,issuetype,priority,' - 'status,updated,comment,fixVersions', - search_string_template='project={0} and issuetype=Bug'): - - jira = JIRA(basic_auth=(user, password), options={'server': url}) - - search_string = search_string_template.format(project) - issues = jira.search_issues(search_string, fields=issues_fields, - maxResults=issues_count) - bugs = [] - - for issue in issues: - bug = {'key': get_str(issue.key), - 'title': get_str(issue.fields.summary), - 'description': get_str(issue.fields.description), - 'priority': get_priority(issue.fields.priority.name), - 'status': get_status(issue.fields.status.name), - 'updated': get_date(issue.fields.updated), - 'comments': issue.fields.comment.comments, - 'fix_version': ''} - - if issue.fields.fixVersions: - version = get_str(issue.fields.fixVersions[0].name) - bug.update({'fix_version': version}) - - summary = bug['title'] - if 'Launchpad Bug' in summary: - summary = summary[24:] - - bug.update({'priority_code': bug['priority']['code'], - 'status_code': bug['status']['code'], - 'summary': summary}) - - bugs.append(bug) - - print 'Found {0} bugs in JIRA'.format(len(bugs)) - - return bugs - - -def get_launchpad_bugs(project): - project = project.lower() - launchpad = Launchpad.login_with(project, 'production') - project = launchpad.projects[project] - launchpad_bugs = project.searchTasks(status=["New", "Fix Committed", - "Invalid", "Won't Fix", - "Confirmed", "Triaged", - "In Progress", "Incomplete", - "Fix Released"]) - - bugs = [] - for launchpad_bug in launchpad_bugs: - bug_link = get_str(launchpad_bug.self_link) - key = re.search(r"[0-9]+$", bug_link).group() - parameters = launchpad_bug.bug - - bug = {'key': get_str(key), - 'title': get_str(parameters.title), - 'summary': get_str(parameters.title), - 'description': get_str(parameters.description), - 'priority': get_priority(launchpad_bug.importance), - 'status': get_status(launchpad_bug.status), - 'updated': parameters.date_last_updated, - #'comments': parameters.messages.entries[1:], - #'attachments': parameters.attachments.entries, - 'fix_version': ''} - - #if parameters.linked_branches.entries: - # version = get_str(parameters.linked_branches.entries[0]) - # bug.update({'fix_version': version}) - - bug.update({'priority_code': bug['priority']['code'], - 'status_code': bug['status']['code']}) - - bugs.append(bug) - - # It works very slow, print the dot per bug, for fun - print ".", - sys.stdout.flush() - - print '\nFound {0} bugs on launchpad'.format(len(bugs)) - - return bugs - - -def update_jira_bug(jira, issue, title, description, priority, status): - print "Updating JIRA bug ", title - print "Description & Title & Priority updating..." - try: - issue.update(summary=title, description=description, - priority={'name': priority}) - print "... updated: OK" - except Exception as ex: - print "... updated: FAIL (not possible)" - print type(ex), ex - - print "Status updating..." - try: - update_status_of_jira_issue(jira, get_str(issue.key), status) - print "... updated: OK" - except Exception as ex: - print "... updated: FAIL (not possible)" - print type(ex), ex - - -def update_lp_bug(bug, title, description, priority, status): - print "Updating launchpad bug ", title - # attachments - #print launchpad.bugs[Lbug['key']].lp_operations - - print "Description & Title updating..." - try: - bug.title = title - bug.description = description - bug.lp_save() - print "... updated: OK" - except Exception as ex: - print "... updated: FAIL (not possible)" - print type(ex), ex - - print "Status & Priority updating..." - try: - bug_task = bug.bug_tasks[0] - bug_task.status = status - bug_task.importance = priority - bug_task.lp_save() - print "... updated: OK" - except Exception as ex: - print "... updated: FAIL (not possible)" - print type(ex), ex - - -def create_jira_bug(jira, project_key, title, description): - new_issue = None - fields = {'project': {'key': project_key}, 'summary': title, - 'description': description, 'issuetype': {'name': 'Bug'}} - - print "Creating the new bug desciption in JIRA... ", title - try: - new_issue = jira.create_issue(fields=fields) - print "The new bug description was successfully created in JIRA" - except Exception as ex: - print "Can not create new bug in JIRA" - print type(ex), ex - - return new_issue - - -def create_lp_bug(launchpad, project, title, description): - new_bug = None - print "Creating the bug desciption on launchpad... ", title - try: - new_bug = launchpad.bugs.createBug(target=project.self_link, - title=title, - description=description) - print "The bug description was successfully created on launchpad" - except Exception as ex: - print "Can not create new bug on launchpad" - print type(ex), ex - - return new_bug - - -def sync_jira_with_launchpad(url, user, password, project, project_key): - template = 'Launchpad Bug #{0}: ' - - jira_bugs = get_jira_bugs(url, user, password, project_key) - launchpad_bugs = get_launchpad_bugs(project) - - jira = JIRA(basic_auth=(user, password), options={'server': url}) - launchpad = Launchpad.login_with(project, 'production') - - # Sync already created tasks - for Jbug in jira_bugs: - for Lbug in launchpad_bugs: - if (Lbug['title'] in Jbug['title'] or - Lbug['key'] in Jbug['title']): - for parameter in ['description', 'summary', 'status_code', - 'priority_code']: - if Jbug[parameter] != Lbug[parameter]: - if Jbug['updated'] < Lbug['updated']: - - new_title = '' - if not Lbug['key'] in Jbug['title']: - new_title = template.format(Lbug['key']) - new_title += Lbug['title'] - - update_jira_bug(jira, jira.issue(Jbug['key']), - new_title, Lbug['description'], - Lbug['priority']['jira'], - Lbug['status']['jira']) - else: - new_title = Jbug['title'] - if 'Launchpad Bug' in new_title: - new_title = str(new_title[24:]) - - update_lp_bug(launchpad.bugs[Lbug['key']], - new_title, Jbug['description'], - Jbug['priority']['launchpad'], - Jbug['status']['launchpad']) - break - break - - # Move new bugs from launchpad to JIRA - for Lbug in launchpad_bugs: - if Lbug['status_code'] == 3: - continue - - sync = False - duplicated = False - - for Lbug2 in launchpad_bugs: - if Lbug2['title'] == Lbug['title'] and Lbug2['key'] != Lbug['key']: - duplicated = True - - for Jbug in jira_bugs: - if (Lbug['title'] in Jbug['title'] or - Lbug['key'] in Jbug['title'] or - 'Launchpad Bug' in Jbug['title']): - sync = True - - if not sync and not duplicated: - new_title = '' - if not Lbug['key'] in Jbug['title']: - new_title = template.format(Lbug['key']) - new_title += Lbug['title'] - - new_issue = create_jira_bug(jira, project_key, new_title, - Lbug['description']) - if new_issue: - update_jira_bug(jira, jira.issue(new_issue.key), - new_title, Lbug['description'], - Lbug['priority']['jira'], - Lbug['status']['jira']) - - # Move new bugs from JIRA to launchpad - for Jbug in jira_bugs: - if Jbug['status_code'] == 3: - continue - - sync = False - duplicated = False - - for Jbug2 in jira_bugs: - if Jbug2['title'] == Jbug['title'] and Jbug2['key'] != Jbug['key']: - duplicated = True - - for Lbug in launchpad_bugs: - if (Lbug['title'] in Jbug['title'] or - Lbug['key'] in Jbug['title'] or - 'Launchpad Bug' in Jbug['title']): - sync = True - - if not sync and not duplicated: - lp_project = launchpad.projects[project] - new_bug = create_lp_bug(launchpad, lp_project, Jbug['title'], - Jbug['description']) - - if new_bug: - update_lp_bug(new_bug, - Jbug['title'], Jbug['description'], - Jbug['priority']['launchpad'], - Jbug['status']['launchpad']) - - for Jbug in jira_bugs: - if Jbug['status_code'] == 3: - continue - - for Lbug in launchpad_bugs: - if Lbug['title'] in Jbug['title']: - if Lbug['key'] in Jbug['title'] and \ - 'Launchpad Bug' in Jbug['title']: - continue - - new_title = template.format(Lbug['key']) + Lbug['title'] - update_jira_bug(jira, jira.issue(Jbug['key']), - new_title, Jbug['description'], - Jbug['priority']['jira'], - Jbug['status']['jira']) - - -config = ConfigParser.RawConfigParser() -config.read('sync.cfg') - -sync_jira_with_launchpad(url=config.get('JIRA', 'URL'), - user=config.get('JIRA', 'user'), - password=config.get('JIRA', 'password'), - project=config.get('project', 'name'), - project_key=config.get('JIRA', 'project_key')) diff --git a/README.rst b/README.rst index 6a0dff6..9f3ecc2 100644 --- a/README.rst +++ b/README.rst @@ -1,74 +1,8 @@ -Murano -====== -Murano Project introduces an application catalog, which allows application -developers and cloud administrators to publish various cloud-ready -applications in a browsable‎ categorised catalog, which may be used by the -cloud users (including the inexperienced ones) to pick-up the needed -applications and services and composes the reliable environments out of them -in a “push-the-button” manner. +DEPRECATED: murano-tests +======================== -murano-tests ------------- -murano-tests repository contains functional and performance tests for Murano -project. Functional tests are based on behave framework, performance tests -are based on FunkLoad framework. Please, refer to `How to Run`_ section for -details about how to run tests. +**Warning** - this repository is deprecated. +All the tests have been moved to corresponding repositories: +stackforge/murano +stackforge/murano-dashboard -Project Resources ------------------ -* `Murano at Launchpad `__ -* `Wiki `__ -* `Code Review `__ -* `Sources `__ -* `Developers Guide `__ - -How To Participate ------------------- -If you would like to ask some questions or make proposals, feel free to reach -us on #murano IRC channel at FreeNode. Typically somebody from our team will -be online at IRC from 6:00 to 20:00 UTC. You can also contact Murano community -directly by openstack-dev@lists.openstack.org adding [Murano] to a subject. - -We’re holding public weekly meetings on Tuesdays at 17:00 UTC -on #openstack-meeting-alt IRC channel at FreeNode. - -If you want to contribute either to docs or to code, simply send us change -request via `gerrit `__. -You can `file bugs `__ and -`register blueprints `__ on -Launchpad. - -How to Run -========== - -Tests For Web UI ----------------- -The web UI tests allow to perform complex integration testing with REST API -service, REST API client, orchestrator component and Murano -dashboard component. The simplest way to execute webUI tests is to run tox. - -Functional Tests For REST API service -------------------------------------- -To run all functional tests for REST API service need to run behave -with the following command:: - - # cd murano-tests/rest_api_tests/functional
- # behave rest_api_service.feature
- -Note: need to set the correct configuration for REST API service. Please, -check config.ini file for more detailed information. - - -Performance Tests For REST API service --------------------------------------- -To run all performance tests for REAT API service need to run func -load banch with the following command:: - - # cd murano-tests/rest_api_tests/load_and_performance
- # fl-run-bench test_rest.py TestSuite.mix_for_load_testing
- # fl-build-report --html --output-directory=html result-bench.xml
- -After that we can find the html report in the same folder. - -Note: need to set the correct configuration for REST API service. -Please, check config.ini file for more detailed information. diff --git a/boffin/README.rst b/boffin/README.rst deleted file mode 100644 index 6d2c594..0000000 --- a/boffin/README.rst +++ /dev/null @@ -1,6 +0,0 @@ -Robotframework-Boffin -========================== - -This library extends available keywords of Robotframework and robotframework-selenium2library. - -And provides keywords for REST requests testing. \ No newline at end of file diff --git a/boffin/build/lib/Boffin/_Settings.py b/boffin/build/lib/Boffin/_Settings.py deleted file mode 100644 index 3b9709b..0000000 --- a/boffin/build/lib/Boffin/_Settings.py +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -from ConfigParser import ConfigParser -from os import getcwd -from os.path import join - -from robot.libraries.BuiltIn import BuiltIn - - -_settingsFileName = 'settings.ini' - - -class _SettingsReader(object): - """ 'settings.ini' driver. """ - - @staticmethod - def read(): - """ - Loads default variables from the 'resources/settings.ini' file. - - Arguments: - - None. - - Return: - - None. - """ - try: - p = BuiltIn().get_variable_value('${resources_path}') - if p is not None: - _settingsFullFileName = join(p, _settingsFileName) - else: - _settingsFullFileName = join(getcwd(), 'resources', - _settingsFileName) - - conf = ConfigParser() - conf.read(_settingsFullFileName) - - for setting in conf.options('default'): - BuiltIn().set_global_variable('${%s}' % setting, - conf.get('default', setting)) - except: - pass diff --git a/boffin/build/lib/Boffin/__init__.py b/boffin/build/lib/Boffin/__init__.py deleted file mode 100644 index 292f903..0000000 --- a/boffin/build/lib/Boffin/__init__.py +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -from os.path import join, dirname - -from Selenium2Library import Selenium2Library - -from _Settings import _SettingsReader -from keywords import * - -execfile(join(dirname(__file__), 'version.py')) - -__version__ = VERSION - -_SettingsReader.read() - - -class WebUIlib(Selenium2Library, _WebUIlib): - """ - This class supports WebUi related testing using the Robot Framework. - """ - - ROBOT_LIBRARY_SCOPE = 'GLOBAL' - ROBOT_LIBRARY_VERSION = VERSION - - -class Rest(_Rest): - """ - This class supports Rest related testing using the Robot Framework. - """ - - ROBOT_LIBRARY_SCOPE = 'GLOBAL' - ROBOT_LIBRARY_VERSION = VERSION - - -class DB(Pydblibrary): - """ - This library supports database-related testing using the Robot Framework. - """ - - ROBOT_LIBRARY_SCOPE = 'GLOBAL' - ROBOT_LIBRARY_VERSION = VERSION diff --git a/boffin/build/lib/Boffin/keywords/_Rest.py b/boffin/build/lib/Boffin/keywords/_Rest.py deleted file mode 100644 index 15b9629..0000000 --- a/boffin/build/lib/Boffin/keywords/_Rest.py +++ /dev/null @@ -1,238 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import json -import requests -from robot.api import logger - - -class _Rest(object): - - ROBOT_LIBRARY_SCOPE = 'GLOBAL' - - headers = None - body = None - url = None - - def clear_headers(self): - """ - Clears headers for REST API requests. - - *Arguments:* - - None. - - *Return:* - - None. - - *Examples*: - | Clear Headers | - """ - self.headers = [] - - def set_headers(self, headers_dict): - """ - Configures headers for REST API requests. - - *Arguments:* - - headers_dict: string with json dict. - - *Return:* - - None. - - *Examples*: - | Set Headers | {'Content-Type': 'application/json' | - """ - try: - self.headers = json.loads(headers_dict) - except: - raise AssertionError('Incorrect headers: %s' % headers_dict) - - def update_headers(self, name, value): - """ - Modifies headers for REST API requests. - - *Arguments:* - - name: header name. - - value: header value. - - *Return:* - - None. - - *Examples*: - | Update Headers | X-Auth-Token | 8808880808080808 | - """ - self.headers[name] = value - - def set_body(self, body_dict): - """ - This function allows to configure body for REST API requests. - - *Arguments:* - - body_dict: string with json dict. - - *Return:* - - None. - - *Examples*: - | Set Headers | {'Content-Type': 'application/json' | - """ - self.body = body_dict - - def get_headers(self): - """ - Gets headers for REST API requests. - - *Arguments:* - - None. - - *Return:* - - Headers dict. - - *Examples*: - | ${headers} | Get Headers | - """ - return self.headers - - def GET_request(self, url): - """ - Sends GET request. - - *Arguments:* - - url: destination url. - - *Return:* - - None. - - Examples: - | GET request | http://10.10.10.1:8082/environments | - """ - self.response = requests.request('GET', url=url, headers=self.headers) - - def POST_request(self, url): - """ - Sends POST request. - - *Arguments:* - - url: destination url. - - *Return:* - - None. - - *Examples*: - | POST request | http://10.10.10.1:8082/environments | - """ - debug_data = 'POST Request to URL: %s \n' \ - 'with Headers: %s \n' \ - 'and Body: %s' % (url, self.headers, self.body) - logger.debug(debug_data) - - self.response = requests.request('POST', url, - headers=self.headers, - data=self.body) - - logger.debug('Response: %s' % self.response.text) - - def POST_request_without_body(self, url): - """ - Sends POST request without body. - - *Arguments:* - - url: destination url. - - *Return:* - - None. - - *Examples*: - | POST request | http://10.10.10.1:8082/environments | - """ - debug_data = 'POST Request to URL: %s \n' \ - 'with Headers: %s \n' % (url, self.headers) - logger.debug(debug_data) - - self.response = requests.request('POST', url, - headers=self.headers) - logger.debug('Response: %s' % self.response.text) - - def DELETE_request(self, url): - """ - Sends DELETE request. - - *Arguments:* - - url: destination url. - - *Return:* - - None. - - *Examples*: - | DELETE request | http://10.10.10.1:8082/environments | - """ - self.response = requests.request('DELETE', url=url, - headers=self.headers) - - def PUT_request(self, url): - """ - Sends PUT request. - - *Arguments:* - - url: destination url. - - *Return:* - - None. - - *Examples*: - | PUT request | http://10.10.10.1:8082/env | - """ - debug_data = 'POST Request to URL: %s \n' \ - 'with Headers: %s \n' \ - 'and Body: %s' % (url, self.headers, self.body) - logger.debug(debug_data) - - self.response = requests.request('PUT', url, - headers=self.headers, - data=self.body) - logger.debug('Response: %s' % self.response.text) - - def get_response_code(self): - """ - Gets response code. - - *Arguments:* - - None. - - *Return:* - - response code. - - *Examples*: - | ${code} | Get Response Code | - """ - return self.response.status_code - - def get_response_body(self): - """ - Gets response body. - - *Arguments:* - - None. - - *Return:* - - response body. - - *Examples*: - | ${body} | Get Response Body | - """ - logger.debug('Response: %s' % self.response.text) - if self.response.text is None: - self.response.text = {} - - return json.loads(self.response.text) diff --git a/boffin/build/lib/Boffin/keywords/_Utils.py b/boffin/build/lib/Boffin/keywords/_Utils.py deleted file mode 100644 index ad4093a..0000000 --- a/boffin/build/lib/Boffin/keywords/_Utils.py +++ /dev/null @@ -1,328 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -from ConfigParser import ConfigParser -from os import getcwd -from os.path import join -from bs4 import BeautifulSoup -from robot.libraries.BuiltIn import BuiltIn - - -class _ArtificialIntelligence: - """ - This class allows to find input and select controls \ - without manual input of identificators. - We can find input fields by labels near those fields. \ - Boffin heart. - """ - - ROBOT_LIBRARY_SCOPE = 'GLOBAL' - - def __init__(self, page_source): - """ - Class constructor. - - *Arguments:* - - page_source: web page source code. - - *Return:* - - None. - """ - self.page_source = page_source - - def _get_xpath_of_element(self, element): - """ - This function allows to get xpath of soup elements. - - *Arguments:* - - element: selector name. - - *Return:* - - element xpath. - """ - - number = 1 - try: - number += len(element.find_previous_siblings(element.name)) - except: - pass - - xpath = element.name - if number > 1: - xpath += '[' + str(number) + ']' - - for parent in element.findParents(): - if parent.name != '[document]': - k = 0 - for tag in parent.find_previous_siblings(): - if tag.name == parent.name: - k += 1 - if k == 0: - xpath = parent.name + '/' + xpath - else: - xpath = parent.name + '[' + str(k + 1) + ']/' + xpath - - return xpath - - def extra_search(self, soup, value, tag=None): - """ - This function allows to get element by its parameters. - - *Arguments:* - - soup: soup structure. - - value: element name. - - *Return:* - - label_element. - """ - - label_element = None - - if label_element is None: - label_element = soup.find(tag, text=str(value)) - if label_element is None: - label_element = soup.find(tag, attrs={'value': value}) - if label_element is None: - label_element = soup.find(tag, attrs={'title': value}) - - if label_element is None: - try: - for element in soup.find_all(tag): - if str(value) in element.text: - label_element = element - except: - pass - - return label_element - - def find_element(self, label, element_type='input', method='next', - result='xpath'): - """ - Looks for specified element on the page. - - *Arguments:* - - label: selector name. - - element_type: element tag name. It could be any tag or \ - several tags (then they are listed as 'select/input/a'). - - method: element search method. If 'next' is set, then \ - function is looking for the next input field after the \ - specified element. - Otherwise it returns the specified element itself. - - *Return:* - - element xpath. - - *Examples:* - | ${xpath} | Find element | E-mail | input | next | - | ${xpath} | Find element | Cancel | a/div | this | - """ - html = str(self.page_source.encode("utf-8", "replace")) - - " load html to soup structure for parsing " - soup = BeautifulSoup(html) - - " search element after the label" - try: - element_types = element_type.split('/') - element = None - - label_element = self.extra_search(soup, label) - for element_type in element_types: - if method == 'next': - element = label_element.parent.find_next(element_type) - - elif method == 'previous': - element = label_element.parent.find_previous(element_type) - - elif method == 'associated': - for t in ['a', 'button', 'input', 'select']: - elements = label_element.parent.find_all_next(t) - for e in elements: - if element_type in e.text: - element = e - if element: - break - elements = label_element.parent.find_all_previous(t) - for e in elements: - if element_type in e.text: - element = e - if element: - break - else: - element = self.extra_search(soup, label, element_type) - - if element: - break - - " return xpath of element " - if result == 'xpath': - return self._get_xpath_of_element(element) - else: - return element - except: - return None - - -class _Utils(object): - ROBOT_LIBRARY_SCOPE = 'GLOBAL' - - def get_element_from_repo(self, element_name): - """ - Returns element type, identificator and frame from \ - the 'resources/objrepo/%screen_name%.ini' file by element name. - - *Arguments:* - - elementName: screen name and selector name divided by dot. - - *Return:* - - [elType, elIdentificator, elFrame]. - - *Example:* - | @{element} | Get Element From Repo | Home . Banner Page 2 Button | - """ - try: - p = BuiltIn().get_variable_value('${resources_path}') - if p is not None: - _objRepoPath = join(p, 'objrepo') - else: - _objRepoPath = join(getcwd(), 'resources', 'objrepo') - - element_name = element_name.lower().replace(' ', '') - print "Element Name: " + element_name - inputElement = element_name.split('.') - - if len(inputElement) == 1: - fileName = 'common.ini' - name = element_name - - else: - fileName = '%s.ini' % inputElement[0] - name = inputElement[1] - - fullFileName = join(_objRepoPath, fileName) - print "fullFileName " + fullFileName - conf = ConfigParser() - conf.read(fullFileName) - - print "A: " + conf.get(str(name), 'type') - print "A: " + conf.get(name, 'type') - - if not conf.has_section(name): - print name - return ['', None, ''] - element_type = conf.get(name, 'type') - - element_identificator = '' - element_parent_name = conf.get(name, 'parent') - if element_parent_name: - element_identificator = \ - self.get_element_from_repo(element_parent_name)[1] + \ - element_identificator - - element_identificator += conf.get(name, 'identificator') - - element_frame = conf.get(name, 'frame') - return [element_type, element_identificator, element_frame] - except: - return ['', None, ''] - - def get_web_element_frame(self, elementName): - """ - Returns element frame by its name in the - 'resources/objrepo/%screen_name%.ini' file. - - *Arguments:* - - elementName: screen name and selector name divided by dot. - - *Return:* - - elFrame. - - *Example:* - | ${elFrame} | GetElementFrame | Blog . Post Text field | - """ - type, id, frame = self.get_element_from_repo(elementName) - return frame - - def get_web_element_selector(self, name, page_source=None, - element_type='input', method='next', - result='xpath'): - """ - Returns element selector by its name in the \ - 'resources/ObjRepo.ini' file. - - *Arguments:* - - name: selector name. - - page_source: web page source code. - - element_type: element tag name. It could be any tag or several \ - tags (then they are listed as 'select/input/a'). - - method: element search method. If 'next' is set, then function - is looking for the next input field after the specified element. - Otherwise it returns the specified element itself. - - *Return:* - - elIdentificator. - - *Examples:* - | ${selector} | Get element selector | User Name | ${source_code} \ - | input | next | - | ${selector} | Get element selector | Submit Button | ${source_code} \ - | a | this | - """ - type, id, frame = self.get_element_from_repo(name) - - if not id and page_source: - boffin = _ArtificialIntelligence(page_source) - id = boffin.find_element(name, element_type, method, result) - if result != 'xpath': - return id - if id: - type = 'xpath' - - identificator = None - if id: - identificator = '%s%s' % \ - ('' if not type else '%s=' % str(type), str(id)) - - return identificator - - def get_table_row_xpath(self, page_source, name): - """ - This method allows to parse tables on web pages \ - and determine the table row by element from table. - - *Arguments:* - - page_source: web page source code. - - name: identificator of row element. - - *Return:* - - xpath of table row. - - *Example:* - | ${elXpath} | Get Table Row Xpath | Entity 123 | - """ - _type = 'td/a/label/input/select' - element = self.get_web_element_selector(name, page_source, - _type, method='this', - result='element') - tag = element.name - while tag != 'tr' and tag: - try: - tag = element.parent.name - element = element.parent - except: - tag = None - pass - - e = _ArtificialIntelligence(page_source) - return e._get_xpath_of_element(element) diff --git a/boffin/build/lib/Boffin/keywords/_WebUIlib.py b/boffin/build/lib/Boffin/keywords/_WebUIlib.py deleted file mode 100644 index 40f3c08..0000000 --- a/boffin/build/lib/Boffin/keywords/_WebUIlib.py +++ /dev/null @@ -1,668 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc -# -# Licensed under the Apache License, Version 2 0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www apache org/licenses/LICENSE-2 0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License - -from time import sleep - -from robot.libraries.BuiltIn import BuiltIn - -from _Utils import _Utils - - -# Decorator for framed elements. -def _framed(framed_element_name): - def real_framed(function): - def wrapper(self, *args): - co_varnames = function.func_code.co_varnames - upper_varnames = [varnames.upper() for varnames in co_varnames] - index = upper_varnames.index(framed_element_name.upper()) - - element_frame = \ - self.get_web_element_frame(args[index - 1]) - if element_frame: - self.set_current_frame(element_frame) - - res = function(self, *args) - - if element_frame: - self.unselect_frame() - - return res - - return wrapper - - return real_framed - - -class _WebUIlib(_Utils): - - def navigate_to(self, path, dont_wait=None): - """ - Navigates to the page by given links sequence. - - *Arguments:* - - path: sequence of links separated by '>'. - - dont_wait: optional parameter. Should be set to skip waiting \ - for page loaded. - - *Return:* - - None. - - *Examples:* - | Navigate to | Careers>Account Executive | - """ - links = path.split('>') - - for link in links: - self.click_link(link) - self.wait_for_page_loaded(dont_wait) - - @_framed('over_element_name') - def click_on_submenu(self, over_element_name, name, dont_wait=None): - """ - Puts mouse over menu element and then clicks on submenu element by \ - given selector names and waits for page loaded if needed. - - *Arguments:* - - over_element_name: menu selector title taken from object \ - repository. - - name: submenu selector title taken from object repository. - - dont_wait: optional parameter. Should be set to skip waiting \ - for page loaded. - - *Return:* - - None. - - *Examples:* - | Click on submenu | Settings | Profile | - """ - self.put_mouse_over(over_element_name) - sleep(1) - self.click_on(name) - self.wait_for_page_loaded(dont_wait) - - def click_on_link(self, link, dont_wait=None): - """ - Clicks the link by given localor and waits for page loaded if needed. - - *Arguments:* - - link: this attribute can contain one of following: id, name, \ - href or link text. - - dont_wait: optional parameter. Should be set to skip waiting \ - for page loaded. - - *Return:* - - None. - - *Examples:* - | Click on link | Move to Trash | - | Click on link | Delete | don't wait | - """ - self.wait_for_element_found(link, 'a', 'this') - self.click_link(link) - self.wait_for_page_loaded(dont_wait) - - def wait_for_page_loaded(self, dont_wait=None, page_load_timeout=60): - """ - Waits for 'complete' page state during predefined page load timeout. - - Does not wait for page loading if wait argument is set to any value \ - except the ${empty}. - - *Arguments:* - - dont_wait: optional parameter. Should be set to skip waiting \ - for page loaded. - - page_load_timeout: optional parameter. Timeout for page loading. - - *Return:* - - None. - - *Examples:* - | Wait for page loaded | - | Wait for page loaded | don't wait | - """ - ajax_wait_timeout = \ - BuiltIn().get_variable_value('${ajax_wait_timeout}') - - if ajax_wait_timeout: - self.wait_for_condition('return window.jQuery.active == 0', - ajax_wait_timeout, - 'Ajax request was not loaded in ' - '%s second(s)' % ajax_wait_timeout) - - if not dont_wait: - self.wait_for_condition('return document.readyState == "complete"', - page_load_timeout, - 'Page was not loaded in ' - '%s second(s)' % page_load_timeout) - - def title_should_contain(self, text): - """ - Verifies that current page title contains given text. - - *Arguments:* - - text: text which should be in the title set in test case. - - *Return:* - - None. - - *Examples:* - | Title should contain | Account Executive | - """ - title = self.get_title() - BuiltIn().should_contain(title, text) - - @_framed('name') - def click_on(self, name, dont_wait=None): - """ - Clicks the element by given selector name and waits for page loaded \ - if needed. - - *Arguments:* - - name: selector title taken from object repository. - - dont_wait: optional parameter. Should be set to skip waiting \ - for page loaded. - - *Return:* - - None. - - *Examples:* - | Click on | Dashboard . Users button | - """ - selector = self.wait_for_element_found(name, 'button/input/a', 'this') - self.click_element(selector) - self.wait_for_page_loaded(dont_wait) - - def set_current_frame(self, name): - """ - Sets frame identified by given selector name as current frame. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Set current frame | Post Editor Frame | - """ - selector = self.get_web_element_selector(name) - self.select_frame(selector) - - def element_text_should_contain(self, name, text): - """ - Verifies that element with given selector type contains the given text. - - *Arguments:* - - name: selector title taken from object repository. - - text: text to be found set in test. - - *Return:* - - None. - - *Examples:* - | Element Text Should Contain | Dashboard . Message text | \ - Post Updated | - """ - selector = self.get_web_element_selector(name) - self.element_should_contain(selector, text) - - def element_text_should_be_equal_to(self, name, text): - """ - Verifies that element with given selector type equals to the \ - given text. - - *Arguments:* - - name: selector title taken from object repository. - - text: text to be found set in test. - - *Return:* - - None. - - *Examples:* - | Element Text Should Be Equal To | Dashboard . Message text | \ - User deleted | - """ - selector = self.get_web_element_selector(name) - self.element_text_should_be(selector, text) - - def element_text_should_not_contain(self, name, text): - """ - Verifies that element with given selector type not contain the \ - given text. - - *Arguments:* - - name: selector title taken from object repository. - - text: text to be found set in test. - - *Return:* - - None. - - *Examples:* - | Element Text Should Not Contain | Dashboard . Message text \ - | Post Updated. | - """ - selector = self.get_web_element_selector(name) - self.element_should_not_contain(selector, text) - - def element_text_should_not_be_equal_to(self, name, text): - """ - Verifies that element text with given selector type not qual to the \ - given text. - - *Arguments:* - - name: selector title taken from object repository. - - text: text to be found set in test. - - *Return:* - - None. - - *Examples:* - | Element Text Should Not Be Equal To | Dashboard . Message text \ - | Post Updated. | - """ - selector = self.get_web_element_selector(name) - self.element_text_should_not_be(selector, text) - - def element_should_not_contain(self, selector, text): - """ - Verifies element identified by given selector does not contain \ - given text. - - *Arguments:* - - selector: element identificator in the object repository. - - text: text to be checked. - - *Return:* - - None. - - *Examples:* - | Element Should Not Contain | xpath=//div[@id='moderated']/p \ - | rude message | - """ - obj_text = self.get_text(selector) - BuiltIn().should_not_contain(obj_text, text) - - def element_text_should_not_be(self, selector, text): - """ - Verifies element identified by given selector does not equal to the \ - given text. - - *Arguments:* - - selector: element identificator in the object repository. - - text: text to be checked. - - *Return:* - - None. - - *Examples:* - | Element Should Not Be | xpath=//div[@id='moderated']/p \ - | rude message | - """ - obj_text = self.get_text(selector) - BuiltIn._should_not_be_equal(obj_text, text) - - def page_should_have_number_of_elements(self, count, name): - """ - Verifies that current page contains given number of elements with \ - given selector type. - - *Arguments:* - - count: number of element to be found. - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Page should have number of elements | 4 | Banner Buttons | - """ - element = self.get_element_from_repo(name) - self.xpath_should_match_x_times(element[1], count) - - def page_should_have_element(self, name): - """ - Verifies that current page contains given element. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Page should have element | Contact Us button | - """ - selector = self.get_web_element_selector(name) - self.page_should_contain_element(selector) - - def page_should_not_have_element(self, name): - """ - Verifies that current page does not contain given element. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Page should not have element | Contact Us button | - """ - selector = self.get_web_element_selector(name) - self.page_should_not_contain_element(selector) - - def put_mouse_over(self, name): - """ - Simulates hovering mouse over the element specified by selector name. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Put mouse over | Dashboard . Posts button | - """ - selector = self.get_web_element_selector(name) - self.mouse_over(selector) - - @_framed('field_name') - def fill_field(self, field_name, text): - """ - Gets element by its field name and fills it with given text. - Note: If field name will be 'password' then \ - ${text} won't be logged. - - *Arguments:* - - field_name: selector title taken from object repository. - - text: text to be entered into field. - - *Return:* - - None. - - *Examples:* - | Fill field | Dashboard . New Post Title field | Test blog-post | - """ - selector = self.wait_for_element_found(field_name, 'input/textarea', - 'next') - - if 'PASSWORD' in field_name.upper(): - self.input_password(selector, text) - else: - self.input_text(selector, '') - self.input_text(selector, text) - - def wait_for_element_found(self, element_name, element_type, method): - """ - Makes 10 retries to get element by its name with defined retry \ - interval (1 second). - - *Arguments:* - - element_name: selector title taken from object repository; - - element_type: element tag, could take several tags at once \ - (e.g. select/input/a); - - method: a method of how to search for the element. - - *Return:* - - selector: element identificator from object repository. - - *Examples:* - | ${selector} | Wait for element found | Dashboard Menu Title field \ - | input | next | - """ - for attempt in range(10): - try: - page_source_code = self.get_source() - selector = self.get_web_element_selector(element_name, - page_source_code, - element_type, - method) - except: - pass - if selector: - break - - sleep(1) - - if not selector: - BuiltIn().run_keyword('Capture Page Screenshot') - raise AssertionError('Web element "%s" was not found in object ' - 'repository and on page.' % element_name) - - return selector - - @_framed('name') - def select_item_from_list(self, name, item_name): - """ - Selects specified item from given list. - - *Arguments:* - - name: selector title taken from object repository. - - item_name: list box item. - - *Return:* - - None. - - *Examples:* - | Select item from list | Dashboard . User Action dropdown | Delete | - """ - selector = self.wait_for_element_found(name, 'select', 'next') - self.select_from_list(selector, item_name) - - @_framed('name') - def set_checkbox_on(self, name): - """ - Set checkbox with given title on. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Set checkbox on | Dashboard . Delete Posts Role checkbox | - """ - selector = self.wait_for_element_found(name, 'select', 'previous') - self.select_checkbox(selector) - - @_framed('name') - def set_checkbox_off(self, name): - """ - Set checkbox with given title off. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Set checkbox off | Dashboard . Delete Posts Role checkbox | - """ - selector = self.wait_for_element_found(name, 'select', 'previous') - self.unselect_checkbox(selector) - - @_framed('from_name') - def drag_and_drop_to(self, from_name, to_name): - """ - Drags and drops from one given element to other. - - *Arguments:* - - from_name: selector title taken from object repository to get \ - content from; - - to_name: selector title taken from object repository to put \ - content to. - - *Return:* - - None. - - *Examples:* - | Drag And Drop To | Photo gallery | User avatar | - """ - from_selector = self.wait_for_element_found(from_name, - 'button/input/a/img/div', - 'this') - to_selector = self.wait_for_element_found(to_name, - 'button/input/a/img/div', - 'this') - self.drag_and_drop_to(from_selector, to_selector) - - def find_associated_element(self, first_element, desired_element): - """ - This method allows to find element, which located near other element \ - and returns xpath of this element. - Sometimes we have many identical elements on page and we can find \ - correct element based on nearest unique elements. - - *Arguments:* - - First_Element: base element, near this element we want to find \ - other element. - - Desired_Element: this is element which we want to find. - - *Return:* - - xpath of Desired_Element or None - - *Examples:* - | {element_xpath} | Find Associated Element | MyUniqueElement \ - | DesiredElement | - """ - element = self.wait_for_element_found(first_element, desired_element, - 'associated') - - return element - - @_framed('name') - def select_radio_by_selector(self, name, value): - """ - Sets selection of radio button group identified by selector name \ - to value. - - *Arguments:* - - name: selector title taken from object repository. - - value: value to be selected, is used for the value attribute or \ - for the id attribute. - - *Return:* - - None. - - *Examples:* - | Select Radio By Selector | Dashboard . Questionnaire | Yes | - """ - selector = self.wait_for_element_found(name, 'input', 'previous') - self.select_radio_button(selector, value) - - def get_table_row_with(self, element): - """ - This method allows to find table row with specific element. \ - After this xpath of table row can be used like base for xpath of \ - different elements in this table. - - *Arguments:* - - element: the unique element from table. - - *Return:* - - xpath of table row for this element - - *Examples:* - | {table_xpath} | Get Table Row With | MyUniqueElement | - | Click Element \ \ | xpath={table_xpath}/td[4]/button | - """ - source_code = self.get_source() - result = self.get_table_row_xpath(source_code, element) - - return result - - @_framed('name') - def element_should_be_invisible(self, name): - """ - Verifies that element is invisible on the page. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Element Should Be Invisible | Dashboard . Post Publish button | - """ - selector = self.wait_for_element_found(name, - 'button/input/a/img', - 'this') - self.element_should_not_be_visible(selector) - - @_framed('name') - def element_should_not_be_invisible(self, name): - """ - Verifies that element is visible on the page. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Element Should Not Be Invisible | Dashboard . Post Publish button | - """ - selector = self.wait_for_element_found(name, - 'button/input/a/img', - 'this') - self.element_should_be_visible(selector) - - @_framed('name') - def get_element_text(self, name): - """ - Gets text of given element. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - text of element. - - *Examples:* - | ${text} | Get Element Text | Main header | - """ - selector = self.wait_for_element_found(name, - 'button/input/a/img', - 'this') - text = self.get_text(selector) - - return text - - @_framed('name') - def get_attribute_of_element(self, name, attribute): - """ - Gets attribute of given element. - - *Arguments:* - - name: selector title taken from object repository. - - attribute: attribute that would be taken. - - *Return:* - - text of element attribute. - - *Examples:* - | ${id_text} | Get Attribute Of Element | Main header | id | - """ - selector = self.wait_for_element_found(name, - 'button/input/a/img', - 'this') - attr_selector = '%s@%s' % (selector, attribute) - attr_text = self.get_element_attribute(attr_selector) - - return attr_text diff --git a/boffin/build/lib/Boffin/keywords/__init__.py b/boffin/build/lib/Boffin/keywords/__init__.py deleted file mode 100644 index b781ab7..0000000 --- a/boffin/build/lib/Boffin/keywords/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -from _WebUIlib import _WebUIlib -from _Rest import _Rest -from Pydblibrary import Pydblibrary - -__all__ = [ - '_WebUIlib', - '_Rest', - 'Pydblibrary' -] diff --git a/boffin/build/lib/Boffin/version.py b/boffin/build/lib/Boffin/version.py deleted file mode 100644 index 72a783a..0000000 --- a/boffin/build/lib/Boffin/version.py +++ /dev/null @@ -1 +0,0 @@ -VERSION = '1.0rc3' diff --git a/boffin/dirty_parallel.py b/boffin/dirty_parallel.py deleted file mode 100644 index a2cf9e1..0000000 --- a/boffin/dirty_parallel.py +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# Please, install python before run this script. -# Also, please, do not forget to install the following packages for tests: -# robotframework, robotframework-selenium2library, BeautifulSoup4 - -from subprocess import Popen -from argparse import ArgumentParser -from time import sleep -from os import listdir -from os.path import join, split - - -def wait_for_finished(threads): - """ - Wait until threads finish. - """ - for ind, t in enumerate(threads): - if t.poll() is not None: - threads.pop(ind) - sleep(1) - - -s = "This script allows to run Robot Framework tests concurrently." -parser = ArgumentParser(description=s) - -parser.add_argument("-n", dest="processes_count", - default=1, type=int, - help="The number of parallel threads (1 by default).") - -parser.add_argument('-s', dest='script_name', - default=None, type=str, - help='The name of file with tests or name pattern.') - -parser.add_argument('-l', dest='scripts_list', - default=None, nargs='*', - help='Names of test files separated by spaces.') - -parser.add_argument('--runfailed', dest='run_failed', - default=None, type=str) - -parser.add_argument("-t", dest="tag", type=str) - -parser.add_argument('--name', dest='name', type=str) - -parser.add_argument('-r', dest='reports_dir', - default="reports", type=str) - -parser.add_argument('--IP', dest='IP', type=str) - -args = parser.parse_args() - -i = 1 -tags_list = [] -parallel_script = args.script_name+'_parallel.txt' -o = open(parallel_script,'w') -for line in open(args.script_name): - if args.tag in line: - new_tag = args.tag + str(i) - line = line.replace(args.tag, new_tag) - if not new_tag in tags_list: - tags_list.append(new_tag) - i += 1 - if i > args.processes_count: - i = 1 - o.write(line) -o.close() - - -cmd = 'pybot -C off -K off -d %s/%s' - -# Start all threads with tests. -if args.script_name: - cmd += ' -i %s --name ' + args.name + ' --variable IP:' + args.IP + ' ' - if args.run_failed: - cmd += '--runfailed ' + args.run_failed + ' ' - cmd += parallel_script + ' >/dev/null 2>&1' - # Start all threads with tests and ignore empty threads. - threads = [] - for i, tag in enumerate(tags_list): - values = (args.reports_dir, i, tag) - print cmd % values - threads.append(Popen(cmd % values, shell=True)) - sleep(5) - while len(threads) == args.processes_count: - wait_for_finished(threads) - -# Wait for all threads finish. -while len(threads) > 0: - wait_for_finished(threads) - sleep(1) diff --git a/boffin/dist/robotframework_boffin-1.0rc3-py2.7.egg b/boffin/dist/robotframework_boffin-1.0rc3-py2.7.egg deleted file mode 100644 index 9a5c0dd..0000000 Binary files a/boffin/dist/robotframework_boffin-1.0rc3-py2.7.egg and /dev/null differ diff --git a/boffin/make_virtual_displays.pp b/boffin/make_virtual_displays.pp deleted file mode 100644 index e46a855..0000000 --- a/boffin/make_virtual_displays.pp +++ /dev/null @@ -1,51 +0,0 @@ -package { ['xvfb', - 'x11-xkb-utils', - 'xfonts-100dpi', - 'xfonts-75dpi', - 'xfonts-scalable', - 'xfonts-cyrillic', - 'xserver-xorg-core']: - ensure => latest, -} -exec {'Create new virtual desktop1': - require => [ Package['xvfb'], - Package['x11-xkb-utils'], - Package['xfonts-100dpi'], - Package['xfonts-75dpi'], - Package['xfonts-scalable'], - Package['xfonts-cyrillic'], - Package['xserver-xorg-core'] ], - command => 'Xvfb -fp /usr/share/fonts/X11/misc/ :20 - -screen 0 1024x768x16 2>&1; echo "ok"', - user => 'root', - provider => shell, - path => '/usr/bin', -} -exec {'Create new virtual desktop2': - require => [ Package['xvfb'], - Package['x11-xkb-utils'], - Package['xfonts-100dpi'], - Package['xfonts-75dpi'], - Package['xfonts-scalable'], - Package['xfonts-cyrillic'], - Package['xserver-xorg-core'] ], - command => 'Xvfb -fp /usr/share/fonts/X11/misc/ :21 - -screen 1 1024x768x16 2>&1; echo "ok"', - user => 'root', - provider => shell, - path => '/usr/bin', -} -exec {'Create new virtual desktop3': - require => [ Package['xvfb'], - Package['x11-xkb-utils'], - Package['xfonts-100dpi'], - Package['xfonts-75dpi'], - Package['xfonts-scalable'], - Package['xfonts-cyrillic'], - Package['xserver-xorg-core'] ], - command => 'Xvfb -fp /usr/share/fonts/X11/misc/ :22 - -screen 2 1024x768x16 2>&1; echo "ok"', - user => 'root', - provider => shell, - path => '/usr/bin', -} diff --git a/boffin/run_concurrently.py b/boffin/run_concurrently.py deleted file mode 100644 index d300217..0000000 --- a/boffin/run_concurrently.py +++ /dev/null @@ -1,128 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# Please, install python before run this script. -# Also, please, do not forget to install the following packages for tests: -# robotframework, robotframework-selenium2library, BeautifulSoup4 - -from subprocess import Popen -from argparse import ArgumentParser -from time import sleep -from os import listdir -from os.path import join, split -from xvfbwrapper import Xvfb - -def wait_for_finished(threads): - """ - Wait until threads finish. - """ - for ind, t in enumerate(threads): - if t.poll() is not None: - threads.pop(ind) - sleep(1) - - -s = "This script allows to run Robot Framework tests concurrently." -parser = ArgumentParser(description=s) - -parser.add_argument("-n", action="store", dest="processes_count", - default=1, type=int, - help="The number of parallel threads (1 by default).") - -req_group = parser.add_mutually_exclusive_group(required=True) - -req_group.add_argument('-s', action='store', dest='script_name', - default=None, type=str, - help='The name of file with tests or name pattern.') - -req_group.add_argument('-l', action='store', dest='scripts_list', - default=None, nargs='*', - help='Names of test files separated by spaces.') - -req_group.add_argument('-d', action='store', dest='tests_dir', - default=None, type=str, - help='The name of directory with tests to be executed.') - -parser.add_argument("-t", action="store", dest="tags_list", - default=None, nargs='*', - help="Test tags separated by spaces. Should be specified " - "with SCRIPT_NAME argument.") - -parser.add_argument('-R', action='store', dest='resources_dir', - default=None, type=str, - help='The resources directory path (e.g. ' - 'samples/mirantis.com/resources/).') - -parser.add_argument('-r', action='store', dest='reports_dir', - default="reports", type=str, - help='The directory name with reports ' - '("reports" directory by default).') - -args = parser.parse_args() - - -clear_displays = Popen('sudo pkill Xvfb; rm -rf /tmp/.X*-lock', shell=True) -while clear_displays.poll() is None: - sleep(1) - -# Generate the command for executing tests. -cmd = 'sudo su thread%s -c "export DISPLAY=:%s; pybot -C off -K off -d %s/%s' -if args.resources_dir: - cmd += " -v resources_path:" + args.resources_dir + " " - -# Start all threads with tests. -if args.tags_list and args.script_name: - cmd += ' -i %s ' + args.script_name + '" 2>/dev/null' - # Start all threads with tests and ignore empty threads. - threads = [] - for i, tag in enumerate(args.tags_list): - xvfb = Xvfb() - xvfb.start() - values = (i, xvfb.vdisplay_num, args.reports_dir, i, tag) - threads.append(Popen(cmd % values, shell=True)) - while len(threads) == args.processes_count: - wait_for_finished(threads) - sleep(1) -else: - if args.tests_dir: - files = listdir(args.tests_dir) - files = filter(lambda x: x.endswith('.txt'), files) - txt_scripts = [join(args.tests_dir, s) for s in files] - elif args.scripts_list: - txt_scripts = args.scripts_list - elif args.script_name: - txt_scripts = [args.script_name] - - cmd += "%s" # script name - threads = [] - for i, s in enumerate(txt_scripts): - # values for string formatting: - _, f = split(s) - f_name = f.split('.')[0] - values = ("2%s" % i, f_name, f_name, f_name, s) - # add thread - print "Execute command:\n", cmd % values - threads.append(Popen(cmd % values, shell=True)) - while len(threads) == args.processes_count: - wait_for_finished(threads) - sleep(1) - - -# Wait for all threads finish. -while len(threads) > 0: - wait_for_finished(threads) - -clear_displays = Popen('sudo pkill Xvfb; rm -rf /tmp/.X*-lock', shell=True) -while clear_displays.poll() is None: - sleep(1) diff --git a/boffin/samples/Murano/Resources/objrepo/common.ini b/boffin/samples/Murano/Resources/objrepo/common.ini deleted file mode 100644 index f48f3c4..0000000 --- a/boffin/samples/Murano/Resources/objrepo/common.ini +++ /dev/null @@ -1,8 +0,0 @@ -[DEFAULT] -type=identifier -frame= -parent= - -[newenvironmentname] -type=id -identificator=id_name \ No newline at end of file diff --git a/boffin/samples/Murano/sanity_checks.txt b/boffin/samples/Murano/sanity_checks.txt deleted file mode 100644 index bd4b73e..0000000 --- a/boffin/samples/Murano/sanity_checks.txt +++ /dev/null @@ -1,653 +0,0 @@ -*** Settings *** -Suite Setup Open Browser http://172.18.79.83/horizon -Suite Teardown Close All Browsers -Library String -Library Boffin.WebUIlib 20 10 - -*** Variables *** -${resources_path} /home/user/murano-tests/WebUI/Resources/ - -*** Test Cases *** -Check Environments Tab - [Tags] thread1 work - Log in WebUI by admin/swordfish - Page should contain element "Environments" - Log out - -Create environment - [Tags] thread1 work - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "env" for field Environment Name - User click on Create - Page should contain element "env" - Log out - -Edit environment - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "env1" for field Environment Name - User click on Create - User click on "More" for element "env1" - User click on "Edit Environment" for element "env1" - User set value "edited_env" for field New Environment Name - User click on Save - Page should contain element "edited_env" - Log out - -Delete Environment - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "env2" for field Environment Name - User click on Create - User click on "More" for element "env2" - User click on "Delete Environment" for element "env2" - User confirms deletion - Page should not contain element "env2" - Log out - -Create AD Service - [Tags] work - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "env_with_one_ad" for field Environment Name - User click on Create - User click on env_with_one_ad - User click on Create Service - User select "Active Directory" from dropdown list "Service Type" - User click on Next - User set value "ad.nastya" for field Domain Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field Recovery password - User set value "P@ssw0rd" for field Confirm password AD - User set value "ad" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - Page should contain element "ad.nastya" - Log out - -Create IIS service - [Tags] thread1 work - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "env_with_one_iis" for field Environment Name - User click on Create - User click on env_with_one_iis - User click on Create Service - User select "Internet Information Service" from dropdown list "Service Type" - User click on Next - User set value "iis-service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iis" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - Page should contain element "iis-service" - Log out - -Create ASP.Net App - [Tags] work - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "env_with_one_asp" for field Environment Name - User click on Create - User click on env_with_one_asp - User click on Create Service - User select "ASP.NET Application" from dropdown list "Service Type" - User click on Next - User set value "asp-service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "asp" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - Page should contain element "asp-service" - Log out - -Create IIS Farm - [Tags] work - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "env_with_iis_farm" for field Environment Name - User click on Create - User click on env_with_iis_farm - User click on Create Service - User select "Internet Information Service Web Farm" from dropdown list "Service Type" - User click on Next - User set value "iis_farm" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iisfarm#" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - Page should contain element "iis_farm" - Log out - -Create ASP.NET Farm - [Tags] work - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "env_with_asp_farm" for field Environment Name - User click on Create - User click on env_with_asp_farm - User click on Create Service - User select "ASP.NET Application Web Farm" from dropdown list "Service Type" - User click on Next - User set value "asp-farm" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "aspfarm#" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - Page should contain element "asp-farm" - Log out - -Create MS SQL Server - [Tags] work - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "env_with_one_mssql" for field Environment Name - User click on Create - User click on env_with_one_mssql - User click on Create Service - User select "MS SQL Server" from dropdown list "Service Type" - User click on Next - User set value "ms_sql" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field SA password - User set value "P@ssw0rd" for field Confirm password SQL - User set value "sql" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - Page should contain element "ms_sql" - Log out - -Create MS SQL Cluster - [Tags] work - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "env_with_sqlcluster" for field Environment Name - User click on Create - User click on env_with_sqlcluster - User click on Create Service - User create Active Directory ad.mssql - Page should contain element "ad.mssql" - User click on Create Service - User select "MS SQL Cluster Server" from dropdown list "Service Type" - User click on Next - User set value "sql_cluster" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "ad.mssql" from dropdown list "Active Directory Domain" - User set value "P@ssw0rd" for field SA password - User set value "P@ssw0rd" for field Confirm password cluster - User set value "sqlcluster#" for field Hostname template - User click on Next - User set value "10.200.0.88" for field Cluster Static IP - User set value "cluster" for field Cluster Name - User set value "AG_name" for field Availability Group Name - User set value "AG_listener_name" for field Availability Group Listener Name - User set value "10.200.0.89" for field Availability Group Listener IP - User set value "user" for field SQL User Name - User set value "P@ssw0rd" for field SQL User Password - User set value "P@ssw0rd" for field Confirm Password - User click on Next - User set value "testbase" for field Database list - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - Sleep 3s - Page should contain element "sql_cluster" - Log out - -Delete AD service - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "delete_ad" for field Environment Name - User click on Create - User click on delete_ad - User click on Create Service - User select "Active Directory" from dropdown list "Service Type" - User click on Next - User set value "ad.nastya" for field Domain Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field Recovery password - User set value "P@ssw0rd" for field Confirm password AD - User set value "ad" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - User click on Delete Service - User confirms deletion - Page should not contain element "ad.nastya" - Log out - -Delete IIS service - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "delete_iis" for field Environment Name - User click on Create - User click on delete_iis - User click on Create Service - User select "Internet Information Service" from dropdown list "Service Type" - User click on Next - User set value "iis_service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iis" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - User click on Delete Service - User confirms deletion - Page should not contain element "iis_service" - Log out - -Delete ASP.NET service - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "delete_asp" for field Environment Name - User click on Create - User click on delete_asp - User click on Create Service - User select "ASP.NET Application" from dropdown list "Service Type" - User click on Next - User set value "asp-service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "asp" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - User click on Delete Service - User confirms deletion - Page should not contain element "asp-service" - Log out - -Delete IIS Farm service - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "delete_iis_farm" for field Environment Name - User click on Create - User click on delete_iis_farm - User click on Create Service - User select "Internet Information Service Web Farm" from dropdown list "Service Type" - User click on Next - User set value "iis_farm" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iisfarm#" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - User click on iis_farm - User confirms deletion - Page should not contain element "iis_farm" - Log out - -Delete ASP.NET Farm service - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "delete_asp_farm" for field Environment Name - User click on Create - User click on delete_asp_farm - User click on Create Service - User select "ASP.NET Application Web Farm" from dropdown list "Service Type" - User click on Next - User set value "asp-farm" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "aspfarm#" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - User click on Delete Service - User confirms deletion - Page should not contain element "asp-farm" - Log out - -Delete MS SQL server - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "delete_mssql" for field Environment Name - User click on Create - User click on delete_mssql - User click on Create Service - User select "MS SQL Server" from dropdown list "Service Type" - User click on Next - User set value "ms_sql" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field SA password - User set value "P@ssw0rd" for field Confirm password SQL - User set value "sql" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - User click on Delete Service - User confirms deletion - Page should not contain element "ms_sql" - Log out - -Check opportunity to choose availability zone - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "env_av_zone" for field Environment Name - User click on Create - User click on env_av_zone - User click on Create Service - User select "Internet Information Service" from dropdown list "Service Type" - User click on Next - User set value "iis-service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iis" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User select "nova" from dropdown list "Availability zone" - Log out - -Check opportunity to choose Instance Flavor - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "env_inst_flavor" for field Environment Name - User click on Create - User click on env_inst_flavor - User click on Create Service - User select "Internet Information Service" from dropdown list "Service Type" - User click on Next - User set value "iis-service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iis" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User select "m1.small" from dropdown list "Instance flavor" - User select "m1.large" from dropdown list "Instance flavor" - User select "m1.medium" from dropdown list "Instance flavor" - Log out - -Check opportunity to choose Instance Image - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "env_inst_image" for field Environment Name - User click on Create - User click on env_inst_image - User click on Create Service - User select "Internet Information Service" from dropdown list "Service Type" - User click on Next - User set value "iis-service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iis" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User select "Windows Server 2012 x64 core Standard edition" from dropdown list "Instance image" - User select "Windows Server 2008 R2 x64 Standard edition" from dropdown list "Instance image" - Log out - -Deploy environment with AD Service - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "deploy_one_ad" for field Environment Name - User click on Create - User click on deploy_one_ad - User click on Create Service - User select "Active Directory" from dropdown list "Service Type" - User click on Next - User set value "ad.nastya" for field Domain Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field Recovery password - User set value "P@ssw0rd" for field Confirm password AD - User set value "ad" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - Page should contain element "ad.nastya" - User click on Deploy This Environment - Check the status of environment "deploy_one_ad" (should be "Ready") - Log out - -Deploy environment with IIS Service - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "deploy_iis" for field Environment Name - User click on Create - User click on deploy_iis - User click on Create Service - User select "Internet Information Service" from dropdown list "Service Type" - User click on Next - User set value "iis-service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iis" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - Page should contain element "iis-service" - User click on Deploy This Environment - Check the status of environment "deploy_iis" (should be "Ready") - Log out - -Deploy environment with ASP.NET Service - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "deploy_asp" for field Environment Name - User click on Create - User click on deploy_asp - User click on Create Service - User select "ASP.NET Application" from dropdown list "Service Type" - User click on Next - User set value "asp-service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "asp" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - Page should contain element "asp-service" - User click on Deploy This Environment - Check the status of environment "deploy_asp" (should be "Ready") - Log out - -Deploy environment with IIS Farm - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "deploy_iis_farm" for field Environment Name - User click on Create - User click on deploy_iis_farm - User click on Create Service - User select "Internet Information Service Web Farm" from dropdown list "Service Type" - User click on Next - User set value "iis_farm" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iisfarm#" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - Page should contain element "iis_farm" - User click on Deploy This Environment - Check the status of environment "deploy_iis_farm" (should be "Ready") - Log out - -Deploy environment with ASP.NET Farm - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "deploy_asp_farm" for field Environment Name - User click on Create - User click on deploy_asp_farm - User click on Create Service - User select "ASP.NET Application Web Farm" from dropdown list "Service Type" - User click on Next - User set value "asp-farm" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "aspfarm#" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - Page should contain element "asp-farm" - User click on Deploy This Environment - Check the status of environment "deploy_asp_farm" (should be "Ready") - Log out - -Deploy environment with MS SQL server - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "deploy_mssql" for field Environment Name - User click on Create - User click on deploy_mssql - User click on Create Service - User select "MS SQL Server" from dropdown list "Service Type" - User click on Next - User set value "ms_sql" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field SA password - User set value "P@ssw0rd" for field Confirm password SQL - User set value "sql" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - Page should contain element "ms_sql" - User click on Deploy This Environment - Check the status of environment "deploy_mssql" (should be "Ready") - Log out - -test - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "test" for field Environment Name - User click on Create - Page should contain element "test" - Check status test - -Deploy AD with 2 instances - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "deploy_ad_2_inst" for field Environment Name - User click on Create - User click on deploy_ad_2_inst - User click on Create Service - User select "Active Directory" from dropdown list "Service Type" - User click on Next - User set value "ad.nastya.two" for field Domain Name - User set value "2" for field Instance Count - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field Recovery password - User set value "P@ssw0rd" for field Confirm password AD - User set value "adtwo#" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - Page should contain element "ad.nastya.two" - User click on Deploy This Environment - Check the status of environment "deploy_ad_2_inst" (should be "Ready") - Log out - -Deploy MSSQL with 2 instances - Log in WebUI by admin/swordfish - User click on Create Environment - User set value "deploy_mssql" for field Environment Name - User click on Create - User click on deploy_mssql - User click on Create Service - User select "MS SQL Server" from dropdown list "Service Type" - User click on Next - User set value "ms_sql" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field SA password - User set value "P@ssw0rd" for field Confirm password SQL - User set value "sql" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create - Page should contain element "ms_sql" - User click on Deploy This Environment - Check the status of environment "deploy_mssql" (should be "Ready") - Log out - -*** Keywords *** -Log in WebUI by ${user}/${password} - Fill Field User Name ${user} - Fill Field Password ${password} - Click on Sign In - Navigate to Project>Environments - -User set value "${value}" for field ${field} - Fill Field ${field} ${value} - -Select type of the service - [Arguments] ${type} - Select Item From List Service Type ${type} - Click Button Next - -Log out - Click on Sign Out - Page Should Contain Button Sign In - -Check the status of environment "${env_name}" (should be "Ready") - Wait Until Keyword Succeeds 20 minute 5s Check status ${env_name} - -Check status - [Arguments] ${env_name} - Navigate to Project>Environments - ${row} Find Associated Element ${env_name} Ready to configure - -User click on - [Arguments] ${arg} - Sleep 2s - Click on ${arg} - Sleep 2s - -Page should contain element "${element}" - Sleep 3s - Page Should Contain ${element} - -Page should not contain element "${element}" - Page Should Not Contain ${element} - -User click on "${button}" for element "${env}" - ${element} Find Associated Element ${env} ${button} - Click Element ${element} - -User select "${item}" from dropdown list "${menu}" - Select Item From List ${menu} ${item} - -User confirms deletion - ${element}= Find Associated Element Cancel Delete Environment - Click Link Delete Environment - Sleep 3s - -User create Active Directory - [Arguments] ${name} - User select "Active Directory" from dropdown list "Service Type" - User click on Next - User set value "${name}" for field Domain Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field Recovery password - User set value "P@ssw0rd" for field Confirm password AD - User set value "adforsql" for field Hostname template - User click on Next - User select "Windows Server 2012 x64 Standard edition" from dropdown list "Instance image" - User click on Create diff --git a/boffin/samples/Murano_REST_API/REST_Tests.txt b/boffin/samples/Murano_REST_API/REST_Tests.txt deleted file mode 100644 index da03252..0000000 --- a/boffin/samples/Murano_REST_API/REST_Tests.txt +++ /dev/null @@ -1,491 +0,0 @@ -*** Settings *** -Library Collections -Resource libs/MuranoRest.txt - -*** Variables *** -${ip} 172.18.124.201 -${ip_keystone} 172.18.124.201 -${user} muranorestapi -${password} swordfish - -*** Test Cases *** -Begin of testing - [Tags] thread1 - Get X-Auth-Token ${ip_keystone} - Get Headers - -Clearing - [Tags] thread1 - #Delete All Environments # закоментировано так, на всякий случай..... - ${result} Get List Of Environments - #Should Be Empty ${result['environments']} - -Get list of environments - [Tags] thread1 - ${result} Get List Of Environments - ${list} Format List ${result['environments']} - Log List ${list} - -Create environment - [Tags] thread1 - Create Environment test-rest-api-env2 - -Create/edit/delete environment - [Tags] thread1 - ${result} Get List Of Environments - ${len} Get Length ${result['environments']} - ${list} Format List ${result['environments']} - Log List ${list} - Create Environment env_2_del - ${result} Get List Of Environments - ${len1} Get Length ${result['environments']} - ${len1} = Evaluate ${len1} - 1 - Should Be Equal As Integers ${len} ${len1} - ${list} Format List ${result['environments']} - Log List ${list} - ${env_id} Get Environment ID env_2_modify - Should Be Equal ${env_id} None - Update Environment env_2_del env_2_modify - ${result} Get List Of Environments - ${list} Format List ${result['environments']} - Log List ${list} - ${env_id} Get Environment ID env_2_modify - Should Not Be Equal ${env_id} None - Delete Environment env_2_modify - ${result} Get List Of Environments - ${len2} Get Length ${result['environments']} - #Should Be Equal As Integers ${len} ${len2} - ${list} Format List ${result['environments']} - Log List ${list} - -Get Environment_ID of previosly created environment - [Tags] thread1 - ${result} Get Environment ID test-rest-api-env2 - Should Not Be Empty ${result} - -Create session to previosly created environment - [Tags] thread1 - ${result} Create session test-rest-api-env2 - Set Global Variable ${session_id} ${result['id']} - #${session_id} Set Variable ${result['id']} - Should Not Be Empty ${result['id']} - -Get session information_1 - [Tags] thread1 - Log ${session_id} - ${result} Get session information test-rest-api-env2 ${session_id} - -Delete session - [Tags] thread1 - ${result} Delete session test-rest-api-env2 ${session_id} - -Get session information_2 and almost empty report - [Tags] thread1 - ${result} Create session test-rest-api-env2 - Set Global Variable ${session_id} ${result['id']} - ${result} Get session information test-rest-api-env2 ${session_id} - ${result} Get session reports test-rest-api-env2 ${session_id} - -Create AD service - [Tags] thread1 - Create AD test-rest-api-env2 ad001 - -List AD services - [Tags] thread1 - ${result} Get List of AD test-rest-api-env2 - ${list} Format List ${result['activeDirectories']} - Log List ${list} - ${len} Get Length ${result['activeDirectories']} - Should Be Equal as Integers 1 ${len} - -Delete AD service - [Tags] thread1 - Delete AD test-rest-api-env2 ad001 - ${result} Get List of AD test-rest-api-env2 - ${len} Get Length ${result['activeDirectories']} - Should Be Equal as Integers ${len} 0 - -Create IIS service - [Tags] thread1 - Create IIS test-rest-api-env2 iis001 - -List IIS services - [Tags] thread1 - ${result} Get List of IIS test-rest-api-env2 - ${list} Format List ${result['webServers']} - Log List ${list} - ${len} Get Length ${result['webServers']} - Should Be Equal as Integers 1 ${len} - -Delete IIS service - [Tags] thread1 - Delete IIS test-rest-api-env2 iis001 - ${result} Get List of IIS test-rest-api-env2 - ${len} Get Length ${result['webServers']} - Should Be Equal as Integers ${len} 0 - -Create ASP NET service - [Tags] thread1 - Create ASP NET test-rest-api-env2 asp001 - -List ASP NET services - [Tags] thread1 - ${result} Get List of ASP NET test-rest-api-env2 - ${list} Format List ${result['aspNetApps']} - Log List ${list} - ${len} Get Length ${result['aspNetApps']} - Should Be Equal as Integers 1 ${len} - -Delete ASP NET service - [Tags] thread1 - Delete ASP NET test-rest-api-env2 asp001 - ${result} Get List of ASP NET test-rest-api-env2 - ${len} Get Length ${result['aspNetApps']} - Should Be Equal as Integers ${len} 0 - -Create ASP NET Farm service - [Tags] thread1 - Create ASP NET Farm test-rest-api-env2 aspFarm001 - -List ASP NET Farm services - [Tags] thread1 - ${result} Get List of ASP NET Farm test-rest-api-env2 - ${list} Format List ${result['aspNetAppFarms']} - Log List ${list} - ${len} Get Length ${result['aspNetAppFarms']} - Should Be Equal as Integers 1 ${len} - -Delete ASP NET Farm service - [Tags] thread1 - Delete ASP NET Farm test-rest-api-env2 aspFarm001 - ${result} Get List of ASP NET Farm test-rest-api-env2 - ${len} Get Length ${result['aspNetAppFarms']} - Should Be Equal as Integers ${len} 0 - -Create IIS Farm service - [Tags] thread1 - Create IIS Farm test-rest-api-env2 iisFarm001 - -List IIS Farm services - [Tags] thread1 - ${result} Get List of IIS Farm test-rest-api-env2 - ${list} Format List ${result['webServerFarms']} - Log List ${list} - ${len} Get Length ${result['webServerFarms']} - Should Be Equal as Integers 1 ${len} - -Delete IIS Farm service - [Tags] thread1 - Delete IIS Farm test-rest-api-env2 iisFarm001 - ${result} Get List of IIS Farm test-rest-api-env2 - ${len} Get Length ${result['webServerFarms']} - Should Be Equal as Integers ${len} 0 - -Create some services - [Tags] thread1 - Create AD test-rest-api-env2 ad001 - Create AD test-rest-api-env2 ad002 - Create AD test-rest-api-env2 ad005 - Create ASP NET test-rest-api-env2 asp005 - Create ASP NET test-rest-api-env2 asp005 - Create IIS Farm test-rest-api-env2 iisFarm002 - Create ASP NET test-rest-api-env2 asp006 - Create ASP NET Farm test-rest-api-env2 aspFarm005 - Create ASP NET Farm test-rest-api-env2 aspfarm005 - Create IIS test-rest-api-env2 iis003 - Create IIS Farm test-rest-api-env2 iisFarm003 - Create IIS test-rest-api-env2 iis001 - Create IIS test-rest-api-env2 iis_001 - Create IIS test-rest-api-env2 iis001 - Create IIS test-rest-api-env2 iis002 - Create AD test-rest-api-env2 ad001 - Create IIS Farm test-rest-api-env2 iisFarm002 - Create IIS Farm test-rest-api-env2 iisFarm004 - Create IIS Farm test-rest-api-env2 iisFarm005 - Create IIS Farm test-rest-api-env2 iisFarm006 - # View all services - ${list} Get List of All Services test-rest-api-env2 - Log List ${list} - # Check number of ADs - ${result} Get List of AD test-rest-api-env2 - ${list} Format List ${result['activeDirectories']} - Log List ${list} - ${len} Get Length ${result['activeDirectories']} - Should Be Equal as Integers 4 ${len} - # Check number of IISs - ${result} Get List of IIS test-rest-api-env2 - ${list} Format List ${result['webServers']} - Log List ${list} - ${len} Get Length ${result['webServers']} - Should Be Equal as Integers 5 ${len} - # Check number of ASP NETs - ${result} Get List of ASP NET test-rest-api-env2 - ${list} Format List ${result['aspNetApps']} - Log List ${list} - ${len} Get Length ${result['aspNetApps']} - Should Be Equal as Integers 3 ${len} - # Check number of IIS Farms - ${result} Get List of IIS Farm test-rest-api-env2 - ${list} Format List ${result['webServerFarms']} - Log List ${list} - ${len} Get Length ${result['webServerFarms']} - Should Be Equal as Integers 6 ${len} - # Check number of ASP NET Farms - ${result} Get List of ASP NET Farm test-rest-api-env2 - ${list} Format List ${result['aspNetAppFarms']} - Log List ${list} - ${len} Get Length ${result['aspNetAppFarms']} - Should Be Equal as Integers 2 ${len} - -Test of multisession - [Tags] thread1 - # Store session - ${session1_1} Set Variable ${session_id} - # Create additional sessions - ${result} Create session test-rest-api-env2 - ${session1_2} Set Variable ${result['id']} - ${result} Create session test-rest-api-env2 - ${session1_3} Set Variable ${result['id']} - # Stage 1: Begin of create some services =================== - Update Headers X-Configuration-Session ${session1_1} - Create AD test-rest-api-env2 ad001 - Create AD test-rest-api-env2 ad002 - Create ASP NET test-rest-api-env2 asp005 - Create ASP NET test-rest-api-env2 asp005 - Create IIS Farm test-rest-api-env2 iisFarm002 - Create ASP NET test-rest-api-env2 asp006 - Create ASP NET Farm test-rest-api-env2 aspFarm005 - Create ASP NET Farm test-rest-api-env2 aspfarm005 - Create IIS test-rest-api-env2 iis003 - # View all services - ${list} Get List of All Services test-rest-api-env2 - Log List ${list} - Update Headers X-Configuration-Session ${session1_2} - Create AD test-rest-api-env2 ad001 - Create ASP NET test-rest-api-env2 asp005 - Create ASP NET test-rest-api-env2 asp005 - Create IIS Farm test-rest-api-env2 iisFarm002 - Create ASP NET test-rest-api-env2 asp006 - # View all services - ${list} Get List of All Services test-rest-api-env2 - Log List ${list} - Update Headers X-Configuration-Session ${session1_3} - Create ASP NET test-rest-api-env2 asp005_3 - Create ASP NET test-rest-api-env2 asp005_3 - Create IIS Farm test-rest-api-env2 iisFarm002_3 - Create ASP NET test-rest-api-env2 asp006_3 - Create ASP NET Farm test-rest-api-env2 aspFarm005_3 - Create ASP NET Farm test-rest-api-env2 aspfarm005_3 - Create IIS test-rest-api-env2 iis003_3 - Create IIS Farm test-rest-api-env2 iisFarm003_3 - Create IIS test-rest-api-env2 iis001_3 - Create IIS test-rest-api-env2 iis_001_3 - Create IIS test-rest-api-env2 iis001_3 - Create IIS test-rest-api-env2 iis002_3 - Create IIS Farm test-rest-api-env2 iisFarm002_3 - Create IIS Farm test-rest-api-env2 iisFarm004_3 - # View all services - ${list} Get List of All Services test-rest-api-env2 - Log List ${list} - # Stage 2: End of create some services =================== - Update Headers X-Configuration-Session ${session1_1} - Create IIS Farm test-rest-api-env2 iisFarm003 - Create IIS test-rest-api-env2 iis001 - Create IIS test-rest-api-env2 iis002 - Create AD test-rest-api-env2 ad001 - Create IIS Farm test-rest-api-env2 iisFarm002 - Create IIS Farm test-rest-api-env2 iisFarm004 - Create IIS Farm test-rest-api-env2 iisFarm005 - Create IIS Farm test-rest-api-env2 iisFarm006 - # View all services - ${list} Get List of All Services test-rest-api-env2 - Log List ${list} - Update Headers X-Configuration-Session ${session1_2} - Create ASP NET Farm test-rest-api-env2 aspFarm005 - Create ASP NET Farm test-rest-api-env2 aspfarm005 - Create IIS test-rest-api-env2 iis003 - Create IIS Farm test-rest-api-env2 iisFarm003 - Create IIS test-rest-api-env2 iis001 - Create IIS test-rest-api-env2 iis_001 - Create IIS test-rest-api-env2 iis002 - Create AD test-rest-api-env2 ad001 - Create IIS Farm test-rest-api-env2 iisFarm002 - Create IIS Farm test-rest-api-env2 iisFarm005 - Create IIS Farm test-rest-api-env2 iisFarm006 - # View all services - ${list} Get List of All Services test-rest-api-env2 - Log List ${list} - Update Headers X-Configuration-Session ${session1_3} - Create AD test-rest-api-env2 ad001_3 - Create IIS Farm test-rest-api-env2 iisFarm005_3 - Create IIS Farm test-rest-api-env2 iisFarm006_3 - # === View services in all sessions === - Update Headers X-Configuration-Session ${session1_1} - # View all services - ${list} Get List of All Services test-rest-api-env2 - Log List ${list} - Update Headers X-Configuration-Session ${session1_2} - # View all services - ${list} Get List of All Services test-rest-api-env2 - Log List ${list} - Update Headers X-Configuration-Session ${session1_3} - # View all services - ${list} Get List of All Services test-rest-api-env2 - Log List ${list} - # Need control of number created services - # Stage 3: delete some services =================== - Delete IIS test-rest-api-env2 iis_001_3 - Delete IIS test-rest-api-env2 iis002_3 - Delete IIS Farm test-rest-api-env2 iisFarm006_3 - Delete ASP NET Farm test-rest-api-env2 aspfarm005_3 - Delete AD test-rest-api-env2 ad001_3 - # View all services - ${list} Get List of All Services test-rest-api-env2 - Log List ${list} - Update Headers X-Configuration-Session ${session1_2} - Delete IIS test-rest-api-env2 iis_001 - Delete IIS test-rest-api-env2 iis002 - Delete AD test-rest-api-env2 ad001 - Delete IIS Farm test-rest-api-env2 iisFarm006 - # View all services - ${list} Get List of All Services test-rest-api-env2 - Log List ${list} - Update Headers X-Configuration-Session ${session1_1} - Delete AD test-rest-api-env2 ad001 - Delete AD test-rest-api-env2 ad002 - #Delete ASP NET test-rest-api-env2 asp005 - #Delete ASP NET test-rest-api-env2 asp005 - #Delete IIS Farm test-rest-api-env2 iisFarm002 - Delete ASP NET test-rest-api-env2 asp006 - #Delete ASP NET Farm test-rest-api-env2 aspFarm005 - Delete ASP NET Farm test-rest-api-env2 aspfarm005 - Delete IIS test-rest-api-env2 iis003 - #Delete IIS Farm test-rest-api-env2 iisFarm003 - Delete IIS test-rest-api-env2 iis001 - Delete IIS test-rest-api-env2 iis002 - Delete AD test-rest-api-env2 ad001 - #Delete IIS Farm test-rest-api-env2 iisFarm002 - #Delete IIS Farm test-rest-api-env2 iisFarm004 - #Delete IIS Farm test-rest-api-env2 iisFarm005 - # Create IIS Farm test-rest-api-env2 iisFarm006 - must be only this - # View all services - ${list} Get List of All Services test-rest-api-env2 - Log List ${list} - # View all services - ${list} Get List of All Services test-rest-api-env2 - Log List ${list} - Update Headers X-Configuration-Session ${session1_1} - -Deploy one AD - Create environment 4kate-ad - ${result} Create session 4kate-ad - Set Global Variable ${session_id} ${result['id']} - Create AD 4kate-ad AD_2_deploy - Deploy session 4kate-ad ${session_id} - ${rep} Get session reports 4kate-ad ${session_id} - Wait Until Keyword Succeeds 20m 5s Check Environment 4kate-ad ready - Get Environment ID 4kate-ad - ${rep2} Get session reports 4kate-ad ${session_id} - ${rep3} Format session report ${rep2} - Log List ${rep3} - # Delete environment bigden-ad - -Deploy one IIS - Create environment bigden-iis - ${result} Create session bigden-iis - Set Global Variable ${session_id} ${result['id']} - Create IIS bigden-iis IIS_2_deploy - Deploy session bigden-iis ${session_id} - ${rep} Get session reports bigden-iis ${session_id} - Wait Until Keyword Succeeds 20m 5s Check Environment bigden-iis ready - Get Environment ID bigden-iis - ${rep2} Get session reports bigden-iis ${session_id} - ${rep3} Format session report ${rep2} - Log List ${rep3} - Delete environment bigden-iis - -Deploy one ASP.NET - Create environment bigden-asp - ${result} Create session bigden-asp - Set Global Variable ${session_id} ${result['id']} - Create ASP NET bigden-asp ASP_2_deploy - Deploy session bigden-asp ${session_id} - ${rep} Get session reports bigden-asp ${session_id} - Wait Until Keyword Succeeds 20m 5s Check Environment bigden-asp ready - Get Environment ID bigden-asp - ${rep2} Get session reports bigden-asp ${session_id} - ${rep3} Format session report ${rep2} - Log List ${rep3} - Delete environment bigden-asp - -Deploy one ASP.NET Farm - Create environment bigden-asp-farm - ${result} Create session bigden-asp-farm - Set Global Variable ${session_id} ${result['id']} - Create ASP NET Farm + ASP-Farm_2_deploy - Deploy session bigden-asp-farm ${session_id} - ${rep} Get session reports bigden-asp-farm ${session_id} - Wait Until Keyword Succeeds 20m 5s Check Environment bigden-asp-farm ready - Get Environment ID bigden-asp-farm - ${rep2} Get session reports bigden-asp-farm ${session_id} - ${rep3} Format session report ${rep2} - Log List ${rep3} - Delete environment bigden-asp-farm - -Deploy one IIS Farm - Create environment bigden-iis-farm - ${result} Create session bigden-iis-farm - Set Global Variable ${session_id} ${result['id']} - Create IIS Farm bigden-iis-farm IIS-Farm_2_deploy - Deploy session bigden-iis-farm ${session_id} - ${rep} Get session reports bigden-iis-farm ${session_id} - Wait Until Keyword Succeeds 20m 5s Check Environment bigden-iis-farm ready - Get Environment ID bigden-iis-farm - ${rep2} Get session reports bigden-iis-farm ${session_id} - ${rep3} Format session report ${rep2} - Log List ${rep3} - Delete environment bigden-iis-farm - -Sequence deploy - Create environment bigden-all_service - ${result} Create session bigden-all_service - Set Global Variable ${session_id} ${result['id']} - Create AD bigden-all_service AD_2_deploy - Create IIS bigden-all_service IIS_2_deploy - Create ASP NET bigden-all_service ASP.NET_2_deploy - Create ASP NET Farm bigden-all_service ASP.NET_Farm_2_deploy - Create IIS Farm bigden-all_service IIS_Farm_2_deploy - Deploy session bigden-all_service ${session_id} - ${rep} Get session reports bigden-all_service ${session_id} - Wait Until Keyword Succeeds 60m 10s Check Environment bigden-all_service ready - Get Environment ID bigden-all_service - ${rep2} Get session reports bigden-all_service ${session_id} - ${rep3} Format session report ${rep2} - Log List ${rep3} - Delete environment bigden-all_service - -Delete created environments - [Tags] thread1 - Delete Environment test-rest-api-env2 - -Delete session after deploy - Create environment bigden-ad - ${result} Create session bigden-ad - Set Global Variable ${session_id} ${result['id']} - Create IIS bigden-ad IIS_2_deploy - Deploy session bigden-ad ${session_id} - ${rep} Get session reports bigden-ad ${session_id} - Wait Until Keyword Succeeds 60m 20s Check Environment bigden-ad ready - Get Environment ID bigden-ad - ${rep2} Get session reports bigden-ad ${session_id} - ${rep3} Format session report ${rep2} - Log List ${rep3} - Try to delete session bigden-ad ${session_id} - Delete environment bigden-ad - Try to delete session bigden-ad ${session_id} - -*** Keywords *** -Compare reports - [Arguments] ${rep_2_compare} ${ASP_Farm_name} - ${rep2} Get session reports test-rest-api-env2 ${session_id} - Should Not Be Equal ${rep} ${rep2} diff --git a/boffin/samples/Murano_REST_API/libs/MuranoRest.txt b/boffin/samples/Murano_REST_API/libs/MuranoRest.txt deleted file mode 100644 index ff6da62..0000000 --- a/boffin/samples/Murano_REST_API/libs/MuranoRest.txt +++ /dev/null @@ -1,707 +0,0 @@ -*** Settings *** -Library Boffin.Rest -Library Collections - -*** Keywords *** -Get List Of Environments - [Documentation] Gets list of all environments. - ... - ... *Arguments:* - ... - None. - ... - ... *Return:* - ... - response body with environments. - ... - ... *Examples:* - ... | ${result} | Get List Of Environments | - ... | *LOG* | ${result['environments']} | - GET request http://${ip}:8082/environments - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${result} get response body - [Return] ${result} - -Create Environment - [Arguments] ${environment_name} - [Documentation] Sends POST request to create new environment. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Create Environment | env001 | - Set body {"name":"${environment_name}"} - POST request http://${ip}:8082/environments - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${result} get response body - [Return] ${result} - -Get Environment ID - [Arguments] ${environment_name} - [Documentation] Gets environment id. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - ... *Return:* - ... - environment id. - ... - ... *Examples:* - ... | ${id} | Get Environment ID | test | - ${environment_id} Set Variable None - ${data} Get List Of Environments - @{environments_list} Convert To List ${data['environments']} - : FOR ${x} IN @{environments_list} - \ ${environment_id} = Set Variable If "${x['name']}" == "${environment_name}" ${x['id']} ${environment_id} - [Return] ${environment_id} - -Update Environment - [Arguments] ${environment_name} ${new_environment_name} - [Documentation] Sends PUT request to update environment. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - new_environment_name: new environment name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Update Environment | env001 | env001_modify | - Set body {"name":"${new_environment_name}"} - ${env_id} Get Environment ID ${environment_name} - PUT request http://${ip}:8082/environments/${env_id} - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${result} get response body - [Return] ${result} - -Delete Environment - [Arguments] ${environment_name} - [Documentation] Sends DELETE request to delete one environment. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - ... *Return:* - ... - None. - ... - ... *Examples:* - ... | Delete Environment | test | - ${env_id} Get Environment ID ${environment_name} - DELETE request http://${ip}:8082/environments/${env_id} - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - -Delete All Environments - [Documentation] Sends DELETE request to delete all environments. - ... - ... *Arguments:* - ... - None. - ... - ... *Return:* - ... - None. - ... - ... *Examples:* - ... | Delete All Environment | - Get X-Auth-Token ${ip} - ${result} Get List Of Environments - @{list} Convert To List ${result['environments']} - : FOR ${environment} IN @{list} - \ Delete Environment ${environment['name']} - -Get X-Auth-Token - [Arguments] ${ip} ${user}="admin" ${password}="swordfish" - [Documentation] Gets X-Auth-Token for requests headers. - ... - ... *Arguments:* - ... - ip: ip. - ... - user: user name. - ... - password: user password. - ... - ... *Return:* - ... - None. - ... - ... *Examples:* - ... | Get X-Auth-Token | 10.10.10.1 | - Set Headers {"Content-Type":"application/json"} - ${auth} Set Variable {"auth": {"tenantName": ${user}, "passwordCredentials": {"username": ${user}, "password": ${password}}}} - Set Body ${auth} - POST Request http://${ip}:5000/v2.0/tokens - ${body} Get Response Body - Update Headers X-Auth-Token ${body['access']['token']['id']} - -Format List - [Arguments] ${list_2_format} - [Documentation] Formats list in pretty view with name and id. - ... - ... *Arguments:* - ... - list_2_format: list that will be formatted. - ... - ... *Return:* - ... - None. - ... - ... *Examples:* - ... | Format List | ${id['environments']} | - ${nice_list} = Create List - @{list} Convert To List ${list_2_format} - : FOR ${x} IN @{list} - \ Append To List ${nice_list} ${x['name']}, id: ${x['id']} - Log List ${nice_list} - [Return] ${nice_list} - -Get List of All Services - [Arguments] ${environment_name} - [Documentation] Sends GET requests to list all services - ... in environment_name. Header must be filled correctly. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - ... *Return:* - ... - formatted list of services. - ... - ... *Examples:* - ... | Get List of All Services | env001 | - ${env_id} Get Environment ID ${environment_name} - GET request http://${ip}:8082/environments/${env_id}/activeDirectories - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response body - ${nice_list} = Create List - @{list} Convert To List ${resp['activeDirectories']} - : FOR ${x} IN @{list} - \ Append To List ${nice_list} AD: ${x['name']}, id: ${x['id']} - GET request http://${ip}:8082/environments/${env_id}/webServers - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response body - @{list} Convert To List ${resp['webServers']} - : FOR ${x} IN @{list} - \ Append To List ${nice_list} IIS: ${x['name']}, id: ${x['id']} - GET request http://${ip}:8082/environments/${env_id}/aspNetApps - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response body - @{list} Convert To List ${resp['aspNetApps']} - : FOR ${x} IN @{list} - \ Append To List ${nice_list} ASP NET: ${x['name']}, id: ${x['id']} - GET request http://${ip}:8082/environments/${env_id}/aspNetAppFarms - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response body - @{list} Convert To List ${resp['aspNetAppFarms']} - : FOR ${x} IN @{list} - \ Append To List ${nice_list} ASP NET Farm: ${x['name']}, id: ${x['id']} - GET request http://${ip}:8082/environments/${env_id}/webServerFarms - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response body - @{list} Convert To List ${resp['webServerFarms']} - : FOR ${x} IN @{list} - \ Append To List ${nice_list} IIS Farm: ${x['name']}, id: ${x['id']} - [Return] ${nice_list} - -Check Environment - [Arguments] ${environment_name} ${status} - [Documentation] Checks environment for given status. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - status: environment status. - ... - ... *Return:* - ... - None. - ... - ... *Examples:* - ... | Check Environment | test01 | ready | - ${r2} Get session reports ${environment_name} ${session_id} - ${r3} Format session report ${r2} - Log List ${r3} - ${env_id} Get Environment ID ${environment_name} - ${environment_status} Set Variable None - ${data} Get List Of Environments - @{environments_list} Convert To List ${data['environments']} - : FOR ${x} IN @{environments_list} - \ ${environment_status} = Set Variable If "${x['name']}" == "${environment_name}" ${x['status']} ${environment_status} - Log ${environment_status} - Should Be Equal ${status} ${environment_status} - -Create Session - [Arguments] ${environment_name} - [Documentation] Sends POST request to create new session - ... in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - status: environment status. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | ${result} | Create Session | env001 | - ${env_id} Get Environment ID ${environment_name} - POST request without body http://${ip}:8082/environments/${env_id}/configure - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response body - ${session_id} Set Variable ${resp['id']} - Log ${session_id} - Update Headers X-Configuration-Session ${session_id} - [Return] ${resp} - -Delete session - [Arguments] ${environment_name} ${session_id} - [Documentation] Sends DELETE request to delete session - ... with session_id in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - session_id: session id. - ... - ... *Return:* - ... - None. - ... - ... *Examples:* - ... | Delete Session | ${result['id']} | - ${env_id} Get Environment ID ${environment_name} - DELETE request http://${ip}:8082/environments/${env_id}/sessions/${session_id} - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - -Get session information - [Arguments] ${environment_name} ${session_id} - [Documentation] Sends GET request to get session information - ... with session_id in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - session_id: session id. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Get Session Information | ${result['id']} | - ${env_id} Get Environment ID ${environment_name} - GET request http://${ip}:8082/environments/${env_id}/sessions/${session_id} - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response body - [Return] ${resp} - -Get session reports - [Arguments] ${environment_name} ${session_id} - [Documentation] Sends GET request to get session reports - ... with session_id in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - session_id: session id. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Get Session Reports | ${result['id']} | - ${env_id} Get Environment ID ${environment_name} - GET request http://${ip}:8082/environments/${env_id}/sessions/${session_id}/reports - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response body - [Return] ${resp} - -Format session report - [Arguments] ${session_report} - [Documentation] Formats report to user-friendly view. - ... - ... *Arguments:* - ... - session_report: session report. - ... - ... *Return:* - ... - formatted session report. - ... - ... *Examples:* - ... | ${rep} | Format session report | ${report} | - ${nice_list} = Create List - @{list} Convert To List ${session_report['reports']} - : FOR ${x} IN @{list} - \ Append To List ${nice_list} time: ${x['created']}, text: ${x['text']} - Log List ${nice_list} - [Return] ${nice_list} - -Deploy session - [Arguments] ${environment_name} ${session_id} - [Documentation] Sends POST request to deploy session - ... with session_id in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - session_id: session id. - ... - ... *Return:* - ... - None. - ... - ... *Examples:* - ... | Deploy Session | ${result['id']} | - ${env_id} Get Environment ID ${environment_name} - POST request without body http://${ip}:8082/environments/${env_id}/sessions/${session_id}/deploy - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - -Try to delete session - [Arguments] ${environment_name} ${session_id} - [Documentation] Sends DELETE request to delete session - ... with session_id in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - session_id: session id. - ... - ... *Return:* - ... - None. - ... - ... *Examples:* - ... | Delete Session | ${result['id']} | - ${env_id} Get Environment ID ${environment_name} - DELETE request http://${ip}:8082/environments/${env_id}/sessions/${session_id} - -Create AD - [Arguments] ${environment_name} ${AD_name} - [Documentation] Sends POST request to create new AD - ... in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - AD_name: AD name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Create AD | env001 | ad001 | - ${env_id} Get Environment ID ${environment_name} - ${auth} Set Variable {"name": "${AD_name}", "adminPassword": "swordfish", "domain": "acme.dc", "units": [{"isMaster": true, "recoveryPassword": "swordfish", "location": "west-dc"}, {"isMaster": false, "recoveryPassword": "swordfish", "location": "west-dc"}]} - Set Body ${auth} - POST request http://${ip}:8082/environments/${env_id}/activeDirectories - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response body - [Return] ${resp} - -Get List of AD - [Arguments] ${environment_name} - [Documentation] Sends GET request to list all AD's - ... in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Get List of AD | env001 | - ${env_id} Get Environment ID ${environment_name} - GET request http://${ip}:8082/environments/${env_id}/activeDirectories - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response body - [Return] ${resp} - -Delete AD - [Arguments] ${environment_name} ${AD_name} - [Documentation] Sends DELETE request to delete AD - ... in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - AD_name: AD name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Delete AD | env001 | ad001 | - ${env_id} Get Environment ID ${environment_name} - ${ad_id} Set Variable None - ${data} Get List of AD ${environment_name} - @{ad_list} Convert To List ${data['activeDirectories']} - : FOR ${x} IN @{ad_list} - \ ${ad_id} = Set Variable If "${x['name']}" == "${AD_name}" ${x['id']} ${ad_id} - DELETE request http://${ip}:8082/environments/${env_id}/activeDirectories/${ad_id} - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - -Create IIS - [Arguments] ${environment_name} ${IIS_name} - [Documentation] Sends POST request to create new AD - ... in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - IIS_name: IIS name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Create IIS | env001 | iis001 | - ${env_id} Get Environment ID ${environment_name} - ${auth} Set Variable {"name": "${IIS_name}", "adminPassword": "swordfish", "domain": "acme.dc", "units": [{}]} - Set Body ${auth} - POST request http://${ip}:8082/environments/${env_id}/webServers - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response body - [Return] ${resp} - -Get List of IIS - [Arguments] ${environment_name} - [Documentation] Sends GET request to list all IIS's - ... in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Get List of IIS | env001 | - ${env_id} Get Environment ID ${environment_name} - GET request http://${ip}:8082/environments/${env_id}/webServers - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response body - [Return] ${resp} - -Delete IIS - [Arguments] ${environment_name} ${IIS_name} - [Documentation] Sends DELETE request to delete IIS - ... in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - IIS_name: IIS name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Delete IIS | env001 | iis001 | - ${env_id} Get Environment ID ${environment_name} - ${iis_id} Set Variable None - ${data} Get List of IIS ${environment_name} - @{iis_list} Convert To List ${data['webServers']} - : FOR ${x} IN @{iis_list} - \ ${iis_id} = Set Variable If "${x['name']}" == "${IIS_name}" ${x['id']} ${iis_id} - DELETE request http://${ip}:8082/environments/${env_id}/webServers/${iis_id} - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - -Create ASP NET - [Arguments] ${environment_name} ${ASP_name} - [Documentation] Sends POST request to create new AD - ... in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - ASP_name: ASP name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Create ASP NET | asp001 | - ${env_id} Get Environment ID ${environment_name} - ${auth} Set Variable {"name": "${ASP_name}", "credentials": {"username": "Administrator","password": "swordfish"}, "domain": "acme.dc", "adminPassword": "swordfish", "units":[{}], "repository": "git://github.com/Mirantis/murano-mvc-demo.git"} - Set Body ${auth} - POST request http://${ip}:8082/environments/${env_id}/aspNetApps - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response Body - [Return] ${resp} - -Get List of ASP NET - [Arguments] ${environment_name} - [Documentation] Sends GET request to list all IIS's - ... in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | List ASP NET | - ${env_id} Get Environment ID ${environment_name} - GET request http://${ip}:8082/environments/${env_id}/aspNetApps - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response Body - [Return] ${resp} - -Delete ASP NET - [Arguments] ${environment_name} ${ASP_name} - [Documentation] Sends DELETE request to delete IIS - ... in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - ASP_name: ASP name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Delete ASP NET | asp001 | - ${env_id} Get Environment ID ${environment_name} - ${asp_id} Set Variable None - ${data} Get List of ASP NET ${environment_name} - @{asp_list} Convert To List ${data['aspNetApps']} - : FOR ${x} IN @{asp_list} - \ ${asp_id} = Set Variable If "${x['name']}" == "${ASP_name}" ${x['id']} ${asp_id} - DELETE request http://${ip}:8082/environments/${env_id}/aspNetApps/${asp_id} - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - -Create IIS Farm - [Arguments] ${environment_name} ${IIS_Farm_name} - [Documentation] Sends POST request to create new AD - ... in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - IIS_Farm_name: IIS farm name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Create IIS Farm | env001 | iisFarm001 | - ${env_id} Get Environment ID ${environment_name} - ${auth} Set Variable {"name": "${IIS_Farm_name}", "adminPassword": "swordfish", "domain": "acme.dc", "units": [{}], "loadBalancerPort": "80"} - Set Body ${auth} - POST request http://${ip}:8082/environments/${env_id}/webServerFarms - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response body - [Return] ${resp} - -Get List of IIS Farm - [Arguments] ${environment_name} - [Documentation] Sends GET request to list all IIS's - ... in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Get List of IIS Farm | env001 | - ${env_id} Get Environment ID ${environment_name} - GET request http://${ip}:8082/environments/${env_id}/webServerFarms - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response body - [Return] ${resp} - -Delete IIS Farm - [Arguments] ${environment_name} ${IIS_Farm_name} - [Documentation] Sends DELETE request to delete IIS - ... in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - IIS_Farm_name: IIS farm name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Delete IIS Farm | env001 | iis001 | - ${env_id} Get Environment ID ${environment_name} - ${iis_Farm_id} Set Variable None - ${data} Get List of IIS Farm ${environment_name} - @{iis_Farm_list} Convert To List ${data['webServerFarms']} - : FOR ${x} IN @{iis_Farm_list} - \ ${iis_Farm_id} = Set Variable If "${x['name']}" == "${IIS_Farm_name}" ${x['id']} ${iis_Farm_id} - DELETE request http://${ip}:8082/environments/${env_id}/webServerFarms/${iis_Farm_id} - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - -Create ASP NET Farm - [Arguments] ${environment_name} ${ASP_Farm_name} - [Documentation] Sends POST request to create new AD - ... in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - ASP_Farm_name: ASP farm name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Create ASP NET Farm | asp001 | - ${env_id} Get Environment ID ${environment_name} - ${auth} Set Variable {"name": "${ASP_Farm_name}", "credentials": {"username": "Administrator","password": "swordfish"}, "domain": "acme.dc", "adminPassword": "swordfish", "units":[{}], "repository": "git://github.com/Mirantis/murano-mvc-demo.git", "loadBalancerPort": "80"} - Set Body ${auth} - POST request http://${ip}:8082/environments/${env_id}/aspNetAppFarms - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response Body - [Return] ${resp} - -Get List of ASP NET Farm - [Arguments] ${environment_name} - [Documentation] Sends GET request to list all IIS's - ... in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | List ASP NET Farm | - ${env_id} Get Environment ID ${environment_name} - GET request http://${ip}:8082/environments/${env_id}/aspNetAppFarms - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} - ${resp} Get Response Body - [Return] ${resp} - -Delete ASP NET Farm - [Arguments] ${environment_name} ${ASP_Farm_name} - [Documentation] Sends DELETE request to delete IIS - ... in environment_name. - ... - ... *Arguments:* - ... - environment_name: environment name. - ... - ASP_Farm_name: ASP farm name. - ... - ... *Return:* - ... - response body. - ... - ... *Examples:* - ... | Delete ASP NET Farm | asp001 | - ${env_id} Get Environment ID ${environment_name} - ${asp_Farm_id} Set Variable None - ${data} Get List of ASP NET Farm ${environment_name} - @{asp_Farm_list} Convert To List ${data['aspNetAppFarms']} - : FOR ${x} IN @{asp_Farm_list} - \ ${asp_Farm_id} = Set Variable If "${x['name']}" == "${ASP_Farm_name}" ${x['id']} ${asp_Farm_id} - DELETE request http://${ip}:8082/environments/${env_id}/aspNetAppFarms/${asp_Farm_id} - ${resp_code} Get Response Code - Should Be Equal As Integers 200 ${resp_code} diff --git a/boffin/setup.py b/boffin/setup.py deleted file mode 100644 index 3071d15..0000000 --- a/boffin/setup.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -from os.path import join, dirname -from setuptools import setup - -execfile(join(dirname(__file__), 'src', 'Boffin', 'version.py')) - -setup( - name='robotframework-boffin', - version=VERSION, - author='Mirantis, Inc.', - license='Apache License 2.0', - description='Extension for Robot Framework', - long_description=open('README.rst').read(), - package_dir={'': 'src'}, - packages=['Boffin', 'Boffin.keywords'], - install_requires=['robotframework>=2.8.1', - 'selenium>=2.33.0', - 'robotframework-selenium2library>=1.2.0', - 'robotframework-pydblibrary>=1.1', - 'beautifulsoup4>=4.2.1', - 'requests>=1.2.0'], - platforms='any', - zip_safe=False -) diff --git a/boffin/src/Boffin/_Settings.py b/boffin/src/Boffin/_Settings.py deleted file mode 100644 index 3b9709b..0000000 --- a/boffin/src/Boffin/_Settings.py +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -from ConfigParser import ConfigParser -from os import getcwd -from os.path import join - -from robot.libraries.BuiltIn import BuiltIn - - -_settingsFileName = 'settings.ini' - - -class _SettingsReader(object): - """ 'settings.ini' driver. """ - - @staticmethod - def read(): - """ - Loads default variables from the 'resources/settings.ini' file. - - Arguments: - - None. - - Return: - - None. - """ - try: - p = BuiltIn().get_variable_value('${resources_path}') - if p is not None: - _settingsFullFileName = join(p, _settingsFileName) - else: - _settingsFullFileName = join(getcwd(), 'resources', - _settingsFileName) - - conf = ConfigParser() - conf.read(_settingsFullFileName) - - for setting in conf.options('default'): - BuiltIn().set_global_variable('${%s}' % setting, - conf.get('default', setting)) - except: - pass diff --git a/boffin/src/Boffin/__init__.py b/boffin/src/Boffin/__init__.py deleted file mode 100644 index 292f903..0000000 --- a/boffin/src/Boffin/__init__.py +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -from os.path import join, dirname - -from Selenium2Library import Selenium2Library - -from _Settings import _SettingsReader -from keywords import * - -execfile(join(dirname(__file__), 'version.py')) - -__version__ = VERSION - -_SettingsReader.read() - - -class WebUIlib(Selenium2Library, _WebUIlib): - """ - This class supports WebUi related testing using the Robot Framework. - """ - - ROBOT_LIBRARY_SCOPE = 'GLOBAL' - ROBOT_LIBRARY_VERSION = VERSION - - -class Rest(_Rest): - """ - This class supports Rest related testing using the Robot Framework. - """ - - ROBOT_LIBRARY_SCOPE = 'GLOBAL' - ROBOT_LIBRARY_VERSION = VERSION - - -class DB(Pydblibrary): - """ - This library supports database-related testing using the Robot Framework. - """ - - ROBOT_LIBRARY_SCOPE = 'GLOBAL' - ROBOT_LIBRARY_VERSION = VERSION diff --git a/boffin/src/Boffin/keywords/_Rest.py b/boffin/src/Boffin/keywords/_Rest.py deleted file mode 100644 index 15b9629..0000000 --- a/boffin/src/Boffin/keywords/_Rest.py +++ /dev/null @@ -1,238 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import json -import requests -from robot.api import logger - - -class _Rest(object): - - ROBOT_LIBRARY_SCOPE = 'GLOBAL' - - headers = None - body = None - url = None - - def clear_headers(self): - """ - Clears headers for REST API requests. - - *Arguments:* - - None. - - *Return:* - - None. - - *Examples*: - | Clear Headers | - """ - self.headers = [] - - def set_headers(self, headers_dict): - """ - Configures headers for REST API requests. - - *Arguments:* - - headers_dict: string with json dict. - - *Return:* - - None. - - *Examples*: - | Set Headers | {'Content-Type': 'application/json' | - """ - try: - self.headers = json.loads(headers_dict) - except: - raise AssertionError('Incorrect headers: %s' % headers_dict) - - def update_headers(self, name, value): - """ - Modifies headers for REST API requests. - - *Arguments:* - - name: header name. - - value: header value. - - *Return:* - - None. - - *Examples*: - | Update Headers | X-Auth-Token | 8808880808080808 | - """ - self.headers[name] = value - - def set_body(self, body_dict): - """ - This function allows to configure body for REST API requests. - - *Arguments:* - - body_dict: string with json dict. - - *Return:* - - None. - - *Examples*: - | Set Headers | {'Content-Type': 'application/json' | - """ - self.body = body_dict - - def get_headers(self): - """ - Gets headers for REST API requests. - - *Arguments:* - - None. - - *Return:* - - Headers dict. - - *Examples*: - | ${headers} | Get Headers | - """ - return self.headers - - def GET_request(self, url): - """ - Sends GET request. - - *Arguments:* - - url: destination url. - - *Return:* - - None. - - Examples: - | GET request | http://10.10.10.1:8082/environments | - """ - self.response = requests.request('GET', url=url, headers=self.headers) - - def POST_request(self, url): - """ - Sends POST request. - - *Arguments:* - - url: destination url. - - *Return:* - - None. - - *Examples*: - | POST request | http://10.10.10.1:8082/environments | - """ - debug_data = 'POST Request to URL: %s \n' \ - 'with Headers: %s \n' \ - 'and Body: %s' % (url, self.headers, self.body) - logger.debug(debug_data) - - self.response = requests.request('POST', url, - headers=self.headers, - data=self.body) - - logger.debug('Response: %s' % self.response.text) - - def POST_request_without_body(self, url): - """ - Sends POST request without body. - - *Arguments:* - - url: destination url. - - *Return:* - - None. - - *Examples*: - | POST request | http://10.10.10.1:8082/environments | - """ - debug_data = 'POST Request to URL: %s \n' \ - 'with Headers: %s \n' % (url, self.headers) - logger.debug(debug_data) - - self.response = requests.request('POST', url, - headers=self.headers) - logger.debug('Response: %s' % self.response.text) - - def DELETE_request(self, url): - """ - Sends DELETE request. - - *Arguments:* - - url: destination url. - - *Return:* - - None. - - *Examples*: - | DELETE request | http://10.10.10.1:8082/environments | - """ - self.response = requests.request('DELETE', url=url, - headers=self.headers) - - def PUT_request(self, url): - """ - Sends PUT request. - - *Arguments:* - - url: destination url. - - *Return:* - - None. - - *Examples*: - | PUT request | http://10.10.10.1:8082/env | - """ - debug_data = 'POST Request to URL: %s \n' \ - 'with Headers: %s \n' \ - 'and Body: %s' % (url, self.headers, self.body) - logger.debug(debug_data) - - self.response = requests.request('PUT', url, - headers=self.headers, - data=self.body) - logger.debug('Response: %s' % self.response.text) - - def get_response_code(self): - """ - Gets response code. - - *Arguments:* - - None. - - *Return:* - - response code. - - *Examples*: - | ${code} | Get Response Code | - """ - return self.response.status_code - - def get_response_body(self): - """ - Gets response body. - - *Arguments:* - - None. - - *Return:* - - response body. - - *Examples*: - | ${body} | Get Response Body | - """ - logger.debug('Response: %s' % self.response.text) - if self.response.text is None: - self.response.text = {} - - return json.loads(self.response.text) diff --git a/boffin/src/Boffin/keywords/_Utils.py b/boffin/src/Boffin/keywords/_Utils.py deleted file mode 100644 index 6994941..0000000 --- a/boffin/src/Boffin/keywords/_Utils.py +++ /dev/null @@ -1,329 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -from ConfigParser import ConfigParser -from os import getcwd -from os.path import join -from bs4 import BeautifulSoup -from robot.libraries.BuiltIn import BuiltIn - - -class _ArtificialIntelligence: - """ - This class allows to find input and select controls \ - without manual input of identificators. - We can find input fields by labels near those fields. \ - Boffin heart. - """ - - ROBOT_LIBRARY_SCOPE = 'GLOBAL' - - def __init__(self, page_source): - """ - Class constructor. - - *Arguments:* - - page_source: web page source code. - - *Return:* - - None. - """ - self.page_source = page_source - - def _get_xpath_of_element(self, element): - """ - This function allows to get xpath of soup elements. - - *Arguments:* - - element: selector name. - - *Return:* - - element xpath. - """ - - number = 1 - try: - number += len(element.find_previous_siblings(element.name)) - except: - pass - - xpath = element.name - if number > 1: - xpath += '[' + str(number) + ']' - - for parent in element.findParents(): - if parent.name != '[document]': - k = 0 - for tag in parent.find_previous_siblings(): - if tag.name == parent.name: - k += 1 - if k == 0: - xpath = parent.name + '/' + xpath - else: - xpath = parent.name + '[' + str(k + 1) + ']/' + xpath - - return xpath - - def extra_search(self, soup, value, tag=None): - """ - This function allows to get element by its parameters. - - *Arguments:* - - soup: soup structure. - - value: element name. - - *Return:* - - label_element. - """ - - label_element = None - - if label_element is None: - label_element = soup.find(tag, text=str(value)) - if label_element is None: - label_element = soup.find(tag, attrs={'value': value}) - if label_element is None: - label_element = soup.find(tag, attrs={'title': value}) - - if label_element is None: - try: - for element in soup.find_all(tag): - if str(value) in element.text: - label_element = element - except: - pass - - return label_element - - def find_element(self, label, element_type='input', method='next', - result='xpath'): - """ - Looks for specified element on the page. - - *Arguments:* - - label: selector name. - - element_type: element tag name. It could be any tag or \ - several tags (then they are listed as 'select/input/a'). - - method: element search method. If 'next' is set, then \ - function is looking for the next input field after the \ - specified element. - Otherwise it returns the specified element itself. - - *Return:* - - element xpath. - - *Examples:* - | ${xpath} | Find element | E-mail | input | next | - | ${xpath} | Find element | Cancel | a/div | this | - """ - html = str(self.page_source.encode("utf-8", "replace")) - - " load html to soup structure for parsing " - soup = BeautifulSoup(html) - - " search element after the label" - try: - element_types = element_type.split('/') - element = None - - label_element = self.extra_search(soup, label) - for element_type in element_types: - if method == 'next': - element = label_element.parent.find_next(element_type) - - elif method == 'previous': - element = label_element.parent.find_previous(element_type) - - elif method == 'associated': - for t in ['a', 'button', 'input', 'select', 'span']: - elements = label_element.parent.find_all_next(t) - for e in reversed(elements): - if element_type in e.text: - element = e - if element: - break - elements = label_element.parent.find_all_previous(t) - for e in elements: - if element_type in e.text: - element = e - if element: - break - else: - element = self.extra_search(soup, label, element_type) - - if element: - break - - " return xpath of element " - if result == 'xpath': - return self._get_xpath_of_element(element) - else: - return element - except: - return None - - -class _Utils(object): - ROBOT_LIBRARY_SCOPE = 'GLOBAL' - - def get_element_from_repo(self, element_name): - """ - Returns element type, identificator and frame from \ - the 'resources/objrepo/%screen_name%.ini' file by element name. - - *Arguments:* - - elementName: screen name and selector name divided by dot. - - *Return:* - - [elType, elIdentificator, elFrame]. - - *Example:* - | @{element} | Get Element From Repo | Home . Banner Page 2 Button | - """ - try: - p = BuiltIn().get_variable_value('${resources_path}') - if p is not None: - _objRepoPath = join(p, 'objrepo') - else: - _objRepoPath = join(getcwd(), 'resources', 'objrepo') - - element_name = element_name.lower().replace(' ', '') - print "Element Name: " + element_name - inputElement = element_name.split('.') - - if len(inputElement) == 1: - fileName = 'common.ini' - name = element_name - - else: - fileName = '%s.ini' % inputElement[0] - name = inputElement[1] - - fullFileName = join(_objRepoPath, fileName) - print "fullFileName " + fullFileName - conf = ConfigParser() - conf.read(fullFileName) - - print "A: " + conf.get(str(name), 'type') - print "A: " + conf.get(name, 'type') - - if not conf.has_section(name): - print name - return ['', None, ''] - element_type = conf.get(name, 'type') - - element_identificator = '' - element_parent_name = conf.get(name, 'parent') - if element_parent_name: - element_identificator = \ - self.get_element_from_repo(element_parent_name)[1] + \ - element_identificator - - element_identificator += conf.get(name, 'identificator') - - element_frame = conf.get(name, 'frame') - return [element_type, element_identificator, element_frame] - except: - return ['', None, ''] - - def get_web_element_frame(self, elementName): - """ - Returns element frame by its name in the - 'resources/objrepo/%screen_name%.ini' file. - - *Arguments:* - - elementName: screen name and selector name divided by dot. - - *Return:* - - elFrame. - - *Example:* - | ${elFrame} | GetElementFrame | Blog . Post Text field | - """ - type, id, frame = self.get_element_from_repo(elementName) - return frame - - def get_web_element_selector(self, name, page_source=None, - element_type='input', method='next', - result='xpath'): - """ - Returns element selector by its name in the \ - 'resources/ObjRepo.ini' file. - - *Arguments:* - - name: selector name. - - page_source: web page source code. - - element_type: element tag name. It could be any tag or several \ - tags (then they are listed as 'select/input/a'). - - method: element search method. If 'next' is set, then function - is looking for the next input field after the specified element. - Otherwise it returns the specified element itself. - - *Return:* - - elIdentificator. - - *Examples:* - | ${selector} | Get element selector | User Name | ${source_code} \ - | input | next | - | ${selector} | Get element selector | Submit Button | ${source_code} \ - | a | this | - """ - type, id, frame = self.get_element_from_repo(name) - - if not id and page_source: - boffin = _ArtificialIntelligence(page_source) - id = boffin.find_element(name, element_type, method, result) - if result != 'xpath': - return id - if id: - type = 'xpath' - - identificator = None - if id: - identificator = '%s%s' % \ - ('' if not type else '%s=' % str(type), str(id)) - - return identificator - - def get_table_row_xpath(self, page_source, name): - """ - This method allows to parse tables on web pages \ - and determine the table row by element from table. - - *Arguments:* - - page_source: web page source code. - - name: identificator of row element. - - *Return:* - - xpath of table row. - - *Example:* - | ${elXpath} | Get Table Row Xpath | Entity 123 | - """ - _type = 'td/a/label/input/select' - element = self.get_web_element_selector(name, page_source, - _type, method='this', - result='element') - tag = element.name - while tag != 'tr' and tag: - try: - tag = element.parent.name - element = element.parent - except: - tag = None - pass - - e = _ArtificialIntelligence(page_source) - return e._get_xpath_of_element(element) - diff --git a/boffin/src/Boffin/keywords/_WebUIlib.py b/boffin/src/Boffin/keywords/_WebUIlib.py deleted file mode 100644 index 53b46c8..0000000 --- a/boffin/src/Boffin/keywords/_WebUIlib.py +++ /dev/null @@ -1,668 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc -# -# Licensed under the Apache License, Version 2 0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www apache org/licenses/LICENSE-2 0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License - -from time import sleep - -from robot.libraries.BuiltIn import BuiltIn - -from _Utils import _Utils - - -# Decorator for framed elements. -def _framed(framed_element_name): - def real_framed(function): - def wrapper(self, *args): - co_varnames = function.func_code.co_varnames - upper_varnames = [varnames.upper() for varnames in co_varnames] - index = upper_varnames.index(framed_element_name.upper()) - - element_frame = \ - self.get_web_element_frame(args[index - 1]) - if element_frame: - self.set_current_frame(element_frame) - - res = function(self, *args) - - if element_frame: - self.unselect_frame() - - return res - - return wrapper - - return real_framed - - -class _WebUIlib(_Utils): - - def navigate_to(self, path, dont_wait=None): - """ - Navigates to the page by given links sequence. - - *Arguments:* - - path: sequence of links separated by '>'. - - dont_wait: optional parameter. Should be set to skip waiting \ - for page loaded. - - *Return:* - - None. - - *Examples:* - | Navigate to | Careers>Account Executive | - """ - links = path.split('>') - - for link in links: - self.click_link(link) - self.wait_for_page_loaded(dont_wait) - - @_framed('over_element_name') - def click_on_submenu(self, over_element_name, name, dont_wait=None): - """ - Puts mouse over menu element and then clicks on submenu element by \ - given selector names and waits for page loaded if needed. - - *Arguments:* - - over_element_name: menu selector title taken from object \ - repository. - - name: submenu selector title taken from object repository. - - dont_wait: optional parameter. Should be set to skip waiting \ - for page loaded. - - *Return:* - - None. - - *Examples:* - | Click on submenu | Settings | Profile | - """ - self.put_mouse_over(over_element_name) - sleep(1) - self.click_on(name) - self.wait_for_page_loaded(dont_wait) - - def click_on_link(self, link, dont_wait=None): - """ - Clicks the link by given localor and waits for page loaded if needed. - - *Arguments:* - - link: this attribute can contain one of following: id, name, \ - href or link text. - - dont_wait: optional parameter. Should be set to skip waiting \ - for page loaded. - - *Return:* - - None. - - *Examples:* - | Click on link | Move to Trash | - | Click on link | Delete | don't wait | - """ - self.wait_for_element_found(link, 'a', 'this') - self.click_link(link) - self.wait_for_page_loaded(dont_wait) - - def wait_for_page_loaded(self, dont_wait=None, page_load_timeout=60): - """ - Waits for 'complete' page state during predefined page load timeout. - - Does not wait for page loading if wait argument is set to any value \ - except the ${empty}. - - *Arguments:* - - dont_wait: optional parameter. Should be set to skip waiting \ - for page loaded. - - page_load_timeout: optional parameter. Timeout for page loading. - - *Return:* - - None. - - *Examples:* - | Wait for page loaded | - | Wait for page loaded | don't wait | - """ - ajax_wait_timeout = \ - BuiltIn().get_variable_value('${ajax_wait_timeout}') - - if ajax_wait_timeout: - self.wait_for_condition('return window.jQuery.active == 0', - ajax_wait_timeout, - 'Ajax request was not loaded in ' - '%s second(s)' % ajax_wait_timeout) - - if not dont_wait: - self.wait_for_condition('return document.readyState == "complete"', - page_load_timeout, - 'Page was not loaded in ' - '%s second(s)' % page_load_timeout) - - def title_should_contain(self, text): - """ - Verifies that current page title contains given text. - - *Arguments:* - - text: text which should be in the title set in test case. - - *Return:* - - None. - - *Examples:* - | Title should contain | Account Executive | - """ - title = self.get_title() - BuiltIn().should_contain(title, text) - - @_framed('name') - def click_on(self, name, dont_wait=None): - """ - Clicks the element by given selector name and waits for page loaded \ - if needed. - - *Arguments:* - - name: selector title taken from object repository. - - dont_wait: optional parameter. Should be set to skip waiting \ - for page loaded. - - *Return:* - - None. - - *Examples:* - | Click on | Dashboard . Users button | - """ - selector = self.wait_for_element_found(name, 'button/input/a', 'this') - self.click_element(selector) - self.wait_for_page_loaded(dont_wait) - - def set_current_frame(self, name): - """ - Sets frame identified by given selector name as current frame. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Set current frame | Post Editor Frame | - """ - selector = self.get_web_element_selector(name) - self.select_frame(selector) - - def element_text_should_contain(self, name, text): - """ - Verifies that element with given selector type contains the given text. - - *Arguments:* - - name: selector title taken from object repository. - - text: text to be found set in test. - - *Return:* - - None. - - *Examples:* - | Element Text Should Contain | Dashboard . Message text | \ - Post Updated | - """ - selector = self.get_web_element_selector(name) - self.element_should_contain(selector, text) - - def element_text_should_be_equal_to(self, name, text): - """ - Verifies that element with given selector type equals to the \ - given text. - - *Arguments:* - - name: selector title taken from object repository. - - text: text to be found set in test. - - *Return:* - - None. - - *Examples:* - | Element Text Should Be Equal To | Dashboard . Message text | \ - User deleted | - """ - selector = self.get_web_element_selector(name) - self.element_text_should_be(selector, text) - - def element_text_should_not_contain(self, name, text): - """ - Verifies that element with given selector type not contain the \ - given text. - - *Arguments:* - - name: selector title taken from object repository. - - text: text to be found set in test. - - *Return:* - - None. - - *Examples:* - | Element Text Should Not Contain | Dashboard . Message text \ - | Post Updated. | - """ - selector = self.get_web_element_selector(name) - self.element_should_not_contain(selector, text) - - def element_text_should_not_be_equal_to(self, name, text): - """ - Verifies that element text with given selector type not qual to the \ - given text. - - *Arguments:* - - name: selector title taken from object repository. - - text: text to be found set in test. - - *Return:* - - None. - - *Examples:* - | Element Text Should Not Be Equal To | Dashboard . Message text \ - | Post Updated. | - """ - selector = self.get_web_element_selector(name) - self.element_text_should_not_be(selector, text) - - def element_should_not_contain(self, selector, text): - """ - Verifies element identified by given selector does not contain \ - given text. - - *Arguments:* - - selector: element identificator in the object repository. - - text: text to be checked. - - *Return:* - - None. - - *Examples:* - | Element Should Not Contain | xpath=//div[@id='moderated']/p \ - | rude message | - """ - obj_text = self.get_text(selector) - BuiltIn().should_not_contain(obj_text, text) - - def element_text_should_not_be(self, selector, text): - """ - Verifies element identified by given selector does not equal to the \ - given text. - - *Arguments:* - - selector: element identificator in the object repository. - - text: text to be checked. - - *Return:* - - None. - - *Examples:* - | Element Should Not Be | xpath=//div[@id='moderated']/p \ - | rude message | - """ - obj_text = self.get_text(selector) - BuiltIn._should_not_be_equal(obj_text, text) - - def page_should_have_number_of_elements(self, count, name): - """ - Verifies that current page contains given number of elements with \ - given selector type. - - *Arguments:* - - count: number of element to be found. - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Page should have number of elements | 4 | Banner Buttons | - """ - element = self.get_element_from_repo(name) - self.xpath_should_match_x_times(element[1], count) - - def page_should_have_element(self, name): - """ - Verifies that current page contains given element. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Page should have element | Contact Us button | - """ - selector = self.get_web_element_selector(name) - self.page_should_contain_element(selector) - - def page_should_not_have_element(self, name): - """ - Verifies that current page does not contain given element. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Page should not have element | Contact Us button | - """ - selector = self.get_web_element_selector(name) - self.page_should_not_contain_element(selector) - - def put_mouse_over(self, name): - """ - Simulates hovering mouse over the element specified by selector name. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Put mouse over | Dashboard . Posts button | - """ - selector = self.get_web_element_selector(name) - self.mouse_over(selector) - - @_framed('field_name') - def fill_field(self, field_name, text): - """ - Gets element by its field name and fills it with given text. - Note: If field name will be 'password' then \ - ${text} won't be logged. - - *Arguments:* - - field_name: selector title taken from object repository. - - text: text to be entered into field. - - *Return:* - - None. - - *Examples:* - | Fill field | Dashboard . New Post Title field | Test blog-post | - """ - self.wait_for_page_loaded() - selector = self.wait_for_element_found(field_name, 'input/textarea', - 'next') - - if 'PASSWORD' in field_name.upper(): - self.input_password(selector, text) - else: - self.input_text(selector, text) - - def wait_for_element_found(self, element_name, element_type, method): - """ - Makes 10 retries to get element by its name with defined retry \ - interval (1 second). - - *Arguments:* - - element_name: selector title taken from object repository; - - element_type: element tag, could take several tags at once \ - (e.g. select/input/a); - - method: a method of how to search for the element. - - *Return:* - - selector: element identificator from object repository. - - *Examples:* - | ${selector} | Wait for element found | Dashboard Menu Title field \ - | input | next | - """ - for attempt in range(100): - try: - page_source_code = self.get_source() - selector = self.get_web_element_selector(element_name, - page_source_code, - element_type, - method) - except: - pass - if selector: - break - - sleep(0.5) - - if not selector: - BuiltIn().run_keyword('Capture Page Screenshot') - raise AssertionError('Web element "%s" was not found in object ' - 'repository and on page.' % element_name) - - return selector - - @_framed('name') - def select_item_from_list(self, name, item_name): - """ - Selects specified item from given list. - - *Arguments:* - - name: selector title taken from object repository. - - item_name: list box item. - - *Return:* - - None. - - *Examples:* - | Select item from list | Dashboard . User Action dropdown | Delete | - """ - selector = self.wait_for_element_found(name, 'select', 'next') - self.select_from_list(selector, item_name) - - @_framed('name') - def set_checkbox_on(self, name, method='this'): - """ - Set checkbox with given title on. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Set checkbox on | Dashboard . Delete Posts Role checkbox | - """ - selector = self.wait_for_element_found(name, 'select/input', method) - self.select_checkbox(selector) - - @_framed('name') - def set_checkbox_off(self, name, method='this'): - """ - Set checkbox with given title off. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Set checkbox off | Dashboard . Delete Posts Role checkbox | - """ - selector = self.wait_for_element_found(name, 'select/input', method) - self.unselect_checkbox(selector) - - @_framed('from_name') - def drag_and_drop_to(self, from_name, to_name): - """ - Drags and drops from one given element to other. - - *Arguments:* - - from_name: selector title taken from object repository to get \ - content from; - - to_name: selector title taken from object repository to put \ - content to. - - *Return:* - - None. - - *Examples:* - | Drag And Drop To | Photo gallery | User avatar | - """ - from_selector = self.wait_for_element_found(from_name, - 'button/input/a/img/div', - 'this') - to_selector = self.wait_for_element_found(to_name, - 'button/input/a/img/div', - 'this') - self.drag_and_drop_to(from_selector, to_selector) - - def find_associated_element(self, first_element, desired_element): - """ - This method allows to find element, which located near other element \ - and returns xpath of this element. - Sometimes we have many identical elements on page and we can find \ - correct element based on nearest unique elements. - - *Arguments:* - - First_Element: base element, near this element we want to find \ - other element. - - Desired_Element: this is element which we want to find. - - *Return:* - - xpath of Desired_Element or None - - *Examples:* - | {element_xpath} | Find Associated Element | MyUniqueElement \ - | DesiredElement | - """ - element = self.wait_for_element_found(first_element, desired_element, - 'associated') - - return element - - @_framed('name') - def select_radio_by_selector(self, name, value): - """ - Sets selection of radio button group identified by selector name \ - to value. - - *Arguments:* - - name: selector title taken from object repository. - - value: value to be selected, is used for the value attribute or \ - for the id attribute. - - *Return:* - - None. - - *Examples:* - | Select Radio By Selector | Dashboard . Questionnaire | Yes | - """ - selector = self.wait_for_element_found(name, 'input', 'previous') - self.select_radio_button(selector, value) - - def get_table_row_with(self, element): - """ - This method allows to find table row with specific element. \ - After this xpath of table row can be used like base for xpath of \ - different elements in this table. - - *Arguments:* - - element: the unique element from table. - - *Return:* - - xpath of table row for this element - - *Examples:* - | {table_xpath} | Get Table Row With | MyUniqueElement | - | Click Element \ \ | xpath={table_xpath}/td[4]/button | - """ - source_code = self.get_source() - result = self.get_table_row_xpath(source_code, element) - - return result - - @_framed('name') - def element_should_be_invisible(self, name): - """ - Verifies that element is invisible on the page. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Element Should Be Invisible | Dashboard . Post Publish button | - """ - selector = self.wait_for_element_found(name, - 'button/input/a/img', - 'this') - self.element_should_not_be_visible(selector) - - @_framed('name') - def element_should_not_be_invisible(self, name): - """ - Verifies that element is visible on the page. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - None. - - *Examples:* - | Element Should Not Be Invisible | Dashboard . Post Publish button | - """ - selector = self.wait_for_element_found(name, - 'button/input/a/img', - 'this') - self.element_should_be_visible(selector) - - @_framed('name') - def get_element_text(self, name): - """ - Gets text of given element. - - *Arguments:* - - name: selector title taken from object repository. - - *Return:* - - text of element. - - *Examples:* - | ${text} | Get Element Text | Main header | - """ - selector = self.wait_for_element_found(name, - 'button/input/a/img', - 'this') - text = self.get_text(selector) - - return text - - @_framed('name') - def get_attribute_of_element(self, name, attribute): - """ - Gets attribute of given element. - - *Arguments:* - - name: selector title taken from object repository. - - attribute: attribute that would be taken. - - *Return:* - - text of element attribute. - - *Examples:* - | ${id_text} | Get Attribute Of Element | Main header | id | - """ - selector = self.wait_for_element_found(name, - 'button/input/a/img', - 'this') - attr_selector = '%s@%s' % (selector, attribute) - attr_text = self.get_element_attribute(attr_selector) - - return attr_text diff --git a/boffin/src/Boffin/keywords/__init__.py b/boffin/src/Boffin/keywords/__init__.py deleted file mode 100644 index b781ab7..0000000 --- a/boffin/src/Boffin/keywords/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -from _WebUIlib import _WebUIlib -from _Rest import _Rest -from Pydblibrary import Pydblibrary - -__all__ = [ - '_WebUIlib', - '_Rest', - 'Pydblibrary' -] diff --git a/boffin/src/Boffin/version.py b/boffin/src/Boffin/version.py deleted file mode 100644 index 72a783a..0000000 --- a/boffin/src/Boffin/version.py +++ /dev/null @@ -1 +0,0 @@ -VERSION = '1.0rc3' diff --git a/boffin/src/robotframework_boffin.egg-info/PKG-INFO b/boffin/src/robotframework_boffin.egg-info/PKG-INFO deleted file mode 100644 index d1709d0..0000000 --- a/boffin/src/robotframework_boffin.egg-info/PKG-INFO +++ /dev/null @@ -1,15 +0,0 @@ -Metadata-Version: 1.0 -Name: robotframework-boffin -Version: 1.0rc3 -Summary: Extension for Robot Framework -Home-page: UNKNOWN -Author: Mirantis, Inc. -Author-email: UNKNOWN -License: Apache License 2.0 -Description: Robotframework-Boffin - ========================== - - This library extends available keywords of Robotframework and robotframework-selenium2library. - - And provides keywords for REST requests testing. -Platform: any diff --git a/boffin/src/robotframework_boffin.egg-info/SOURCES.txt b/boffin/src/robotframework_boffin.egg-info/SOURCES.txt deleted file mode 100644 index 3a92f0e..0000000 --- a/boffin/src/robotframework_boffin.egg-info/SOURCES.txt +++ /dev/null @@ -1,15 +0,0 @@ -README.rst -setup.py -src/Boffin/_Settings.py -src/Boffin/__init__.py -src/Boffin/version.py -src/Boffin/keywords/_Rest.py -src/Boffin/keywords/_Utils.py -src/Boffin/keywords/_WebUIlib.py -src/Boffin/keywords/__init__.py -src/robotframework_boffin.egg-info/PKG-INFO -src/robotframework_boffin.egg-info/SOURCES.txt -src/robotframework_boffin.egg-info/dependency_links.txt -src/robotframework_boffin.egg-info/not-zip-safe -src/robotframework_boffin.egg-info/requires.txt -src/robotframework_boffin.egg-info/top_level.txt \ No newline at end of file diff --git a/boffin/src/robotframework_boffin.egg-info/dependency_links.txt b/boffin/src/robotframework_boffin.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/boffin/src/robotframework_boffin.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/boffin/src/robotframework_boffin.egg-info/not-zip-safe b/boffin/src/robotframework_boffin.egg-info/not-zip-safe deleted file mode 100644 index 8b13789..0000000 --- a/boffin/src/robotframework_boffin.egg-info/not-zip-safe +++ /dev/null @@ -1 +0,0 @@ - diff --git a/boffin/src/robotframework_boffin.egg-info/requires.txt b/boffin/src/robotframework_boffin.egg-info/requires.txt deleted file mode 100644 index 439aba8..0000000 --- a/boffin/src/robotframework_boffin.egg-info/requires.txt +++ /dev/null @@ -1,6 +0,0 @@ -robotframework>=2.8.1 -selenium>=2.33.0 -robotframework-selenium2library>=1.2.0 -robotframework-pydblibrary>=1.1 -beautifulsoup4>=4.2.1 -requests>=1.2.0 \ No newline at end of file diff --git a/boffin/src/robotframework_boffin.egg-info/top_level.txt b/boffin/src/robotframework_boffin.egg-info/top_level.txt deleted file mode 100644 index cbd7eb9..0000000 --- a/boffin/src/robotframework_boffin.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -Boffin diff --git a/deploy.sh b/deploy.sh deleted file mode 100755 index cad10a2..0000000 --- a/deploy.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/expect -d -# The following directories should be created for this script: -# /opt/stack/devstack -# /opt/stack/keero -# the ssh key should be in directory /opt/stack/.ssh/ -# the iso file with windows should be in directory /opt/stack/ - -set timeout 1200 - -send_user "\n\nStart to login to the test bed...\n\n" - -spawn /usr/bin/ssh [lindex $argv 0]@[lindex $argv 1] -expect "password" -send -- "EVYiMCVZX9\n" -expect "*#*" - -send -- "su - stack\n" -expect "*$*" - -send -- "sudo killall python\n" -expect "*$*" -send -- "cd ~/devstack\n" -expect "*$*" -send -- "./unstack.sh\n" -expect "*$*" -send -- "./stack.sh\n" -expect "*/usr/bin/service: 123: exec: status: not found*" -send -- "y\n" -expect "*stack.sh completed*" - -send -- "sudo rabbitmq-plugins enable rabbitmq_management\n" -expect "*$*" -send -- "sudo service rabbitmq-server restart\n" -expect "*$*" -send -- "sudo rabbitmqctl add_user keero keero\n" -expect "*$*" -send -- "sudo rabbitmqctl set_user_tags keero administrator\n" -expect "*$*" - - -send -- "source openrc admin admin\n" -expect "*$*" - -send -- "cd ~\n" -expect "*$*" - -send -- "nova keypair-add keero-linux-keys > heat_key.priv\n" -expect "*$*" - -send -- "glance image-create --name 'ws-2012-full' --is-public true --container-format ovf --disk-format qcow2 < ws-2012-full.qcow2\n" -expect "*$*" - -send -- "cd ~/keero\n" -expect "*$*" -send -- "git pull\n" -expect "/.ssh/id_rsa" -send -- "swordfish\n" -expect "*$*" -send -- "cp -Rf ~/keero/dashboard/windc /opt/stack/horizon/openstack_dashboard/dashboards/project\n" -expect "*$*" -send -- "cp -f ~/keero/dashboard/api/windc.py /opt/stack/horizon/openstack_dashboard/api/\n" -expect "*$*" -send -- "cd ~/keero/python-portasclient\n" -expect "*$*" -send -- "sudo python setup.py install\n" -expect "*$*" -send -- "cd ~/keero/portas\n" -expect "*$*" -send -- "./tools/with_venv.sh ./bin/portas-api --config-file=./etc/portas-api.conf & > ~/APIservice.log\n" -sleep 10 -send -- "\n" -expect "*$*" -send -- "cd ~/keero/conductor\n" -expect "*$*" -send -- "./tools/with_venv.sh ./bin/app.py & > ~/conductor.log\n" -sleep 10 -send -- "\n" -expect "*$*" -send -- "logout\n" -expect "*#*" - diff --git a/documentation-tests/Documentation.txt b/documentation-tests/Documentation.txt deleted file mode 100644 index 4d42be1..0000000 --- a/documentation-tests/Documentation.txt +++ /dev/null @@ -1,165 +0,0 @@ -*** Settings *** -Suite Setup -Suite Teardown Close All Browsers -Test Setup Open Browser https://wiki.openstack.org/wiki/Murano remote_url=http://172.18.124.233:4444/wd/hub browser=firefox ff_profile_dir=ffprofile -Test Teardown Close All Browsers -Library String -Library Boffin.WebUIlib 0 20 # Boffin framework library - -*** Variables *** -${resources_path} Resources/ - -*** Test Cases *** -Check that main page includes Documentation section - Page should contain element "Documentation" - -Check that docs per releases are availiable - Page should contain element "documentation per release" - User click on "documentation per release" - Page should contain element "Release" - -Release 0.1: Murano Manual - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.1" > "Murano Manual" (1 link) - Page Should Not Contain 404 - -Release 0.1: Murano Deployment Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.1" > "Murano Deployment Guide" (2 link) - Page Should Not Contain 404 - -Release 0.2: Developer Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.2" > "Developers Guide" (1 link) - Page Should Not Contain 404 - -Release 0.2: Administrator Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.2" > "Administrator Guide" (2 link) - Page Should Not Contain 404 - -Release 0.2: Installation Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.2" > "Installation Guide" (3 link) - Page Should Not Contain 404 - -Release 0.2.11: Getting Started Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.2.11" > "Getting Started Guide" (1 link) - Page Should Not Contain 404 - -Release 0.2.11: Installation Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.2.11" > "Installation Guide" (2 link) - Page Should Not Contain 404 - -Release 0.2.11: Developer Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.2.11" > "Developer Guide" (3 link) - Page Should Not Contain 404 - -Release 0.2.11: User Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.2.11" > "User Guide" (4 link) - Page Should Not Contain 404 - -Release 0.2.11: Administrator Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.2.11" > "Administrator Guide" (5 link) - Page Should Not Contain 404 - -Release 0.3: Getting Started Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.3" > "Getting Started Guide" (1 link) - Page Should Not Contain 404 - -Release 0.3: Installation Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.3" > "Installation Guide" (2 link) - Page Should Not Contain 404 - -Release 0.3: Developer Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.3" > "Developer Guide" (3 link) - Page Should Not Contain 404 - -Release 0.3: User Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.3" > "User Guide" (4 link) - Page Should Not Contain 404 - -Release 0.3: Administrator Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.3" > "Administrator Guide" (5 link) - Page Should Not Contain 404 - -Release 0.4: Getting Started Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.4" > "Getting Started Guide" (1 link) - Page Should Not Contain 404 - -Release 0.4: Installation Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.4" > "Installation Guide" (2 link) - Page Should Not Contain 404 - -Release 0.4: Developer Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.4" > "Developer Guide" (3 link) - Page Should Not Contain 404 - -Release 0.4: User Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.4" > "User Guide" (4 link) - Page Should Not Contain 404 - -Release 0.4: Administrator Guide - Page should contain element "documentation per release" - User click on "documentation per release" - Go to "Release v0.4" > "Administrator Guide" (5 link) - Page Should Not Contain 404 - -*** Keywords *** -User click on "${element}" - Wait For Page Loaded - Click on ${element} - Wait For Page Loaded - -Page should contain element "${element}" - Wait For Page Loaded - Page Should Contain ${element} - -Go to "${release}" > "${docs}" (${position} link) - ${source} Get Source - ${key_element} Get Web Element Selector Murano Manual ${source} a this - @{xpath_blocks}= Split String ${key_element} ] - ${num} Get Substring @{xpath_blocks}[3] -1 - ${num1}= Evaluate ${num}-1 - ${num2}= Evaluate ${num}-2 - ${num3}= Evaluate ${num}-3 - ${num4}= Evaluate ${num}-4 - ${var} = Set Variable If '${release}' == 'Release v0.1' ${num} - ... '${release}' == 'Release v0.2' ${num1} - ... '${release}' == 'Release v0.2.11' ${num2} - ... '${release}' == 'Release v0.3' ${num3} - ... '${release}' == 'Release v0.4' ${num4} - Click Element xpath=.//*[@id='mw-content-text']/ul[${var}]/li[${position}]/a diff --git a/documentation-tests/ffprofile/user.js b/documentation-tests/ffprofile/user.js deleted file mode 100644 index b00d590..0000000 --- a/documentation-tests/ffprofile/user.js +++ /dev/null @@ -1 +0,0 @@ -user_pref("webdriver_enable_native_events", false); diff --git a/infra/CleanTrash.py b/infra/CleanTrash.py deleted file mode 100644 index 04f20b2..0000000 --- a/infra/CleanTrash.py +++ /dev/null @@ -1,104 +0,0 @@ -from keystoneclient.v2_0 import client as ksclient -from neutronclient.neutron import client as netclient -from muranoclient.v1.client import Client as murano_client -from heatclient import client as heat_client -import novaclient.v1_1.client as nvclient -import time -import argparse - -parser = argparse.ArgumentParser(description="Script for cleaning trash") -parser.add_argument("-openstack_user", dest='openstack_user', type=str, - help="Openstack username", default='sergey_demo_user') -parser.add_argument("-openstack_password", dest='openstack_password', - type=str, help="Openstack password", - default='111') -parser.add_argument("-openstack_tenant", dest='openstack_tenant', type=str, - help="Openstack tenant", default='ForTests') -parser.add_argument("-keystone_url", dest='keystone_url', type=str, - help="Keystone url", default='http://172.18.124.201:5000/v2.0/') -parser.add_argument("-murano_url", dest='murano_url', type=str, - help="Murano url", default='http://172.18.78.92:8082') -parser.add_argument("-neutron_url", dest='neutron_url', type=str, - help="Neutron url", default='http://172.18.124.202:9696/') -parser.add_argument("-heat_url", dest='heat_url', type=str, - help="Heat url", - default='http://172.18.124.203:8004' - '/v1/72239681556748a3b9b74b44d081b84b') -parser.add_argument("-create_new_router", dest='create_new_router', type=bool, - help="Create or not create router after script", - default=False) -args = parser.parse_args() - -user = args.openstack_user -password = args.openstack_password -tenant = args.openstack_tenant -keystone_url = args.keystone_url -create_router = args.create_new_router -keystone_client = ksclient.Client(username=user, password=password, - tenant_name=tenant, auth_url=keystone_url) -nova = nvclient.Client(user, password, tenant, keystone_url, - service_type="compute") -token = keystone_client.auth_token -murano_url = args.murano_url -muranoclient = murano_client(endpoint=murano_url, token=token) -quantum_endpoint = args.neutron_url -neutron = netclient.Client('2.0', endpoint_url=quantum_endpoint, token=token) -heat_endpoint = args.heat_url -heat = heat_client.Client('1', endpoint=heat_endpoint, token=token) -for i in heat.stacks.list(): - i.delete() - -networks = neutron.list_networks() -for i in keystone_client.tenants.list(): - if i.name == tenant: - cool = i.id - -for i in muranoclient.environments.list(): - muranoclient.environments.delete(i.id) - -for i in networks['networks']: - if i['tenant_id'] == cool: - for j in i['subnets']: - routers = neutron.list_routers() - for m in routers['routers']: - if m['tenant_id'] == cool: - body = {"subnet_id": str(j)} - try: - neutron.remove_gateway_router(m['id']) - except: - print "All is bad" - try: - neutron.remove_interface_router(m['id'], body) - except: - print "all is bad:(" - try: - neutron.delete_router(m['id']) - except: - print "All is bad" - try: - neutron.delete_network(i['id']) - except: - print "All is bad" - -for i in nova.servers.list(): - if i.tenant_id == cool: - try: - nova.servers.delete(i) - time.sleep(5) - except: - print "All is bad" - -for i in nova.security_groups.list(): - if i.tenant_id == cool and i.name !='default': - nova.security_groups.delete(i) -routers = neutron.list_routers() -for m in routers['routers']: - if m['tenant_id'] == cool: - create_router = False -if create_router: - for i in neutron.list_networks()['networks']: - if i['router:external']: - a = neutron.create_router({'router': {'name': 'ROUTER', - 'external_gateway_info': - {'network_id': i['id'], - 'enable_snat': True}}}) diff --git a/infra/RabbitMQ.py b/infra/RabbitMQ.py deleted file mode 100644 index f10c5d4..0000000 --- a/infra/RabbitMQ.py +++ /dev/null @@ -1,49 +0,0 @@ -from pyrabbit.api import Client -import argparse - -parser = argparse.ArgumentParser(description="Script for creating rabbitmq" - "users and vhost for jenkins's" - "jobs") -parser.add_argument("-rabbitmq_url", dest='rabbitmq_url', type=str, - help="URL of using RabbitMQ", default='localhost:55672') -parser.add_argument("-rabbitmq_username", dest='rabbitmq_username', type=str, - help="Username for RabbitMQ auth", default='guest') -parser.add_argument("-rabbitmq_password", dest='rabbitmq_password', type=str, - help="Password for RabbitMQ auth", default='guest') -parser.add_argument("-username", dest='username', type=str, - help="Username", default='test') -parser.add_argument("-password", dest='password', type=str, - help="Password", default='swordfish') -parser.add_argument("-vhostname", dest='vhostname', type=str, - help="Vhost name", default='test') -args = parser.parse_args() -rabbitmq_url = args.rabbitmq_url -rabbitmq_user = args.rabbitmq_username -rabbitmq_password = args.rabbitmq_password -user = args.username -password = args.password -vhost = args.vhostname -cl = Client(rabbitmq_url, rabbitmq_user, rabbitmq_password) -assert cl.is_alive() - -for queue in cl.get_queues(): - if queue['vhost'] == vhost: - cl.purge_queue(vhost, queue['name']) - cl.delete_queue(vhost, queue['name']) - -for vhost_ in cl.get_all_vhosts(): - if vhost_['name'] == vhost: - while True: - try: - cl.delete_vhost(vhost_['name']) - break - except Exception: - pass - -for user_ in cl.get_users(): - if user_['name'] == user: - cl.delete_user(user_['name']) - -cl.create_vhost(vhost) -cl.create_user(user, password, tags='administrator') -cl.set_vhost_permissions(vhost, user, '.*', '.*', '.*') diff --git a/infra/clear_murano_environment.py b/infra/clear_murano_environment.py deleted file mode 100644 index c77baa8..0000000 --- a/infra/clear_murano_environment.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2013 OpenStack Foundation -# Copyright 2013 Mirantis Inc -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import argparse -from keystoneclient.v2_0 import client as ksclient -from muranoclient.client import Client as mclient - -parser = argparse.ArgumentParser() -parser.add_argument('--user', type=str) -parser.add_argument('--password', type=str) -parser.add_argument('--tenant', type=str) -parser.add_argument('--keystone_url', type=str, - default='http://localhost:5000/v2.0/') -parser.add_argument('--murano_url', type=str) -args = parser.parse_args() - -keystone_client = ksclient.Client(username=args.user, - password=args.password, - tenant_name=args.tenant, - auth_url=args.keystone_url) - -murano_client = mclient('1', endpoint=args.murano_url, - token=keystone_client.auth_token) - -for env in murano_client.environments.list(): - murano_client.environments.delete(env.id) diff --git a/infra/configure_api.sh b/infra/configure_api.sh deleted file mode 100644 index 194798d..0000000 --- a/infra/configure_api.sh +++ /dev/null @@ -1,60 +0,0 @@ -set timeout 30 - -send_user "\n\nStart to login to the test bed...\n\n" - -spawn /usr/bin/ssh [lindex $argv 0]@[lindex $argv 1] -expect "@murano" -send -- "sudo su\n" -expect "@murano" -send -- "sed -i \"s/#amqp_durable_queues=false/amqp_durable_queues=false/\" /etc/murano/murano.conf\n" -expect "@murano" -send -- "sed -i \"s/#amqp_auto_delete=false/amqp_auto_delete=false/\" /etc/murano/murano.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_host=localhost/rabbit_host=" -send -- [lindex $argv 2] -send -- "/\" /etc/murano/murano.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_port=5672/rabbit_port=" -send -- [lindex $argv 3] -send -- "/\" /etc/murano/murano.conf\n" -expect "@murano" -send -- "sed -i 's/#\\(rabbit_hosts=.*\\)/\\1/' /etc/murano/murano.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_use_ssl=false/rabbit_use_ssl=" -send -- [lindex $argv 4] -send -- "/\" /etc/murano/murano.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_userid=guest/rabbit_userid=" -send -- [lindex $argv 5] -send -- "/\" /etc/murano/murano.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_password=guest/rabbit_password=swordfish/\" /etc/murano/murano.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_virtual_host=\\//rabbit_virtual_host=" -send -- [lindex $argv 5] -send -- "/\" /etc/murano/murano.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_retry_interval=1/rabbit_retry_interval=1/\" /etc/murano/murano.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_retry_backoff=2/rabbit_retry_backoff=2/\" /etc/murano/murano.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_max_retries=0/rabbit_max_retries=0/\" /etc/murano/murano.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_ha_queues=false/rabbit_ha_queues=false/\" /etc/murano/murano.conf\n" -expect "@murano" -send -- "sed -i \"s/auth_host = 127.0.0.1/auth_host = " -send -- [lindex $argv 2] -send -- "/\" /etc/murano/murano.conf\n" -expect "@murano" -send -- "sed -i \"s/connection = sqlite:\\/\\/\\/\\/etc\\/murano\\/murano-api.sqlite/connection = mysql:\\/\\/murano:swordfish@localhost:3306\\/murano/\" /etc/murano/murano.conf\n" -expect "@murano" -send -- "sed -i \"s/auth_url = http:\\/\\/localhost:5000\\/v2.0/auth_url = http:\\/\\/" -send -- [lindex $argv 2] -send -- ":5000\\/v2.0/\" /etc/murano/murano.conf\n" -expect "@murano" -send -- "murano-manage --config-file /etc/murano/murano.conf db-sync\n" -expect "@murano" -send -- "service murano-api restart\n" -expect "@murano" -send -- "service murano-engine restart\n" -expect "@murano" diff --git a/infra/configure_conductor.sh b/infra/configure_conductor.sh deleted file mode 100644 index 6e0b632..0000000 --- a/infra/configure_conductor.sh +++ /dev/null @@ -1,12 +0,0 @@ -set timeout 30 - -send_user "\n\nStart to login to the test bed...\n\n" - -spawn /usr/bin/ssh [lindex $argv 0]@[lindex $argv 1] -expect "@murano" -send -- "sudo su\n" -expect "@murano" -send -- "sed -i \"s/init_scripts_dir = \\/etc\\/murano\\/init-scripts/init_scripts_dir = \\/opt\\/git\\/murano-conductor\\/etc\\/init-scripts/\" /etc/murano-conductor/conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/agent_config_dir = \\/etc\\/murano\\/agent-config/agent_config_dir = \\/etc\\/murano-conductor\\/data\\/templates\\/agent-config/\" /etc/murano-conductor/conductor.conf\n" -expect "@murano" diff --git a/infra/configure_conductor_new.sh b/infra/configure_conductor_new.sh deleted file mode 100644 index 9eaf9dc..0000000 --- a/infra/configure_conductor_new.sh +++ /dev/null @@ -1,72 +0,0 @@ -set timeout 30 - -send_user "\n\nStart to login to the test bed...\n\n" - -spawn /usr/bin/ssh [lindex $argv 0]@[lindex $argv 1] -expect "@murano" -send -- "sudo su\n" -expect "@murano" -send -- "sed -i \"s/#amqp_durable_queues=false/amqp_durable_queues=false/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/#amqp_auto_delete=false/amqp_auto_delete=false/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_host=localhost/rabbit_host=" -send -- [lindex $argv 2] -send -- "/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_port=5672/rabbit_port=" -send -- [lindex $argv 3] -send -- "/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_hosts=\$rabbit_host:\$rabbit_port/rabbit_hosts=\$rabbit_host:\$rabbit_port/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_use_ssl=false/rabbit_use_ssl=" -send -- [lindex $argv 4] -send -- "/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_userid=guest/rabbit_userid=" -send -- [lindex $argv 5] -send -- "/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_password=guest/rabbit_password=swordfish/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_virtual_host=\\//rabbit_virtual_host=" -send -- [lindex $argv 5] -send -- "/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_retry_interval=1/rabbit_retry_interval=1/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_retry_backoff=2/rabbit_retry_backoff=2/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_max_retries=0/rabbit_max_retries=0/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/#rabbit_ha_queues=false/rabbit_ha_queues=false/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/auth_url = http:\\/\\/localhost:5000\\/v2.0/auth_url = http:\\/\\/" -send -- [lindex $argv 2] -send -- ":5000\\/v2.0/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/host = localhost/host = " -send -- [lindex $argv 2] -send -- "/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/port = 5672/port = " -send -- [lindex $argv 3] -send -- "/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/ssl = False/ssl = " -send -- [lindex $argv 4] -send -- "/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/login = guest/login = " -send -- [lindex $argv 5] -send -- "/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/password = guest/password = swordfish/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "sed -i \"s/virtual_host = \\//virtual_host = " -send -- [lindex $argv 5] -send -- "/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" -send -- "service murano-conductor restart\n" -expect "@murano" diff --git a/infra/deploy_component.sh b/infra/deploy_component.sh deleted file mode 100644 index 760f867..0000000 --- a/infra/deploy_component.sh +++ /dev/null @@ -1,83 +0,0 @@ -### -### Use: -### expect deploy_component.sh user 10.10.10.10 /refs/for/master/344332 murano-api -### - -set timeout 1200 - -send_user "\n\nStart to login to the test bed...\n\n" - -spawn /usr/bin/ssh [lindex $argv 0]@[lindex $argv 1] -expect "@murano" - -send -- "sudo su\n" -expect "@murano" - -send -- "rm -rf /tmp/keystone-signing-muranoapi\n" -expect "@murano" - -send -- "cd /opt/git/ ; rm -rf " -send -- [lindex $argv 3] -send -- "\n" -expect "@murano" - -send -- "git clone https://github.com/stackforge/" -send -- [lindex $argv 3] -send -- "\n" -expect "@murano" - -send -- "cd /opt/git/" -send -- [lindex $argv 3] -send -- "\n" -expect "@murano" - -send -- "sh setup-centos.sh uninstall > 1.log\n" -expect "@murano" -send -- "sh setup.sh uninstall > 2.log\n" -expect "@murano" -send -- "git fetch https://review.openstack.org/stackforge/" -send -- [lindex $argv 3] -send -- " " -send -- [lindex $argv 2] -send -- " && git checkout FETCH_HEAD\n" -expect "@murano" - -send -- "chown horizon:horizon /var/lib/openstack-dashboard/secret_key\n" -expect "@murano" -send -- "chmod 600 /var/lib/openstack-dashboard/secret_key\n" -expect "@murano" - -send -- "chmod +x ./setup.sh ; ./setup.sh install > old.log\n" -expect "@murano" -send -- "chmod +x ./setupV2.sh ; ./setupV2.sh install > new.log\n" -expect "@murano" - -send -- "sed -i \"s/\\\"BootFromVolume\\\": true,//\" /etc/murano-conductor/data/templates/cf/Linux.template\n" -expect "@murano" -send -- "sed -i \"s/\\\"BootFromVolume\\\": true,//\" /etc/murano-conductor/data/templates/cf/Windows.template\n" -expect "@murano" - -send -- "service " -send -- [lindex $argv 3] -send -- " restart\n" -expect "@murano" -send -- "service openstack-" -send -- [lindex $argv 3] -send -- " restart\n" -expect "@murano" - - -send -- "cd /tmp/muranorepository-data/cache ; rm -rf *\n" -expect "@murano" -send -- "cd /tmp/muranorepository-cache ; rm -rf *\n" -expect "@murano" -send -- "cd /tmp/muranodashboard-cache ; rm -rf *\n" -expect "@murano" -send -- "cd /tmp/muranoconductor-cache ; rm -rf *\n" -expect "@murano" - -send -- "service murano-repository restart\n" -send -- "service murano-conductor restart\n" -send -- "service apache2 restart\n" - -send -- "exit\n" diff --git a/infra/deploy_component_new.sh b/infra/deploy_component_new.sh deleted file mode 100644 index 50a6520..0000000 --- a/infra/deploy_component_new.sh +++ /dev/null @@ -1,94 +0,0 @@ -### -### Use: -### expect deploy_component.sh user 10.10.10.10 /refs/for/master/344332 murano-api -### - -set timeout 1200 - -send_user "\n\nStart to login to the test bed...\n\n" - -spawn /usr/bin/ssh [lindex $argv 0]@[lindex $argv 1] -expect "@murano" - -send -- "sudo su\n" -expect "@murano" - -send -- "rm -rf /tmp/keystone-signing-muranoapi\n" -expect "@murano" -send -- "rm -rf /tmp/keystone-signing-muranorepository\n" -expect "@murano" - -send -- "cd /opt/git/ && rm -rf " -send -- [lindex $argv 3] -send -- "\n" -expect "@murano" - -send -- "git clone https://github.com/stackforge/" -send -- [lindex $argv 3] -send -- "\n" -expect "@murano" - -send -- "cd /opt/git/" -send -- [lindex $argv 3] -send -- "\n" -expect "@murano" - -send -- "bash setup.sh uninstall > 2.log\n" -expect "@murano" - -send -- "git fetch https://review.openstack.org/stackforge/" -send -- [lindex $argv 3] -send -- " " -send -- [lindex $argv 2] -send -- " && git checkout FETCH_HEAD\n" -expect "@murano" - -send -- "chown horizon:horizon /var/lib/openstack-dashboard/secret_key\n" -expect "@murano" -send -- "chmod 600 /var/lib/openstack-dashboard/secret_key\n" -expect "@murano" - -send -- "bash setup.sh install > old.log\n" -expect "@murano" - -send -- "sed -i \"s/DEBUG = False/DEBUG = True/\" /etc/openstack-dashboard/local_settings.py\n" -expect -- "@murano" -send -- "sed -i \"s/OPENSTACK_HOST = \"127.0.0.1\"/OPENSTACK_HOST = \"" -send -- [lindex $argv 4] -send -- "\" /etc/openstack-dashboard/local_settings.py\n" -expect -- "@murano" -send -- "service apache2 restart\n" -expect "@murano" - -send -- "service openstack-" -send -- [lindex $argv 3] -send -- " restart\n" -expect "@murano" -send -- "service " -send -- [lindex $argv 3] -send -- " restart\n" -expect "@murano" - -send -- "cd /var/cache/murano/muranorepository-data && rm -rf *\n" -expect "@murano" -send -- "cd /var/cache/murano-dashboard/ && rm -rf *\n" -expect "@murano" -send -- "cd /var/cache/murano/muranoconductor-data && rm -rf *\n" -expect "@murano" - -send -- "service murano-api restart\n" -expect "@murano" -send -- "service murano-conductor restart\n" -expect "@murano" -send -- "service murano-repository restart\n" -expect "@murano" -send -- "service openstack-murano-api restart\n" -expect "@murano" -send -- "service openstack-murano-conductor restart\n" -expect "@murano" -send -- "service openstack-murano-repository restart\n" -expect "@murano" -send -- "service apache2 restart\n" -expect "@murano" - -send -- "exit\n" diff --git a/infra/deploy_mistral.sh b/infra/deploy_mistral.sh deleted file mode 100644 index 5e9d734..0000000 --- a/infra/deploy_mistral.sh +++ /dev/null @@ -1,67 +0,0 @@ -set timeout 200 - -send_user "\n\nStart to login to the test bed...\n\n" - -spawn /usr/bin/ssh [lindex $argv 0]@[lindex $argv 1] -expect "@mistral" - -send -- "sudo su\n" -expect "@mistral" - -send -- "git clone https://github.com/stackforge/mistral -b " -send -- [lindex $argv 3] -send -- "\n" -expect "@mistral" - -send -- "cp mistral/etc/mistral.conf.example mistral/etc/mistral.conf\n" -expect "@mistral" - - -send -- "sed -i \"s/auth_enable = True/auth_enable = False/\" mistral/etc/mistral.conf\n" -expect "@mistral" -send -- "sed -i \"s/rabbit_host = localhost/rabbit_host = " -send -- [lindex $argv 2] -send -- "/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/rabbit_port = 5672/rabbit_port = " -send -- [lindex $argv 4] -send -- "/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/rabbit_virtual_host = \\//rabbit_virtual_host = " -send -- [lindex $argv 5] -send -- "/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/rabbit_user = guest/rabbit_user = " -send -- [lindex $argv 5] -send -- "/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/rabbit_password = guest/rabbit_password = swordfish/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/auth_uri=http:\\/\\/localhost:5000\\/v3/auth_uri=http:\\/\\/" -send -- [lindex $argv 2] -send -- ":5000\\/v3/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/auth_host=localhost/auth_host=" -send -- [lindex $argv 2] -send -- "/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/admin_user=admin/admin_user=AutotestUser/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/admin_password=password/admin_password=swordfish/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/admin_tenant_name=admin/admin_tenant_name=AutotestProject/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "cd mistral\n" -expect "@mistral" -send -- "screen -d -m bash -c 'tox -evenv -- python mistral/cmd/launch.py --server all --config-file etc/mistral.conf'\n" -sleep 120 diff --git a/infra/deploy_mistral_commit.sh b/infra/deploy_mistral_commit.sh deleted file mode 100644 index 06d7e62..0000000 --- a/infra/deploy_mistral_commit.sh +++ /dev/null @@ -1,74 +0,0 @@ -set timeout 200 - -send_user "\n\nStart to login to the test bed...\n\n" - -spawn /usr/bin/ssh [lindex $argv 0]@[lindex $argv 1] -expect "@mistral" - -send -- "sudo su\n" -expect "@mistral" - -send -- "git clone https://github.com/stackforge/mistral -b " -send -- [lindex $argv 3] -send -- "\n" -expect "@mistral" -send -- "cd mistral\n" -expect "@mistral" -send -- "git fetch https://review.openstack.org/stackforge/mistral " -send -- [lindex $argv 6] -send -- " && git checkout FETCH_HEAD\n" -expect "@mistral" -send -- "cd ..\n" -expect "@mistral" - -send -- "cp mistral/etc/mistral.conf.example mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/auth_enable = True/auth_enable = False/\" mistral/etc/mistral.conf\n" -expect "@mistral" -send -- "sed -i \"s/rabbit_host = localhost/rabbit_host = " -send -- [lindex $argv 2] -send -- "/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/rabbit_port = 5672/rabbit_port = " -send -- [lindex $argv 4] -send -- "/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/rabbit_virtual_host = \\//rabbit_virtual_host = " -send -- [lindex $argv 5] -send -- "/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/rabbit_user = guest/rabbit_user = " -send -- [lindex $argv 5] -send -- "/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/rabbit_password = guest/rabbit_password = swordfish/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/auth_uri=http:\\/\\/localhost:5000\\/v3/auth_uri=http:\\/\\/" -send -- [lindex $argv 2] -send -- ":5000\\/v3/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/auth_host=localhost/auth_host=" -send -- [lindex $argv 2] -send -- "/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/admin_user=admin/admin_user=AutotestUser/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/admin_password=password/admin_password=swordfish/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "sed -i \"s/admin_tenant_name=admin/admin_tenant_name=AutotestProject/\" mistral/etc/mistral.conf\n" -expect "@mistral" - -send -- "cd mistral\n" -expect "@mistral" -send -- "screen -d -m bash -c 'tox -evenv -- python mistral/cmd/launch.py --server all --config-file etc/mistral.conf'\n" -sleep 120 diff --git a/infra/deploy_vm.sh b/infra/deploy_vm.sh deleted file mode 100644 index 10d4d55..0000000 --- a/infra/deploy_vm.sh +++ /dev/null @@ -1,101 +0,0 @@ -# Use: -# expect infra/deploy_vm.sh ubuntu 10.100.0.6 172.18.11.4 master 5672 True A002box -# - -set timeout 30 - -send_user "\n\nStart to login to the test bed...\n\n" - -spawn /usr/bin/ssh [lindex $argv 0]@[lindex $argv 1] -expect "@murano" - -send -- "sudo su\n" -expect "@murano" - -send -- "sed -i \"s/LAB_HOST=''/LAB_HOST='" -send -- [lindex $argv 2] -send -- "'/\" /etc/murano-deployment/lab-binding.rc\n" -expect "@murano" - -send -- "sed -i \"s/RABBITMQ_VHOST='A001box'/RABBITMQ_VHOST='" -send -- [lindex $argv 6] -send -- "'/\" /etc/murano-deployment/lab-binding.rc\n" -expect "@murano" - -send -- "sed -i \"s/RABBITMQ_LOGIN='A001box'/RABBITMQ_LOGIN='" -send -- [lindex $argv 6] -send -- "'/\" /etc/murano-deployment/lab-binding.rc\n" -expect "@murano" - -send -- "sed -i \"s/RABBITMQ_PORT=''/RABBITMQ_PORT='" -send -- [lindex $argv 4] -send -- "'/\" /etc/murano-deployment/lab-binding.rc\n" -expect "@murano" - -send -- "sed -i \"s/BRANCH_NAME=''/BRANCH_NAME='" -send -- [lindex $argv 3] -send -- "'/\" /etc/murano-deployment/lab-binding.rc\n" -expect "@murano" -send -- "rm -rf /opt/git\n" -expect "@murano" -send -- "mkdir -p /opt/git\n" -expect "@murano" -send -- "cd /opt/git\n" -expect "@murano" -send -- "git clone https://github.com/stackforge/murano-deployment -b " -send -- [lindex $argv 3] -send -- "\n" -expect "@murano" - -set timeout 600 -send -- "cd murano-deployment/devbox-scripts/\n" -expect "@murano" -send -- "./murano-git-install.sh prerequisites\n" -expect "@murano" -send -- "pip install --upgrade pip==1.4.1\n" -expect "@murano" -send -- "./murano-git-install.sh install\n" -expect "@murano" - -set timeout 30 -send -- "sed -i \"s/connection = sqlite:\\/\\/\\/murano.sqlite/connection = mysql:\\/\\/murano:swordfish@localhost:3306\\/murano/\" /etc/murano/murano-api.conf\n" -expect "@murano" - -send -- "sed -i \"s/ssl = False/ssl = " -send -- [lindex $argv 5] -send -- "/\" /etc/murano/murano-api.conf\n" -expect "@murano" - -send -- "sed -i \"s/ssl = False/ssl = " -send -- [lindex $argv 5] -send -- "/\" /etc/murano/conductor.conf\n" -expect "@murano" - -send -- "sed -i \"s/\\\"BootFromVolume\\\": true,//\" /etc/murano-conductor/data/templates/cf/Linux.template\n" -expect "@murano" -send -- "sed -i \"s/\\\"BootFromVolume\\\": true,//\" /etc/murano-conductor/data/templates/cf/Windows.template\n" -expect "@murano" - -send -- "sed -i \"s/murano_metadata_url = http:\\/\\/localhost:8084\\/v1/murano_metadata_url = http:\\/\\/" -send -- [lindex $argv 1] -send -- ":8084\\/v1/\" /etc/murano/conductor.conf\n" -expect "@murano" - -send -- "echo \"LANGUAGE_CODE='en'\" >> /etc/openstack-dashboard/local_settings.py\n" -expect "@murano" -send -- "sed -i \"s/DEBUG = False/DEBUG = True/\" /etc/openstack-dashboard/local_settings.py\n" -expect -- "@murano" -send -- "service apache2 restart\n" -expect "@murano" -send -- "rm -rf /tmp/muranoconductor-cache/* /tmp/muranorepository-cache/*\n" -expect "@murano" - -send -- "sed -i \"s/disable_rollback=False/disable_rollback=True/\" /usr/local/lib/python2.7/dist-packages/muranoconductor/commands/cloud_formation.py\n" -expect "@murano" - -send -- "service murano-api restart\n" -expect "@murano" -send -- "service murano-conductor restart\n" -expect "@murano" - -send -- "exit\n" diff --git a/infra/deploy_vm_new.sh b/infra/deploy_vm_new.sh deleted file mode 100644 index 04175ca..0000000 --- a/infra/deploy_vm_new.sh +++ /dev/null @@ -1,117 +0,0 @@ -# Use: -# expect infra/deploy_vm.sh ubuntu 10.100.0.6 172.18.11.4 master 5672 True A002box -# - -set timeout 30 - -send_user "\n\nStart to login to the test bed...\n\n" - -spawn /usr/bin/ssh [lindex $argv 0]@[lindex $argv 1] -expect "@murano" - -send -- "sudo su\n" -expect "@murano" - -send -- "sed -i \"s/LAB_HOST=''/LAB_HOST='" -send -- [lindex $argv 2] -send -- "'/\" /etc/murano-deployment/lab-binding.rc\n" -expect "@murano" - -send -- "sed -i \"s/RABBITMQ_VHOST='A001box'/RABBITMQ_VHOST='" -send -- [lindex $argv 6] -send -- "'/\" /etc/murano-deployment/lab-binding.rc\n" -expect "@murano" - -send -- "sed -i \"s/RABBITMQ_LOGIN='A001box'/RABBITMQ_LOGIN='" -send -- [lindex $argv 6] -send -- "'/\" /etc/murano-deployment/lab-binding.rc\n" -expect "@murano" - -send -- "sed -i \"s/RABBITMQ_PORT=''/RABBITMQ_PORT='" -send -- [lindex $argv 4] -send -- "'/\" /etc/murano-deployment/lab-binding.rc\n" -expect "@murano" - -send -- "sed -i \"s/BRANCH_NAME=''/BRANCH_NAME='" -send -- [lindex $argv 3] -send -- "'/\" /etc/murano-deployment/lab-binding.rc\n" -expect "@murano" -send -- "rm -rf /opt/git\n" -expect "@murano" -send -- "mkdir -p /opt/git\n" -expect "@murano" -send -- "cd /opt/git\n" -expect "@murano" -send -- "git clone https://github.com/stackforge/murano-deployment -b " -send -- [lindex $argv 3] -send -- "\n" -expect "@murano" - -set timeout 600 -send -- "cd murano-deployment/devbox-scripts/\n" -expect "@murano" -send -- "./murano-git-install.sh prerequisites\n" -expect "@murano" -send -- "pip install --upgrade pip==1.4.1\n" -expect "@murano" -send -- "./murano-git-install.sh install\n" -expect "@murano" - -set timeout 30 -send -- "sed -i \"s/connection = sqlite:\\/\\/\\/murano.sqlite/connection = mysql:\\/\\/murano:swordfish@localhost:3306\\/murano/\" /etc/murano/murano-api.conf\n" -expect "@murano" - -send -- "sed -i \"s/ssl = False/ssl = " -send -- [lindex $argv 5] -send -- "/\" /etc/murano/murano-api.conf\n" -expect "@murano" - -send -- "sed -i \"s/ssl = False/ssl = " -send -- [lindex $argv 5] -send -- "/\" /etc/murano/conductor.conf\n" -expect "@murano" - -send -- "sed -i \"s/ssl = False/ssl = " -send -- [lindex $argv 5] -send -- "/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" - -send -- "sed -i \"s/murano_metadata_url = http:\\/\\/localhost:8084\\/v1/murano_metadata_url = http:\\/\\/" -send -- [lindex $argv 1] -send -- ":8084\\/v1/\" /etc/murano/conductor.conf\n" -expect "@murano" - -send -- "sed -i \"s/murano_metadata_url = http:\\/\\/localhost:8084\\/v1/murano_metadata_url = http:\\/\\/" -send -- [lindex $argv 1] -send -- ":8084\\/v1/\" /etc/murano/murano-conductor.conf\n" -expect "@murano" - -send -- "echo \"LANGUAGE_CODE='en'\" >> /etc/openstack-dashboard/local_settings.py\n" -expect "@murano" -send -- "sed -i \"s/DEBUG = False/DEBUG = True/\" /etc/openstack-dashboard/local_settings.py\n" -expect -- "@murano" -send -- "service apache2 restart\n" -expect "@murano" -send -- "rm -rf /var/cache/murano/muranoconductor-data/* /var/cache/murano/muranorepository-data/* /var/cache/murano-dashboard/*\n" -expect "@murano" - -send -- "sed -i \"s/disable_rollback=False/disable_rollback=True/\" /usr/local/lib/python2.7/dist-packages/muranoconductor/commands/cloud_formation.py\n" -expect "@murano" - - -send -- "service murano-api restart\n" -expect "@murano" -send -- "service murano-conductor restart\n" -expect "@murano" -send -- "service murano-repository restart\n" -expect "@murano" -send -- "service openstack-murano-api restart\n" -expect "@murano" -send -- "service openstack-murano-conductor restart\n" -expect "@murano" -send -- "service openstack-murano-repository restart\n" -expect "@murano" -send -- "service apache2 restart\n" -expect "@murano" - -send -- "exit\n" diff --git a/infra/deploy_vm_release03.sh b/infra/deploy_vm_release03.sh deleted file mode 100644 index f96196d..0000000 --- a/infra/deploy_vm_release03.sh +++ /dev/null @@ -1,97 +0,0 @@ -# Use: -# expect infra/deploy_vm.sh ubuntu 10.100.0.6 172.18.11.4 master 5672 True A002box -# - -set timeout 30 - -send_user "\n\nStart to login to the test bed...\n\n" - -spawn /usr/bin/ssh [lindex $argv 0]@[lindex $argv 1] -expect "@murano" - -send -- "sudo su\n" -expect "@murano" - -send -- "sed -i \"s/LAB_HOST=''/LAB_HOST='" -send -- [lindex $argv 2] -send -- "'/\" /etc/murano-deployment/lab-binding.rc\n" -expect "@murano" - -send -- "sed -i \"s/RABBITMQ_VHOST='A001box'/RABBITMQ_VHOST='" -send -- [lindex $argv 6] -send -- "'/\" /etc/murano-deployment/lab-binding.rc\n" -expect "@murano" - -send -- "sed -i \"s/RABBITMQ_LOGIN='A001box'/RABBITMQ_LOGIN='" -send -- [lindex $argv 6] -send -- "'/\" /etc/murano-deployment/lab-binding.rc\n" -expect "@murano" - -send -- "sed -i \"s/RABBITMQ_PORT=''/RABBITMQ_PORT='" -send -- [lindex $argv 4] -send -- "'/\" /etc/murano-deployment/lab-binding.rc\n" -expect "@murano" - -send -- "sed -i \"s/BRANCH_NAME=''/BRANCH_NAME='" -send -- [lindex $argv 3] -send -- "'/\" /etc/murano-deployment/lab-binding.rc\n" -expect "@murano" -send -- "rm -rf /opt/git\n" -expect "@murano" -send -- "mkdir -p /opt/git\n" -expect "@murano" -send -- "cd /opt/git\n" -expect "@murano" -send -- "git clone https://github.com/stackforge/murano-deployment -b " -send -- [lindex $argv 3] -send -- "\n" -expect "@murano" - -set timeout 600 -send -- "cd murano-deployment/devbox-scripts/\n" -expect "@murano" -send -- "./murano-git-install.sh prerequisites\n" -expect "@murano" -send -- "./murano-git-install.sh install\n" -expect "@murano" - -set timeout 30 -send -- "sed -i \"s/connection = sqlite:\\/\\/\\/murano.sqlite/connection = mysql:\\/\\/murano:swordfish@localhost:3306\\/murano/\" /etc/murano-api/murano-api.conf\n" -expect "@murano" - -send -- "sed -i \"s/ssl = False/ssl = " -send -- [lindex $argv 5] -send -- "/\" /etc/murano-api/murano-api.conf\n" -expect "@murano" - -send -- "sed -i \"s/ssl = False/ssl = " -send -- [lindex $argv 5] -send -- "/\" /etc/murano-conductor/conductor.conf\n" -expect "@murano" - -send -- "sed -i \"s/port = 5672/port = " -send -- [lindex $argv 4] -send -- "/\" /etc/murano-conductor/conductor.conf\n" -expect "@murano" - -send -- "sed -i \"s/port = 5672/port = " -send -- [lindex $argv 4] -send -- "/\" /etc/murano-api/murano-api.conf\n" -expect "@murano" - -send -- "sed -i \"s/\\\"BootFromVolume\\\": true,//\" /etc/murano-conductor/data/templates/cf/Linux.template\n" -expect "@murano" -send -- "sed -i \"s/\\\"BootFromVolume\\\": true,//\" /etc/murano-conductor/data/templates/cf/Windows.template\n" -expect "@murano" - -send -- "service murano-api restart\n" -expect "@murano" -send -- "service murano-conductor restart\n" -expect "@murano" - -send -- "echo \"LANGUAGE_CODE='en'\" >> /etc/openstack-dashboard/local_settings.py\n" -expect "@murano" -send -- "service apache2 restart\n" -expect "@murano" - -send -- "exit\n" diff --git a/infra/deployment_monitor.py b/infra/deployment_monitor.py deleted file mode 100644 index 8e471a5..0000000 --- a/infra/deployment_monitor.py +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the 'License'); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import os -import json -from flask import Flask, jsonify, request, abort, send_from_directory -from werkzeug import secure_filename - - -app = Flask(__name__) -hosts = {} - - -def save_config(): - with open('server.conf', 'w') as config_file: - json.dump(hosts, config_file) - - -def read_config(): - global hosts - with open('server.conf', 'r') as config_file: - hosts = json.load(config_file) - - -@app.route('/hosts', methods=['GET']) -def get_list_of_hosts(): - return jsonify({'hosts': hosts}) - - -@app.route('/hosts', methods=['POST']) -def add_host(): - data = json.loads(request.data) - - if not 'host_name' in data or not 'ip' in data: - abort(403) - - hosts.update({data['host_name']: {'ip': data['ip'], - 'files': []}}) - save_config() - - return jsonify({'hosts': hosts}), 201 - - -@app.route('/hosts/', methods=['GET']) -def get_host(host_name): - if not host_name in hosts: - abort(404) - - return jsonify({'host': hosts[host_name]}) - - -@app.route('/hosts/', methods=['DELETE']) -def delete_host(host_name): - if not host_name in hosts: - abort(404) - - del hosts[host_name] - save_config() - - return 'OK', 200 - - -@app.route('/hosts//files', methods=['POST']) -def add_file(host_name): - if not host_name in hosts: - abort(404) - - for param, file_ in request.files: - if not file_name in hosts[host_name]['files']: - hosts[host_name]['files'].append(file_.filename) - - directory = os.path.join('/var/monitor/files', host_name) - - if not os.path.exists(directory): - os.makedirs(directory) - - full_name = os.path.join(directory, secure_filename(file_.filename)) - file_.save(full_name) - - save_config() - - return jsonify({'host': hosts[host_name]}) - - -@app.route('/hosts//files/', - methods=['GET']) -def get_file(host_name, file_name): - - if not host_name in hosts: - return "Host does not exist", 404 - - if not file_name in hosts[host_name]['files']: - return "File does not exist", 404 - - path = os.path.join('/var/monitor/files', host_name) - return send_from_directory(path, file_name) - - -if __name__ == '__main__': - read_config() - app.run(debug=True, port=7007) diff --git a/infra/merge_robot_results.py b/infra/merge_robot_results.py deleted file mode 100644 index 32e4a7b..0000000 --- a/infra/merge_robot_results.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the 'License'); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -msg = """ - ### Please use this script for the - ### XML RobotFramework reports merging: - ### python merge_robot_results.py output1.xml output2.xml - """ - -### To install requirements: -### sudo pip install BeautifulSoup4 python-dateutil -import sys -from dateutil import parser -from bs4 import BeautifulSoup -import codecs - -files = [] -for i in range(len(sys.argv) - 1): - try: - f = codecs.open(sys.argv[i + 1], 'r', 'utf-8').read() - res = BeautifulSoup(f) - files.append(res) - except: - print "Incorrect XML file:", sys.argv[i + 1] - -if files: - for test in files[0].robot.suite.find_all('test'): - for f in files[1:]: - for retest in f.robot.suite.find_all('test'): - if test['name'] == retest['name']: - test.replace_with(retest) - - if files[0].robot.statistics: - files[0].robot.statistics.replace_with('') - - result = open('result.xml', 'w') - result.write(files[0].prettify()) - result.close() -else: - print msg diff --git a/infra/repository_mirroring.sh b/infra/repository_mirroring.sh deleted file mode 100644 index 084cf3e..0000000 --- a/infra/repository_mirroring.sh +++ /dev/null @@ -1,47 +0,0 @@ -### -### Use: -### expect repository-mirroring.sh root 10.10.10.10 gerrit-user murano-api -### - -### Manual way is the following: -### 1. git clone --mirror https://github.com/stackforge/murano-api.git -### 2. cd murano-api.git/ -### 3. git fetch origin +refs/meta/*:refs/meta/* -### 4. git push --mirror ssh://tnurlygayanov@gerrit.mirantis.com:29418/murano/murano-api.git -### -### after that you should not perform Step #3 again. - -set timeout 1200 - -send_user "\n\nStart to login to the test bed...\n\n" - -spawn /usr/bin/ssh [lindex $argv 0]@[lindex $argv 1] -expect "password" -send -- [lindex $argv 2] -send -- "\n" -expect "*@reposync*" - -send -- "sudo su\n" -expect "*#*" - -send -- "git clone --mirror https://github.com/stackforge/" -send -- [lindex $argv 4] -send -- ".git\n" -expect "*#*" - -send -- "cd " -send -- [lindex $argv 4] -send -- ".git\n" -expect "*#*" - -send -- "git fetch\n" -expect "*#*" - -send -- "git push --mirror ssh://" -send -- [lindex $argv 3] -send -- "@gerrit.mirantis.com:29418/openstack/" -send -- [lindex $argv 4] -send -- ".git\n" -expect "*#*" - -send -- "exit\n" diff --git a/infra/revert_esx_vm.py b/infra/revert_esx_vm.py deleted file mode 100644 index 03b4e60..0000000 --- a/infra/revert_esx_vm.py +++ /dev/null @@ -1,9 +0,0 @@ -import sys -from pysphere import VIServer -server = VIServer() -server.connect(sys.argv[1], sys.argv[2], sys.argv[3]) - -vm = server.get_vm_by_name(sys.argv[4]) -vm.revert_to_snapshot() - -print "VM prepared." diff --git a/infra/revert_vm.py b/infra/revert_vm.py deleted file mode 100644 index 3c0b067..0000000 --- a/infra/revert_vm.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 2013 OpenStack Foundation -# Copyright 2013 Mirantis Inc -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import time -import argparse -import novaclient.v1_1.client as nova_client - -parser = argparse.ArgumentParser() -parser.add_argument('--user', type=str, default='admin') -parser.add_argument('--password', type=str, default='password') -parser.add_argument('--tenant', type=str, default='admin') -parser.add_argument('--keystone_url', type=str, - default='http://localhost:5000/v2.0/') -parser.add_argument('--instance_name', type=str) -parser.add_argument('--snapshot_name', type=str) -args = parser.parse_args() - -nova = nova_client.Client(args.user, args.password, args.tenant, - args.keystone_url, service_type = 'compute') - -image = nova.images.find(name=args.snapshot_name) -server = nova.servers.find(name=args.instance_name) - -server.rebuild(image) -time.sleep(2) # Wait until the start of recovery -server = nova.servers.find(name=args.instance_name) -while server.status == 'REBUILD': - server = nova.servers.find(name=args.instance_name) - -if server.status != 'ACTIVE': - server.start() diff --git a/infra/sql_HA_configure.sh b/infra/sql_HA_configure.sh deleted file mode 100644 index f412021..0000000 --- a/infra/sql_HA_configure.sh +++ /dev/null @@ -1,16 +0,0 @@ -set timeout 30 - -send_user "\n\nStart to login to the test bed...\n\n" - -spawn /usr/bin/ssh [lindex $argv 0]@[lindex $argv 1] -expect "@murano" - -send -- "sudo su\n" -expect "@murano" -send -- "sed -i \"s/connection = mysql:\\/\\/murano:swordfish@localhost:3306\\/murano/connection = mysql:\\/\\/murano:swordfish@" -send -- [lindex $argv 2] -send -- ":3306\\/murano/\" /etc/murano-api/murano-api.conf\n" -expect "@murano" -send -- "service murano-api restart\n" -expect "@murano" -send -- "exit\n" diff --git a/integration-tests/__init__.py b/integration-tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/integration-tests/base.py b/integration-tests/base.py deleted file mode 100644 index 3334971..0000000 --- a/integration-tests/base.py +++ /dev/null @@ -1,26 +0,0 @@ -from v1.murano_client import murano_client as Client -import etc.config as cfg -import testtools -import testresources - - -class MuranoBase(testtools.TestCase, testtools.testcase.WithAttributes, - testresources.ResourcedTestCase): - - @classmethod - def setUpClass(cls): - super(MuranoBase, cls).setUpClass() - cls.client = Client(user=cfg.murano.user, password=cfg.murano.password, - tenant=cfg.murano.tenant, - auth_url=cfg.murano.auth_url, - base_url=cfg.murano.murano_url) - cls.environments = [] - - def tearDown(self): - super(MuranoBase, self).tearDown() - for env in self.environments: - try: - self.client.delete_environment(env) - except Exception: - pass - diff --git a/integration-tests/etc/__init__.py b/integration-tests/etc/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/integration-tests/etc/config.conf b/integration-tests/etc/config.conf deleted file mode 100644 index 755b4de..0000000 --- a/integration-tests/etc/config.conf +++ /dev/null @@ -1,6 +0,0 @@ -[murano] -auth_url = http://127.0.0.1:5000/v2.0/ -murano_url = http://127.0.0.1:8082 -user = admin -password = admin -tenant = admin diff --git a/integration-tests/etc/config.py b/integration-tests/etc/config.py deleted file mode 100644 index 0ae07c1..0000000 --- a/integration-tests/etc/config.py +++ /dev/null @@ -1,38 +0,0 @@ -import os -from oslo.config import cfg - - -murano_group = cfg.OptGroup(name='murano', title="murano") - -MuranoGroup = [ - cfg.StrOpt('auth_url', - default='http://127.0.0.1:5000/v2.0/', - help="keystone url"), - cfg.StrOpt('murano_url', - default='http://127.0.0.1:8082', - help="murano url"), - cfg.StrOpt('user', - default='admin', - help="keystone user"), - cfg.StrOpt('password', - default='pass', - help="password for keystone user"), - cfg.StrOpt('tenant', - default='admin', - help='keystone tenant') -] - - -def register_config(config, config_group, config_opts): - - config.register_group(config_group) - config.register_opts(config_opts, config_group) - -path = os.path.join("%s/etc/config.conf" % os.getcwd()) - -if os.path.exists(path): - cfg.CONF([], project='muranointegration', default_config_files=[path]) - -register_config(cfg.CONF, murano_group, MuranoGroup) - -murano = cfg.CONF.murano diff --git a/integration-tests/test_murano.py b/integration-tests/test_murano.py deleted file mode 100644 index 86878c8..0000000 --- a/integration-tests/test_murano.py +++ /dev/null @@ -1,17 +0,0 @@ -import sys -import os -sys.path.append(os.getcwd()) -from base import MuranoBase - - -class MuranoEnvs(MuranoBase): - - def test_create_and_delete_environment(self): - resp = self.client.create_environment('test') - self.environments.append(resp.json()['id']) - self.assertEqual(resp.status_code, 200) - self.assertEqual(resp.json()['name'], 'test') - env = self.client.get_list_environments().json()['environments'][0]['name'] - self.assertEqual(env, 'test') - resp = self.client.delete_environment(resp.json()['id']) - self.assertEqual(resp.status_code, 200) diff --git a/integration-tests/v1/__init__.py b/integration-tests/v1/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/integration-tests/v1/murano_client.py b/integration-tests/v1/murano_client.py deleted file mode 100644 index 42a42c9..0000000 --- a/integration-tests/v1/murano_client.py +++ /dev/null @@ -1,80 +0,0 @@ -import requests -import json -from keystoneclient.v2_0 import client as ksclient - -class Client(object): - def __init__(self, user, password, tenant, auth_url, base_url): - self.auth = ksclient.Client(username=user, password=password, - tenant_name=tenant, auth_url=auth_url) - self.headers = {'X-Auth-Token': self.auth.auth_token} - if base_url[-1] == '/': - self.url = base_url - else: - self.url = base_url + '/' - self.TYPE = 'json' - - def get(self, path, headers=None, TYPE=None): - if headers is None: - headers = self.headers - if TYPE is None: - headers.update({'Content-Type': 'application/%s' % self.TYPE}) - else: - headers.update({'Content-Type': TYPE}) - url = self.url + path - resp = requests.get(url, headers=headers) - return resp - - def delete(self, path, headers=None, TYPE=None): - if headers is None: - headers = self.headers - if TYPE is None: - headers.update({'Content-Type': 'application/%s' % self.TYPE}) - else: - headers.update({'Content-Type': TYPE}) - url = self.url + path - resp = requests.delete(url, headers=headers) - return resp - - def post(self, path, body=None, files=None, headers=None, TYPE=None): - if headers is None: - headers = self.headers - if TYPE is None: - headers.update({'Content-Type': 'application/%s' % self.TYPE}) - else: - headers.update({'Content-Type': TYPE}) - url = self.url + path - resp = requests.post(url, data=body, files=files, headers=headers) - return resp - - def put(self, path, body=None, files=None, headers=None, TYPE=None): - if headers is None: - headers = self.headers - if TYPE is None: - headers.update({'Content-Type': 'application/%s' % self.TYPE}) - else: - headers.update({'Content-Type': TYPE}) - url = self.url + path - resp = requests.put(url, data=body, files=files, headers=headers) - return resp - -class murano_client(Client): - - def __init__(self, user, password, tenant, auth_url, base_url): - super(murano_client, self).__init__(user, password, tenant, auth_url, - base_url) - - def create_environment(self, name): - post_body = {'name': name} - post_body = json.dumps(post_body) - resp = self.post('environments', body=post_body, headers=self.headers) - return resp - - def delete_environment(self, environment_id): - resp = self.delete('environments/%s' % environment_id, - headers=self.headers) - return resp - - def get_list_environments(self): - resp = self.get('environments', headers=self.headers) - return resp - diff --git a/integrationtests/__init__.py b/integrationtests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/integrationtests/base.py b/integrationtests/base.py deleted file mode 100644 index f92cb55..0000000 --- a/integrationtests/base.py +++ /dev/null @@ -1,765 +0,0 @@ -from keystoneclient.v2_0 import client as ksclient -from muranoclient.v1.client import Client as murano_client -from glanceclient import Client as gclient -import testtools -import testresources -import config as cfg -import json -import time - - -class MuranoBase(testtools.TestCase, testtools.testcase.WithAttributes, - testresources.ResourcedTestCase): - - @classmethod - def setUpClass(cls): - super(MuranoBase, cls).setUpClass() - - cls.auth = ksclient.Client(username=cfg.murano.user, - password=cfg.murano.password, - tenant_name=cfg.murano.tenant, - auth_url=cfg.murano.auth_url) - - cls.murano = murano_client(endpoint=cfg.murano.murano_url, - token=cls.auth.auth_token) - - def setUp(self): - super(MuranoBase, self).setUp() - - self.environments_id = [] - - def tearDown(self): - super(MuranoBase, self).tearDown() - - for environment_id in self.environments_id: - - try: - self.murano.environments.delete(environment_id) - - except Exception: - pass - - def create_demo_service(self, environment_id, session_id, - image_name="demo"): - post_body = {"availabilityZone": "nova", "name": "demo", - "unitNamingPattern": "host", - "osImage": {"type": "cirros.demo", "name": image_name, - "title": "Demo"}, - "units": [{}], "flavor": "m1.small", - "configuration": "standalone", "type": "demoService"} - - return self.murano.services.post(environment_id, - path='/', - data=post_body, - session_id=session_id) - - def create_linux_telnet(self, environment_id, session_id, - image_name="linux"): - post_body = {"availabilityZone": "nova", "name": "LinuxTelnet", - "deployTelnet": True, "unitNamingPattern": "telnet", - "keyPair": "murano-lb-key", - "osImage": {"type": "linux", "name": image_name, - "title": "Linux Image"}, - "units": [{}], - "flavor": "m1.small", "type": "linuxTelnetService"} - - return self.murano.services.post(environment_id, - path='/', - data=post_body, - session_id=session_id) - - def create_linux_apache(self, environment_id, session_id, - image_name="linux"): - post_body = {"availabilityZone": "nova", "name": "LinuxApache", - "deployApachePHP": True, "unitNamingPattern": "apache", - "keyPair": "murano-lb-key", - "instanceCount": [{}], - "osImage": {"type": "linux", "name": image_name, - "title": "Linux Image"}, - "units": [{}], - "flavor": "m1.small", "type": "linuxApacheService"} - - return self.murano.services.post(environment_id, - path='/', - data=post_body, - session_id=session_id) - - def create_windows_active_directory(self, environment_id, session_id, - image_name="windows"): - post_body = {"type": "activeDirectory", "name": "ad.local", - "adminPassword": "P@ssw0rd", "domain": "ad.local", - "availabilityZone": "nova", - "unitNamingPattern": "adinstance", - "flavor": "m1.medium", "osImage": - {"type": "ws-2012-std", "name": image_name, - "title": "Windows Server 2012 Standard"}, - "configuration": "standalone", - "units": [{"isMaster": True, - "recoveryPassword": "P@ssw0rd", - "location": "west-dc"}]} - - return self.murano.services.post(environment_id, - path='/', - data=post_body, - session_id=session_id) - - def create_windows_iis(self, environment_id, session_id, domain_name="", - image_name="windows"): - post_body = {"type": "webServer", "domain": domain_name, - "availabilityZone": "nova", "name": "IisService", - "adminPassword": "P@ssw0rd", - "unitNamingPattern": "iisinstance", - "osImage": {"type": "ws-2012-std", "name": image_name, - "title": "Windows Server 2012 Standard"}, - "units": [{}], - "credentials": {"username": "Administrator", - "password": "P@ssw0rd"}, - "flavor": "m1.medium"} - - return self.murano.services.post(environment_id, - path='/', - data=post_body, - session_id=session_id) - - def create_windows_aspnet(self, environment_id, session_id, - domain_name="", image_name="windows"): - post_body = {"type": "aspNetApp", "domain": domain_name, - "availabilityZone": "nova", - "name": "someasp", "repository": - "git://github.com/Mirantis/murano-mvc-demo.git", - "adminPassword": "P@ssw0rd", - "unitNamingPattern": "aspnetinstance", - "osImage": {"type": "ws-2012-std", "name": image_name, - "title": "Windows Server 2012 Standard"}, - "units": [{}], - "credentials": {"username": "Administrator", - "password": "P@ssw0rd"}, - "flavor": "m1.medium"} - - return self.murano.services.post(environment_id, - path='/', - data=post_body, - session_id=session_id) - - def create_windows_iis_farm(self, environment_id, session_id, - domain_name="", image_name="windows"): - post_body = {"type": "webServerFarm", "domain": domain_name, - "availabilityZone": "nova", "name": "someIISFARM", - "adminPassword": "P@ssw0rd", "loadBalancerPort": 80, - "unitNamingPattern": "", - "osImage": {"type": "ws-2012-std", "name": image_name, - "title": "Windows Server 2012 Standard"}, - "units": [{}, {}], - "credentials": {"username": "Administrator", - "password": "P@ssw0rd"}, - "flavor": "m1.medium"} - - return self.murano.services.post(environment_id, - path='/', - data=post_body, - session_id=session_id) - - def create_windows_aspnet_farm(self, environment_id, session_id, - domain_name="", image_name="windows"): - post_body = {"type": "aspNetAppFarm", "domain": domain_name, - "availabilityZone": "nova", "name": "SomeApsFarm", - "repository": - "git://github.com/Mirantis/murano-mvc-demo.git", - "adminPassword": "P@ssw0rd", "loadBalancerPort": 80, - "unitNamingPattern": "", - "osImage": {"type": "ws-2012-std", "name": image_name, - "title": "Windows Server 2012 Standard"}, - "units": [{}, {}], - "credentials": {"username": "Administrator", - "password": "P@ssw0rd"}, - "flavor": "m1.medium"} - - return self.murano.services.post(environment_id, - path='/', - data=post_body, - session_id=session_id) - - def create_windows_sql(self, environment_id, session_id, domain_name="", - image_name="windows"): - post_body = {"type": "msSqlServer", "domain": domain_name, - "availabilityZone": "nova", "name": "SQLSERVER", - "adminPassword": "P@ssw0rd", - "unitNamingPattern": "sqlinstance", - "saPassword": "P@ssw0rd", "mixedModeAuth": True, - "osImage": {"type": "ws-2012-std", "name": image_name, - "title": "Windows Server 2012 Standard"}, - "units": [{}], - "credentials": {"username": "Administrator", - "password": "P@ssw0rd"}, - "flavor": "m1.medium"} - - return self.murano.services.post(environment_id, - path='/', - data=post_body, - session_id=session_id) - - def create_windows_sql_cluster(self, environment_id, session_id, - domain_name="", image_name="windows"): - post_body = {"domain": domain_name, "domainAdminPassword": "P@ssw0rd", - "externalAD": False, - "sqlServiceUserName": "Administrator", - "sqlServicePassword": "P@ssw0rd", - "osImage": {"type": "ws-2012-std", "name": image_name, - "title": "Windows Server 2012 Standard"}, - "agListenerName": "SomeSQL_AGListner", - "flavor": "m1.medium", - "agGroupName": "SomeSQL_AG", - "domainAdminUserName": "Administrator", - "agListenerIP": "10.0.0.150", - "clusterIP": "10.0.0.155", - "type": "msSqlClusterServer", "availabilityZone": "nova", - "adminPassword": "P@ssw0rd", - "clusterName": "SomeSQL", "mixedModeAuth": True, - "unitNamingPattern": "", - "units": [{"isMaster": True, "name": "node1", - "isSync": True}, - {"isMaster": False, "name": "node2", - "isSync": True}], - "name": "Sqlname", "saPassword": "P@ssw0rd", - "databases": ['NewDB']} - - return self.murano.services.post(environment_id, - path='/', - data=post_body, - session_id=session_id) - - -class MuranoEnvironments(MuranoBase): - - def test_create_and_delete_environment(self): - environment = self.murano.environments.create('testenv') - self.environments_id.append(environment.id) - - self.assertIn(environment, self.murano.environments.list()) - self.murano.environments.delete(environment.id) - self.assertNotIn(environment, self.murano.environments.list()) - - self.environments_id.pop(self.environments_id.index(environment.id)) - - def test_get_environments_list(self): - environments_list = self.murano.environments.list() - self.assertTrue(isinstance(environments_list, list)) - - def test_update_environment(self): - environment = self.murano.environments.create('testenv') - self.environments_id.append(environment.id) - - new_environment = self.murano.environments.update(environment.id, - 'testenvupdated') - - self.assertEqual(new_environment.name, 'testenvupdated') - - def test_get_environment(self): - environment = self.murano.environments.create('testenv') - self.environments_id.append(environment.id) - - gotten_environment = self.murano.environments.get(environment.id) - - self.assertEqual(environment, gotten_environment) - - -class MuranoSessions(MuranoBase): - - def test_create_and_delete_session(self): - environment = self.murano.environments.create('testenv') - self.environments_id.append(environment.id) - - session = self.murano.sessions.configure(environment.id) - self.assertEqual(session.environment_id, environment.id) - - self.murano.sessions.delete(environment.id, session.id) - - def test_get_session(self): - environment = self.murano.environments.create('testenv') - self.environments_id.append(environment.id) - - session = self.murano.sessions.configure(environment.id) - - gotten_session = self.murano.sessions.get(environment.id, session.id) - - self.assertEqual(session, gotten_session) - - -class MuranoServices(MuranoBase): - - def test_create_and_delete_demo_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - service = self.create_demo_service(environment.id, session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertIn((service.name, service.id), services) - - self.murano.services.delete(environment.id, - '/' + service.id, - session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertNotIn((service.name, service.id), services) - - def test_create_and_delete_linux_telnet_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - service = self.create_linux_telnet(environment.id, session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertIn((service.name, service.id), services) - - self.murano.services.delete(environment.id, - '/' + service.id, - session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertNotIn((service.name, service.id), services) - - def test_create_and_delete_linux_apache_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - service = self.create_linux_apache(environment.id, session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertIn((service.name, service.id), services) - - self.murano.services.delete(environment.id, - '/' + service.id, - session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertNotIn((service.name, service.id), services) - - def test_create_and_delete_windows_active_directory_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - service = self.create_windows_active_directory(environment.id, - session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertIn((service.name, service.id), services) - - self.murano.services.delete(environment.id, - '/' + service.id, - session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertNotIn((service.name, service.id), services) - - def test_create_and_delete_windows_iis_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - service = self.create_windows_iis(environment.id, session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertIn((service.name, service.id), services) - - self.murano.services.delete(environment.id, - '/' + service.id, - session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertNotIn((service.name, service.id), services) - - def test_create_and_delete_windows_aspnet_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - service = self.create_windows_aspnet(environment.id, session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertIn((service.name, service.id), services) - - self.murano.services.delete(environment.id, - '/' + service.id, - session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertNotIn((service.name, service.id), services) - - def test_create_and_delete_windows_iis_farm_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - service = self.create_windows_iis_farm(environment.id, session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertIn((service.name, service.id), services) - - self.murano.services.delete(environment.id, - '/' + service.id, - session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertNotIn((service.name, service.id), services) - - def test_create_and_delete_windows_aspnet_farm_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - service = self.create_windows_aspnet_farm(environment.id, session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertIn((service.name, service.id), services) - - self.murano.services.delete(environment.id, - '/' + service.id, - session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertNotIn((service.name, service.id), services) - - def test_create_and_delete_windows_sql_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - service = self.create_windows_sql(environment.id, session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertIn((service.name, service.id), services) - - self.murano.services.delete(environment.id, - '/' + service.id, - session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertNotIn((service.name, service.id), services) - - def test_create_and_delete_windows_sql_cluster_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - service = self.create_windows_sql_cluster(environment.id, session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertIn((service.name, service.id), services) - - self.murano.services.delete(environment.id, - '/' + service.id, - session.id) - - gotten_environment = self.murano.environments.get(environment.id, - session.id) - - services = [(x['name'], x['id']) for x in gotten_environment.services] - self.assertNotIn((service.name, service.id), services) - - -class ImageException(Exception): - message = "Image doesn't exist" - - def __init__(self, type): - self._error_string = self.message + '\nDetails: %s' \ - ' image is not found,' % str(type) - - def __str__(self): - return self._error_string - - -class MuranoDeploy(MuranoBase): - - @classmethod - def setUpClass(cls): - super(MuranoDeploy, cls).setUpClass() - - if not cfg.murano.deploy: - raise cls.skipException("Murano deployment tests are disabled") - - glance_endpoint = cls.auth.service_catalog.url_for( - service_type='image', endpoint_type='publicURL') - glance = gclient('1', endpoint=glance_endpoint, - token=cls.auth.auth_token) - - image_list = [] - for i in glance.images.list(): - image_list.append(i) - - cls.demo_image = cls.get_image_name('demo', image_list) - cls.linux_image = cls.get_image_name('linux', image_list) - cls.windows_image = cls.get_image_name('windows', image_list) - - @classmethod - def get_image_name(cls, type_of_image, list_of_images): - for i in list_of_images: - if 'murano_image_info' in i.properties.keys(): - if type_of_image in json.loads( - i.properties['murano_image_info'])['type']: - return i.name - raise ImageException(type_of_image) - - def test_deploy_demo_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - self.create_demo_service(environment.id, session.id, - image_name=self.demo_image) - self.murano.sessions.deploy(environment.id, session.id) - - time_start = time.time() - gotten_environment = self.murano.environments.get(environment.id) - - while gotten_environment.status != 'ready': - if time.time() - time_start > 1000: - break - gotten_environment = self.murano.environments.get(environment.id) - - deployments = self.murano.deployments.list(environment.id) - self.assertEqual(deployments[0].state, 'success') - - def test_deploy_linux_telnet_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - self.create_linux_telnet(environment.id, session.id, - image_name=self.linux_image) - self.murano.sessions.deploy(environment.id, session.id) - - time_start = time.time() - gotten_environment = self.murano.environments.get(environment.id) - - while gotten_environment.status != 'ready': - if time.time() - time_start > 1800: - break - gotten_environment = self.murano.environments.get(environment.id) - - deployments = self.murano.deployments.list(environment.id) - self.assertEqual(deployments[0].state, 'success') - - def test_deploy_linux_apache_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - self.create_linux_apache(environment.id, session.id, - image_name=self.linux_image) - self.murano.sessions.deploy(environment.id, session.id) - - time_start = time.time() - gotten_environment = self.murano.environments.get(environment.id) - - while gotten_environment.status != 'ready': - if time.time() - time_start > 1800: - break - gotten_environment = self.murano.environments.get(environment.id) - - deployments = self.murano.deployments.list(environment.id) - self.assertEqual(deployments[0].state, 'success') - - def test_deploy_windows_ad_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - self.create_windows_active_directory(environment.id, session.id, - image_name=self.windows_image) - self.murano.sessions.deploy(environment.id, session.id) - - time_start = time.time() - gotten_environment = self.murano.environments.get(environment.id) - - while gotten_environment.status != 'ready': - if time.time() - time_start > 1800: - break - gotten_environment = self.murano.environments.get(environment.id) - - deployments = self.murano.deployments.list(environment.id) - self.assertEqual(deployments[0].state, 'success') - - def test_deploy_windows_iis_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - self.create_windows_iis(environment.id, session.id, - image_name=self.windows_image) - self.murano.sessions.deploy(environment.id, session.id) - - time_start = time.time() - gotten_environment = self.murano.environments.get(environment.id) - - while gotten_environment.status != 'ready': - if time.time() - time_start > 1800: - break - gotten_environment = self.murano.environments.get(environment.id) - - deployments = self.murano.deployments.list(environment.id) - self.assertEqual(deployments[0].state, 'success') - - def test_deploy_windows_aspnet_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - self.create_windows_aspnet(environment.id, session.id, - image_name=self.windows_image) - self.murano.sessions.deploy(environment.id, session.id) - - time_start = time.time() - gotten_environment = self.murano.environments.get(environment.id) - - while gotten_environment.status != 'ready': - if time.time() - time_start > 1800: - break - gotten_environment = self.murano.environments.get(environment.id) - - deployments = self.murano.deployments.list(environment.id) - self.assertEqual(deployments[0].state, 'success') - - def test_deploy_windows_iis_farm_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - self.create_windows_iis_farm(environment.id, session.id, - image_name=self.windows_image) - self.murano.sessions.deploy(environment.id, session.id) - - time_start = time.time() - gotten_environment = self.murano.environments.get(environment.id) - - while gotten_environment.status != 'ready': - if time.time() - time_start > 1800: - break - gotten_environment = self.murano.environments.get(environment.id) - - deployments = self.murano.deployments.list(environment.id) - self.assertEqual(deployments[0].state, 'success') - - def test_deploy_windows_aspnet_farm_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - self.create_windows_aspnet_farm(environment.id, session.id, - image_name=self.windows_image) - self.murano.sessions.deploy(environment.id, session.id) - - time_start = time.time() - gotten_environment = self.murano.environments.get(environment.id) - - while gotten_environment.status != 'ready': - if time.time() - time_start > 1800: - break - gotten_environment = self.murano.environments.get(environment.id) - - deployments = self.murano.deployments.list(environment.id) - self.assertEqual(deployments[0].state, 'success') - - def test_deploy_windows_sql_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - self.create_windows_sql(environment.id, session.id, - image_name=self.windows_image) - self.murano.sessions.deploy(environment.id, session.id) - - time_start = time.time() - gotten_environment = self.murano.environments.get(environment.id) - - while gotten_environment.status != 'ready': - if time.time() - time_start > 1800: - break - gotten_environment = self.murano.environments.get(environment.id) - - deployments = self.murano.deployments.list(environment.id) - self.assertEqual(deployments[0].state, 'success') - - def test_deploy_windows_sql_cluster_service(self): - environment = self.murano.environments.create('testenv') - session = self.murano.sessions.configure(environment.id) - self.environments_id.append(environment.id) - - self.create_windows_active_directory(environment.id, session.id, - image_name=self.windows_image) - self.create_windows_sql_cluster(environment.id, session.id, - domain_name="ad.local", - image_name=self.windows_image) - self.murano.sessions.deploy(environment.id, session.id) - - time_start = time.time() - gotten_environment = self.murano.environments.get(environment.id) - - while gotten_environment.status != 'ready': - if time.time() - time_start > 3000: - break - gotten_environment = self.murano.environments.get(environment.id) - - deployments = self.murano.deployments.list(environment.id) - self.assertEqual(deployments[0].state, 'success') \ No newline at end of file diff --git a/integrationtests/config.conf b/integrationtests/config.conf deleted file mode 100644 index 538a7ce..0000000 --- a/integrationtests/config.conf +++ /dev/null @@ -1,7 +0,0 @@ -[murano] -auth_url = http://localhost:5000/v2.0/ -murano_url = http://localhost:8082 -user = admin -password = admin -tenant = admin -deploy = False diff --git a/integrationtests/config.py b/integrationtests/config.py deleted file mode 100644 index 853561a..0000000 --- a/integrationtests/config.py +++ /dev/null @@ -1,41 +0,0 @@ -import os -from oslo.config import cfg - - -murano_group = cfg.OptGroup(name='murano', title="murano") - -MuranoGroup = [ - cfg.StrOpt('auth_url', - default='http://127.0.0.1:5000/v2.0/', - help="keystone url"), - cfg.StrOpt('murano_url', - default='http://127.0.0.1:8082', - help="murano url"), - cfg.StrOpt('user', - default='admin', - help="keystone user"), - cfg.StrOpt('password', - default='pass', - help="password for keystone user"), - cfg.StrOpt('tenant', - default='admin', - help='keystone tenant'), - cfg.BoolOpt('deploy', - default=False, - help='Run deploy tests or no') -] - - -def register_config(config, config_group, config_opts): - - config.register_group(config_group) - config.register_opts(config_opts, config_group) - -path = os.path.join("%s/config.conf" % os.getcwd()) - -if os.path.exists(path): - cfg.CONF([], project='muranointegration', default_config_files=[path]) - -register_config(cfg.CONF, murano_group, MuranoGroup) - -murano = cfg.CONF.murano diff --git a/integrationtests/requirements.txt b/integrationtests/requirements.txt deleted file mode 100644 index ca0803e..0000000 --- a/integrationtests/requirements.txt +++ /dev/null @@ -1,11 +0,0 @@ -oslo.config>=1.2.0 -python-keystoneclient>=0.6.0 -testresources>=0.2.4 -testtools>=0.9.34 -python-glanceclient>=0.9.0 -simplejson>=2.0.9 -jsonpatch>=1.1 -jsonpath-rw>=1.2.0,<2.0 -jsonrpclib -jsonschema>=2.0.0,<3.0.0 -python-muranoclient diff --git a/mistral/smoke_tests.py b/mistral/smoke_tests.py deleted file mode 100644 index 8048eb9..0000000 --- a/mistral/smoke_tests.py +++ /dev/null @@ -1,16 +0,0 @@ -import requests -from keystoneclient.v2_0 import client -keystone = client.Client(username='admin', password='swordfish', - tenant_name='admin', - auth_url='http://172.18.124.203:5000/v2.0/') - -headers = {'Content-Type': 'application/json', - 'X-Auth-Token': str(keystone.auth_token)} - -r = requests.get('http://localhost:8989/', headers=headers) -print r.text -r = requests.get('http://localhost:8989/v1/', headers=headers) -print r.text -r = requests.get('http://localhost:8989/v1/workbooks', headers=headers) -print r.text - diff --git a/modified_workflow/AD.xml b/modified_workflow/AD.xml deleted file mode 100644 index 5e4a885..0000000 --- a/modified_workflow/AD.xml +++ /dev/null @@ -1,379 +0,0 @@ - - - - - Creating instance ) - - - - - - - - - - - - ( - Unable to deploy instance ) due to - - - - - - - - - - Unable to set admin password on unit ) due to - - - - - - - - - - Unable to set domain administrator password on unit ) due to - Creating Primary Domain Controller on unit ) - - - - - - - - - - - - - - - Primary Domain Controller created - - - - - ( - - - - - - - - - - - - - - - Unable assign DNS IP on unit ) due to - - - - - - - - - - ( - - - - - - ( - - - - - - - - - - - - /$.services[?(@.type == 'activeDirectory' and @.domain == ' - - - - - - - - - - - - - Unit ) has joined domain - Unit ) was unable to join the domain due to - Creating Secondary Domain Controller on unit ) - - - - - - - - - - - - - Secondary Domain Controller created - - - created - - - - - ( - - - - - - - - - - - - - - - Testing was finished - - - - - - Starting testing - - - - - - - - - - Fault - - - - - - - - diff --git a/modified_workflow/AspNetApps.xml b/modified_workflow/AspNetApps.xml deleted file mode 100644 index aca1487..0000000 --- a/modified_workflow/AspNetApps.xml +++ /dev/null @@ -1,230 +0,0 @@ - - - - - Creating instance ) - - - - - - - - - - - - ( - Unable to deploy instance ) due to - - - - - - http:// - - - - ( - - - - - - - - - - - - - - - - - - - - ( - - - - - - - - - - ( - - - - IIS ) has started - - - - - ( - - - - - - - - - on unit ) - - - - - - - - - - WebApp ( - Unable to deploy WebApp on ) due to - Starting testing - - - - - - - - - - Fault - - - - - - - - - - - - Testing was finished - - - - - - - Creating instance ) - - - - - - - - - - - - ( - Unable to deploy instance ) due to - Creating demo service on unit ) - - - - - - - - - ( - Unable to install demo service on ) due to - - - - $[?(@.state.domain != ' - - - - - - - - - - - - - - - - - - - ( - - - - - ( - - - - - - - - diff --git a/modified_workflow/MsSqlCluster.xml b/modified_workflow/MsSqlCluster.xml deleted file mode 100644 index ff81d4d..0000000 --- a/modified_workflow/MsSqlCluster.xml +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - - Creating instance ) - - - - - - - - - - - - ( - Unable to deploy instance ) due to - - - /$.services[?(@.type == 'activeDirectory' and @.domain == ' - - - - - - - - - - - Unable to set admin password on unit ) due to - - - - - - - - - - - - - ( - Unable to install prerequisites on unit ) due to - - - - - - - - - - - - - - - - Failover cluster created for SQL Server Cluster service ( - Unable to create failover cluster for SQL Server Service - - - - - - - - - - - - - - - - - - - - - - ) configured - - - - - ) due to - - - - - - - - - - - - - - - - ( - Unable to install SQL Server on unit ) due to - - - - - - - - - - - - - ( - Unable to initialize AlwaysOn AG for ) due to - - - - - - - - - - - - - - - - - - - - - - - - - ( - Unable to initialize primary replica for SQL Server AG for ) due to - - - - - - - - - - - - - ( - Unable to initialize secondary replica for SQL Server AG for ) due to - Starting testing - - - - - - - - - - Fault - - - - - - - diff --git a/modified_workflow/MsSqlServer.xml b/modified_workflow/MsSqlServer.xml deleted file mode 100644 index f083e3e..0000000 --- a/modified_workflow/MsSqlServer.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - - Creating instance ) - - - - - - - - - - - - ( - Unable to deploy instance ) due to - - - - - - - - - - Unable to set admin password on unit ) due to - Creating MS SQL Server on unit ) - - - - - - - - - - - - - - - - - ( - Unable to install MS SQL Server on unit ) due to - Starting testing - - - - - - - - - - Fault - - - - - - - diff --git a/modified_workflow/TestDeploy.template b/modified_workflow/TestDeploy.template deleted file mode 100644 index cee45c6..0000000 --- a/modified_workflow/TestDeploy.template +++ /dev/null @@ -1,12 +0,0 @@ -{ - "Scripts": [ - "DeployTesting.ps1" - ], - "Commands": [ - { - "Name": "DeployTestingFunction" - } - ], - "RebootOnCompletion": 0 -} - diff --git a/muranodashboard-tests/.gitignore b/muranodashboard-tests/.gitignore deleted file mode 100644 index f3d74a9..0000000 --- a/muranodashboard-tests/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.pyc -*~ diff --git a/muranodashboard-tests/__init__.py b/muranodashboard-tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/muranodashboard-tests/base.py b/muranodashboard-tests/base.py deleted file mode 100644 index 6060954..0000000 --- a/muranodashboard-tests/base.py +++ /dev/null @@ -1,575 +0,0 @@ -import datetime -import os -import random -import sys - -import ConfigParser -import json -import logging -import requests -from selenium import webdriver -from selenium.common.exceptions import NoSuchElementException -import selenium.webdriver.common.by as by -from selenium.webdriver.support.ui import WebDriverWait -import testtools -import time - -from keystoneclient.v2_0 import client as ksclient -from muranoclient.client import Client as mclient -from glanceclient import Client as gclient -import config.config as cfg - -log = logging.getLogger(__name__) -log.setLevel(logging.DEBUG) -log.addHandler(logging.StreamHandler()) - -if sys.version_info >= (2, 7): - class BaseDeps(testtools.TestCase): - pass -else: - # Define asserts for python26 - import unittest2 - - class BaseDeps(testtools.TestCase, - unittest2.TestCase): - pass - - -class ImageException(Exception): - message = "Image doesn't exist" - - def __init__(self, im_type): - self._error_string = (self.message + '\nDetails: {0} image is ' - 'not found,'.format(im_type)) - - def __str__(self): - return self._error_string - - -class UITestCase(BaseDeps): - - @classmethod - def setUpClass(cls): - super(UITestCase, cls).setUpClass() - keystone_client = ksclient.Client(username=cfg.common.user, - password=cfg.common.password, - tenant_name=cfg.common.tenant, - auth_url=cfg.common.keystone_url) - - cls.murano_client = mclient('1', endpoint=cfg.common.murano_url, - token=keystone_client.auth_token) - - glance_endpoint = keystone_client.service_catalog.url_for( - service_type='image', endpoint_type='publicURL') - glance = gclient('1', endpoint=glance_endpoint, - token=keystone_client.auth_token) - - cls.headers = {'X-Auth-Token': keystone_client.auth_token} - - image_list = [] - for i in glance.images.list(): - image_list.append(i) - - cls.demo_image = cls.get_image_name('demo', image_list) - cls.linux_image = cls.get_image_name('linux', image_list) - cls.windows_image = cls.get_image_name('windows', image_list) - cls.keypair = cfg.common.keypair_name - cls.asp_git_repository = cfg.common.asp_git_repository - cls.tomcat_repository = cfg.common.tomcat_repository - - cls.elements = ConfigParser.RawConfigParser() - cls.elements.read('common.ini') - cls.logger = logging.getLogger(__name__) - - cls.location = os.path.realpath( - os.path.join(os.getcwd(), os.path.dirname(__file__))) - - - def upload_package(package_name, body, app): - - files = {'%s' % package_name: open( - os.path.join(cls.location, app), 'rb')} - - post_body = {'JsonString': json.dumps(body)} - request_url = '{endpoint}{url}'.format( - endpoint=cfg.common.murano_url, - url='/v1/catalog/packages') - - return requests.post(request_url, - files=files, - data=post_body, - headers=cls.headers).json()['id'] - - cls.postgre_id = upload_package( - 'PostgreSQL', - {"categories": ["Databases"], "tags": ["tag"]}, - 'murano-app-incubator/io.murano.apps.PostgreSql.zip') - cls.apache_id = upload_package( - 'Apache', - {"categories": ["Application Servers"], "tags": ["tag"]}, - 'murano-app-incubator/io.murano.apps.apache.Apache.zip') - cls.tomcat_id = upload_package( - 'Tomcat', - {"categories": ["Application Servers"], "tags": ["tag"]}, - 'murano-app-incubator/io.murano.apps.apache.Tomcat.zip') - cls.telnet_id = upload_package( - 'Telnet', - {"categories": ["Web"], "tags": ["tag"]}, - 'murano-app-incubator/io.murano.apps.linux.Telnet.zip') - cls.ad_id = upload_package( - 'Active Directory', - {"categories": ["Microsoft Services"], "tags": ["tag"]}, - 'murano-app-incubator/io.murano.windows.ActiveDirectory.zip') - - def setUp(self): - super(UITestCase, self).setUp() - - self.driver = webdriver.Firefox() - - self.driver.get(cfg.common.horizon_url + '/') - self.driver.implicitly_wait(30) - self.log_in() - - def tearDown(self): - super(UITestCase, self).tearDown() - self.addOnException(self.take_screenshot(self._testMethodName)) - self.driver.quit() - - for env in self.murano_client.environments.list(): - self.murano_client.environments.delete(env.id) - - @classmethod - def tearDownClass(cls): - super(UITestCase, cls).tearDownClass() - - def delete_package(package_id): - request_url = '{endpoint}{url}'.format( - endpoint=cfg.common.murano_url, - url='/v1/catalog/packages/{0}'.format(package_id)) - requests.delete(request_url, headers=cls.headers) - - delete_package(cls.postgre_id) - delete_package(cls.apache_id) - delete_package(cls.tomcat_id) - delete_package(cls.telnet_id) - delete_package(cls.ad_id) - - def take_screenshot(self, test_name): - screenshot_dir = './screenshots' - if not os.path.exists(screenshot_dir): - os.makedirs(screenshot_dir) - date = datetime.datetime.now().strftime('%H%M%S') - filename = '{0}/{1}-{2}.png'.format(screenshot_dir, test_name, date) - self.driver.get_screenshot_as_file(filename) - log.debug("\nScreenshot {0} was saved".format(filename)) - - @classmethod - def get_image_name(cls, type_of_image, list_of_images): - for i in list_of_images: - if 'murano_image_info' in i.properties.keys(): - if type_of_image in json.loads( - i.properties['murano_image_info'])['type']: - return json.loads(i.properties[ - 'murano_image_info'])['title'] - raise ImageException(type_of_image) - - def log_in(self): - self.fill_field(by.By.ID, 'id_username', cfg.common.user) - self.fill_field(by.By.ID, 'id_password', cfg.common.password) - sign_in = self.elements.get('button', 'ButtonSubmit') - self.driver.find_element_by_xpath(sign_in).click() - self.driver.find_element_by_xpath( - self.elements.get('button', 'Murano')).click() - - def fill_field(self, by_find, field, value): - self.driver.find_element(by=by_find, value=field).clear() - self.driver.find_element(by=by_find, value=field).send_keys(value) - - def confirm_deletion(self): - confirm_deletion = self.elements.get('button', 'ConfirmDeletion') - self.driver.find_element_by_xpath(confirm_deletion).click() - - def create_environment(self, env_name): - self.driver.find_element_by_id( - 'murano__action_CreateEnvironment').click() - self.fill_field(by.By.ID, 'id_name', env_name) - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - - def delete_environment(self, env_name): - self.driver.find_element_by_link_text('Environments').click() - self.click_on_more(env_name) - self.select_action_for_environment(env_name, 'delete') - self.confirm_deletion() - - def edit_environment(self, old_name, new_name): - self.click_on_more(old_name) - self.select_action_for_environment(old_name, 'edit') - self.fill_field(by.By.ID, 'id_name', new_name) - save = self.elements.get('button', 'InputSubmit') - self.driver.find_element_by_xpath(save).click() - - def click_on_more(self, env_name): - element_id = self.get_element_id(env_name) - self.driver.find_element_by_xpath( - ".//*[@id='murano__row__{0}']/td[4]/div/a[2]". - format(element_id)).click() - - def select_action_for_environment(self, env_name, action): - element_id = self.get_element_id(env_name) - self.driver.find_element_by_id( - "murano__row_{0}__action_{1}".format(element_id, action)).click() - - def go_to_submenu(self, link): - self.driver.find_element_by_link_text('{0}'.format(link)).click() - - def navigate_to(self, menu): - self.driver.find_element_by_xpath( - self.elements.get('button', '{0}'.format(menu))).click() - - def select_from_list(self, list_name, value): - self.driver.find_element_by_xpath( - "//select[@name='{0}']/option[text()='{1}']". - format(list_name, value)).click() - - def check_element_on_page(self, method, value): - try: - self.driver.find_element(method, value) - except NoSuchElementException: - return False - return True - - def env_to_components_list(self, env_name): - element_id = self.get_element_id(env_name) - self.driver.find_element_by_id( - "murano__row_{0}__action_show".format(element_id)).click() - - def create_demo_service(self, app_name): - self.driver.find_element_by_xpath( - self.elements.get('apps', 'Demo')).click() - - self.fill_field(by.By.ID, 'id_0-name', app_name) - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - self.select_from_list('1-osImage', self.demo_image) - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - def create_linux_telnet(self, app_name, app_id): - self.select_and_click_action_for_app('quick-add', app_id) - - self.fill_field(by.By.ID, 'id_0-name', app_name) - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - self.select_from_list('1-osImage', self.linux_image) - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - - def create_linux_apache(self, app_name, app_id): - self.select_and_click_action_for_app('quick-add', app_id) - - self.fill_field(by.By.ID, 'id_0-name', app_name) - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - self.select_from_list('1-osImage', self.linux_image) - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - - def create_ad_service(self, app_name): - self.fill_field(by.By.ID, 'id_0-name', app_name) - self.fill_field(by.By.ID, 'id_0-adminPassword', 'P@ssw0rd') - self.fill_field(by.By.ID, 'id_0-adminPassword-clone', 'P@ssw0rd') - self.fill_field(by.By.ID, 'id_0-recoveryPassword', 'P@ssw0rd') - self.fill_field(by.By.ID, 'id_0-recoveryPassword-clone', 'P@ssw0rd') - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - self.select_from_list('1-osImage', self.windows_image) - next_button = self.elements.get('button', 'InputSubmit') - self.driver.find_element_by_xpath(next_button).click() - - def create_iis_service(self, app_name): - self.driver.find_element_by_xpath( - self.elements.get('apps', 'IIS')).click() - - self.fill_field(by.By.ID, 'id_0-name', app_name) - self.fill_field(by.By.ID, 'id_0-adminPassword', 'P@ssw0rd') - self.fill_field(by.By.ID, 'id_0-adminPassword-clone', 'P@ssw0rd') - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - self.select_from_list('1-osImage', self.windows_image) - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - - def create_asp_service(self, app_name): - self.driver.find_element_by_xpath( - self.elements.get('apps', 'ASP')).click() - - self.fill_field(by.By.ID, 'id_0-name', app_name) - self.fill_field(by.By.ID, 'id_0-adminPassword', 'P@ssw0rd') - self.fill_field(by.By.ID, 'id_0-adminPassword-clone', 'P@ssw0rd') - self.fill_field(by.By.ID, 'id_0-repository', self.asp_git_repository) - - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - self.select_from_list('1-osImage', self.windows_image) - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - - def create_iisfarm_service(self, app_name): - self.driver.find_element_by_xpath( - self.elements.get('apps', 'IISFarm')).click() - - self.fill_field(by.By.ID, 'id_0-name', app_name) - self.fill_field(by.By.ID, 'id_0-adminPassword', 'P@ssw0rd') - self.fill_field(by.By.ID, 'id_0-adminPassword-clone', 'P@ssw0rd') - - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - self.select_from_list('1-osImage', self.windows_image) - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - - def create_aspfarm_service(self, app_name): - self.driver.find_element_by_xpath( - self.elements.get('apps', 'ASPFarm')).click() - - self.fill_field(by.By.ID, 'id_0-name', app_name) - self.fill_field(by.By.ID, 'id_0-adminPassword', 'P@ssw0rd') - self.fill_field(by.By.ID, 'id_0-adminPassword-clone', 'P@ssw0rd') - self.fill_field(by.By.ID, 'id_0-repository', self.asp_git_repository) - - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - self.select_from_list('1-osImage', self.windows_image) - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - - def create_mssql_service(self, app_name): - self.driver.find_element_by_xpath( - self.elements.get('apps', 'MSSQL')).click() - - self.fill_field(by.By.ID, 'id_0-name', app_name) - self.fill_field(by.By.ID, 'id_0-adminPassword', 'P@ssw0rd') - self.fill_field(by.By.ID, 'id_0-adminPassword-clone', 'P@ssw0rd') - self.fill_field(by.By.ID, 'id_0-saPassword', 'P@ssw0rd') - self.fill_field(by.By.ID, 'id_0-saPassword-clone', 'P@ssw0rd') - - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - self.select_from_list('1-osImage', self.windows_image) - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - - def create_sql_cluster_service(self, app_name, domain_name): - self.driver.find_element_by_xpath( - self.elements.get('apps', 'SQL_cluster')).click() - - self.fill_field(by.By.ID, 'id_0-name', app_name) - self.fill_field(by.By.ID, 'id_0-adminPassword', 'P@ssw0rd') - self.fill_field(by.By.ID, 'id_0-adminPassword-clone', 'P@ssw0rd') - - self.select_from_list('id_0-domain', domain_name) - - self.fill_field(by.By.ID, 'id_0-saPassword', 'P@ssw0rd') - self.fill_field(by.By.ID, 'id_0-saPassword-clone', 'P@ssw0rd') - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - self.fill_field(by.By.ID, 'id_1-clusterIp', '1.1.1.1') - self.fill_field(by.By.ID, 'id_1-clusterName', 'cluster') - self.fill_field(by.By.ID, 'id_1-agGroupName', 'ag-name') - self.fill_field(by.By.ID, 'id_1-agListenerName', 'listener_name') - self.fill_field(by.By.ID, 'id_1-agListenerIP', 'listener_name') - self.fill_field(by.By.ID, 'id_1-sqlServiceUserName', 'admin') - self.fill_field(by.By.ID, 'id_1-sqlServicePassword', 'P@ssw0rd') - self.fill_field(by.By.ID, 'id_1-sqlServicePassword-clone', 'P@ssw0rd') - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - cluster_ip = self.get_env_subnet() - self.fill_field(by.By.ID, 'id_1-clusterIp', cluster_ip) - listener_ip = self.get_env_subnet() - self.fill_field(by.By.ID, 'id_1-agListenerIP', listener_ip) - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - self.fill_field(by.By.ID, 'id_2-databases', 'testbase') - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - self.select_from_list('3-osImage', self.windows_image) - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - def create_tomcat_service(self, app_name, database): - self.fill_field(by.By.ID, 'id_0-name', app_name) - self.select_from_list('0-database', database) - self.fill_field(by.By.ID, 'id_0-repository', self.tomcat_repository) - - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - self.select_from_list('1-osImage', self.linux_image) - - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - - def create_postgreSQL_service(self, app_name): - self.fill_field(by.By.ID, 'id_0-name', app_name) - self.fill_field(by.By.ID, 'id_0-database', 'psql-base') - self.fill_field(by.By.ID, 'id_0-username', 'admin') - self.fill_field(by.By.ID, 'id_0-password', 'P@ssw0rd') - self.fill_field(by.By.ID, 'id_0-password-clone', 'P@ssw0rd') - - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - self.select_from_list('1-osImage', self.linux_image) - - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - - def get_element_id(self, el_name): - path = self.driver.find_element_by_xpath( - ".//*[@data-display='{0}']".format(el_name)).get_attribute("id") - return path.split('__')[-1] - - def delete_component(self, component_name): - component_id = self.get_element_id(component_name) - self.driver.find_element_by_id( - 'services__row_{0}__action_delete'.format(component_id)).click() - self.driver.find_element_by_link_text('Delete Component').click() - - def get_env_subnet(self): - help_text = self.driver.find_element_by_xpath( - "(.//span[@class = 'help-inline'])[1]").text - subnet = help_text.split('.')[-2] - num = random.randint(0, 255) - return '10.0.{0}.{1}'.format(subnet, num) - - def check_that_error_message_is_correct(self, error_message, num): - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - time.sleep(3) - appeared_text = self.driver.find_element_by_xpath( - ".//div[@class = 'control-group form-field clearfix error'][%d]" - % num).text - index = appeared_text.find(error_message) - - if index != -1: - return True - else: - return False - - def check_that_alert_message_is_appeared(self, error_message): - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - xpath = ".//*[@id='create_service_form']/div[2]/input[2]" - WebDriverWait(self.driver, 10).until(lambda s: s.find_element( - by.By.XPATH, xpath).is_displayed()) - - appeared_text = self.driver.find_element_by_xpath( - "(.//div[@class = 'alert alert-message alert-error'])").text - index = appeared_text.find(error_message) - - if index != -1: - return True - else: - return False - - def click_on_package_action(self, action): - self.driver.find_element_by_xpath( - ".//*[@id='packages__action_{0}']".format(action)).click() - - def select_action_for_package(self, package, action): - time.sleep(2) - package_id = self.get_element_id(package) - if action == 'more': - self.driver.find_element_by_xpath( - ".//*[@id='packages__row__{0}']/td[6]/div/a[2]". - format(package_id)).click() - WebDriverWait(self.driver, 10).until(lambda s: s.find_element( - by.By.XPATH, - ".//*[@id='packages__row_{0}__action_download_package']". - format(package_id)).is_displayed()) - else: - self.driver.find_element_by_xpath( - ".//*[@id='packages__row_{0}__action_{1}']". - format(package_id, action)).click() - - def check_package_parameter(self, package, column, value): - package_id = self.get_element_id(package) - - result = self.driver.find_element_by_xpath( - ".//*[@id='packages__row__{0}']/td[{1}]". - format(package_id, column)).text - if result == value: - return True - else: - return False - - def select_and_click_element(self, element): - self.driver.find_element_by_xpath( - ".//*[@value = '{0}']".format(element)).click() - - def choose_and_upload_files(self, name): - __location = os.path.realpath(os.path.join(os.getcwd(), - os.path.dirname(__file__))) - self.driver.find_element_by_xpath(".//*[@id='id_file']").click() - self.driver.find_element_by_id('id_file').send_keys( - os.path.join(__location, name)) - - def check_the_status_of_env(self, env_name, status): - env_id = self.get_element_id(env_name) - - env_status = self.driver.find_element_by_xpath( - ".//*[@id='murano__row__{0}']/td[3]".format(env_id)) - k = 0 - while env_status.text != status: - time.sleep(15) - k += 1 - self.driver.refresh() - env_status = self.driver.find_element_by_xpath( - ".//*[@id='murano__row__{0}']/td[3]".format(env_id)) - if k > 160: - log.error('\nTimeout has expired') - break - - def check_that_deploy_finished(self, env_name): - self.navigate_to('Environments') - self.click_on_more(env_name) - self.select_action_for_environment(env_name, 'show_deployments') - status = self.driver.find_element_by_xpath( - "/html/body/div/div[2]/div[3]/form/table/tbody/tr/td[3]").text - - self.driver.find_element_by_link_text("Show Details").click() - self.driver.find_element_by_link_text("Logs").click() - self.take_screenshot(self._testMethodName) - - self.navigate_to('Environments') - self.click_on_more(env_name) - self.select_action_for_environment(env_name, 'show_deployments') - - self.assertEqual('Successful', status, 'Deploy finished with errors') - - def select_and_click_action_for_app(self, action, app): - self.driver.find_element_by_xpath( - "//*[@href='/horizon/murano/catalog/{0}/{1}']" - .format(action, app)).click() - - def modify_package(self, param, value): - self.fill_field(by.By.ID, 'id_{0}'.format(param), value) - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - self.driver.refresh() diff --git a/muranodashboard-tests/common.ini b/muranodashboard-tests/common.ini deleted file mode 100644 index be0897a..0000000 --- a/muranodashboard-tests/common.ini +++ /dev/null @@ -1,10 +0,0 @@ -[button] -ButtonSubmit=//button[@type='submit'] -InputSubmit=//input[@type='submit'] -ConfirmDeletion=.//*[@id='modal_wrapper']/div/div[3]/a[1] -More=/html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/a[2] -Next=//*[@id="create_service_form"]/strong/strong/div/button -Murano=//*[@id="main_content"]/div[2]/div/dl/dt[3]/div -Application_Catalog=//*[@id="main_content"]/div[2]/div/dl/dd[3]/div[1]/h4/div -Manage=//*[@id="main_content"]/div[2]/div/dl/dd[3]/div[2]/h4/div -AddToEnv=.//*[@href='/horizon/murano/create_environment?next=/horizon/murano/catalog/index'] diff --git a/muranodashboard-tests/config/__init__.py b/muranodashboard-tests/config/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/muranodashboard-tests/config/config.py b/muranodashboard-tests/config/config.py deleted file mode 100644 index 730da9c..0000000 --- a/muranodashboard-tests/config/config.py +++ /dev/null @@ -1,53 +0,0 @@ -import os -from oslo.config import cfg - -common_group = cfg.OptGroup(name='common', title="common configs") - -CommonGroup = [ - cfg.StrOpt('horizon_url', - default='http://127.0.0.1/horizon', - help="murano dashboard url"), - cfg.StrOpt('user', - default='admin', - help="keystone user"), - cfg.StrOpt('password', - default='pass', - help="password for keystone user"), - cfg.StrOpt('tenant', - default='admin', - help='keystone tenant'), - cfg.StrOpt('keystone_url', - default='http://172.18.124.203:5000/v2.0/', - help='keystone url'), - cfg.StrOpt('murano_url', - default='http://127.0.0.1:8082', - help='murano url'), - cfg.StrOpt('keypair_name', - default='default_key', - help='keypair for murano services'), - cfg.StrOpt('asp_git_repository', - default='git://github.com/', - help='git repository with asp application'), - cfg.StrOpt('tomcat_repository', - default='git://github.com/', - help='git repository with tomcat servlet'), - cfg.StrOpt('selenium_server', - default='http://127.0.0.1:4444/wd/hub', - help='url where selenium server is running') -] - - -def register_config(config, config_group, config_opts): - - config.register_group(config_group) - config.register_opts(config_opts, config_group) - -path = os.path.join("%s/config/config_file.conf" - % os.getcwd()) - -if os.path.exists(path): - cfg.CONF([], project='muranodashboard', default_config_files=[path]) - -register_config(cfg.CONF, common_group, CommonGroup) - -common = cfg.CONF.common diff --git a/muranodashboard-tests/config/config_file.conf b/muranodashboard-tests/config/config_file.conf deleted file mode 100644 index 1c4aa65..0000000 --- a/muranodashboard-tests/config/config_file.conf +++ /dev/null @@ -1,10 +0,0 @@ -[common] -horizon_url = http://127.0.0.1/horizon -murano_url = http://127.0.0.1:8082 -user = WebTestUser -password = swordfish -tenant = WebTestProject -keystone_url = http://127.0.0.1:5000/v2.0/ -keypair_name = default_keypair -asp_git_repository = git_repo_for_asp_app -tomcat_repository = git_repo_for_tomcat \ No newline at end of file diff --git a/muranodashboard-tests/deploy.py b/muranodashboard-tests/deploy.py deleted file mode 100644 index 83d4f25..0000000 --- a/muranodashboard-tests/deploy.py +++ /dev/null @@ -1,261 +0,0 @@ -import sys -import os -sys.path.append(os.getcwd()) - -import testtools -from base import UITestCase -import selenium.webdriver.common.by as by - - -class UIDeployTests(UITestCase): - - def test_001_deploy_demo_service(self): - self.log_in() - self.navigate_to('Environments') - self.create_environment('deploy_demo') - self.env_to_service('deploy_demo') - - self.create_demo_service('DemoService') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'DemoService')) - self.driver.find_element_by_id('services__action_deploy_env').click() - self.navigate_to('Environments') - self.check_the_status_of_env('deploy_demo', 'Ready') - self.check_that_deploy_finished('deploy_demo') - - def test_002_deploy_telnet_service(self): - self.log_in() - self.navigate_to('Environments') - self.create_environment('deploy_telnet') - self.env_to_service('deploy_telnet') - - self.create_linux_telnet('linuxtelnet') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'linuxtelnet')) - - self.driver.find_element_by_id('services__action_deploy_env').click() - self.navigate_to('Environments') - self.check_the_status_of_env('deploy_telnet', 'Ready') - self.check_that_deploy_finished('deploy_telnet') - - def test_003_deploy_apache_service(self): - self.log_in() - self.navigate_to('Environments') - self.create_environment('deploy_apache') - self.env_to_service('deploy_apache') - - self.create_linux_apache('linuxapache') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'linuxapache')) - - self.driver.find_element_by_id('services__action_deploy_env').click() - self.navigate_to('Environments') - self.check_the_status_of_env('deploy_apache', 'Ready') - self.check_that_deploy_finished('deploy_apache') - - def test_004_deploy_ad_service(self): - self.log_in() - self.navigate_to('Environments') - self.create_environment('deploy_ad') - self.env_to_service('deploy_ad') - - self.create_ad_service('muranotest.domain') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'muranotest.domain')) - - self.driver.find_element_by_id('services__action_deploy_env').click() - self.navigate_to('Environments') - self.check_the_status_of_env('deploy_ad', 'Ready') - self.check_that_deploy_finished('deploy_ad') - - def test_005_deploy_iis_service(self): - self.log_in() - self.navigate_to('Environments') - self.create_environment('deploy_iis') - self.env_to_service('deploy_iis') - - self.create_iis_service('IISService') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'IISService')) - - self.driver.find_element_by_id('services__action_deploy_env').click() - self.navigate_to('Environments') - self.check_the_status_of_env('deploy_iis', 'Ready') - self.check_that_deploy_finished('deploy_iis') - - def test_006_deploy_asp_service(self): - self.log_in() - self.navigate_to('Environments') - self.create_environment('deploy_asp') - self.env_to_service('deploy_asp') - - self.create_asp_service('ASPService') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'ASPService')) - - self.driver.find_element_by_id('services__action_deploy_env').click() - self.navigate_to('Environments') - self.check_the_status_of_env('deploy_asp', 'Ready') - self.check_that_deploy_finished('deploy_asp') - - @testtools.skip("There is no Neutron LB on lab") - def test_007_deploy_iis_farm_service(self): - self.log_in() - self.navigate_to('Environments') - self.create_environment('deploy_iisfarm') - self.env_to_service('deploy_iisfarm') - - self.create_iisfarm_service('IISFarmService') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'IISFarmService')) - - self.driver.find_element_by_id('services__action_deploy_env').click() - self.navigate_to('Environments') - self.check_the_status_of_env('deploy_iisfarm', 'Ready') - self.check_that_deploy_finished('deploy_iisfarm') - - @testtools.skip("There is no Neutron LB on lab") - def test_008_deploy_asp_farm_service(self): - self.log_in() - self.navigate_to('Environments') - self.create_environment('deploy_aspfarm') - self.env_to_service('deploy_aspfarm') - - self.create_aspfarm_service('ASPFarmService') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'ASPFarmService')) - - self.driver.find_element_by_id('services__action_deploy_env').click() - self.navigate_to('Environments') - self.check_the_status_of_env('deploy_aspfarm', 'Ready') - self.check_that_deploy_finished('deploy_aspfarm') - - def test_009_deploy_mssql_service(self): - self.log_in() - self.navigate_to('Environments') - self.create_environment('deploy_mssql') - self.env_to_service('deploy_mssql') - - self.create_mssql_service('MSSQLService') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'MSSQLService')) - - self.driver.find_element_by_id('services__action_deploy_env').click() - self.navigate_to('Environments') - self.check_the_status_of_env('deploy_mssql', 'Ready') - self.check_that_deploy_finished('deploy_mssql') - - @testtools.skip("https://bugs.launchpad.net/murano/+bug/1282097") - def test_010_deploy_sql_cluster_service(self): - self.log_in() - self.navigate_to('Environments') - self.create_environment('deploy_mssql_cluster') - self.env_to_service('deploy_mssql_cluster') - - self.create_ad_service('activeDirectory.mssql') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'activeDirectory.mssql')) - - self.driver.find_element_by_link_text('Create Service').click() - self.create_sql_cluster_service('SQLCluster', 'activeDirectory.mssql') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'SQLCluster')) - - self.driver.find_element_by_id('services__action_deploy_env').click() - self.navigate_to('Environments') - self.check_the_status_of_env('deploy_mssql_cluster', 'Ready') - self.check_that_deploy_finished('deploy_mssql_cluster') - - def test_011_deploy_postgreSQL_service(self): - self.log_in() - self.navigate_to('Environments') - self.create_environment('deploy_postgreSQL') - self.env_to_service('deploy_postgreSQL') - - self.create_postgreSQL_service('postgreSQL-serv') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'postgreSQL-serv')) - - self.driver.find_element_by_id('services__action_deploy_env').click() - self.navigate_to('Environments') - self.check_the_status_of_env('deploy_postgreSQL', 'Ready') - self.check_that_deploy_finished('deploy_postgreSQL') - - def test_012_deploy_tomcat_service(self): - self.log_in() - self.navigate_to('Environments') - self.create_environment('deploy_tomcat') - self.env_to_service('deploy_tomcat') - - self.create_postgreSQL_service('postgreSQL') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'postgreSQL')) - - self.driver.find_element_by_link_text('Create Service').click() - self.create_tomcat_service('tomcat', 'postgreSQL') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'tomcat')) - - self.driver.find_element_by_id('services__action_deploy_env').click() - self.navigate_to('Environments') - self.check_the_status_of_env('deploy_tomcat', 'Ready') - self.check_that_deploy_finished('deploy_tomcat') - - def test_013_add_service_in_deployed_env(self): - self.log_in() - self.navigate_to('Environments') - self.create_environment('add_service_in_deployed_env') - self.env_to_service('add_service_in_deployed_env') - - self.create_linux_telnet('telnet') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'telnet')) - - self.driver.find_element_by_id('services__action_deploy_env').click() - self.navigate_to('Environments') - self.check_the_status_of_env('add_service_in_deployed_env', 'Ready') - self.check_that_deploy_finished('add_service_in_deployed_env') - - self.navigate_to('Environments') - self.env_to_service('add_service_in_deployed_env') - self.create_iis_service('iis') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, 'iis')) - - def test_014_deploy_linux_windows_services(self): - self.log_in() - self.navigate_to('Environments') - self.create_environment('linux_windows_services') - self.env_to_service('linux_windows_services') - - self.create_linux_telnet('telnet') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'telnet')) - - self.create_iis_service('iis') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, 'iis')) - - self.driver.find_element_by_id('services__action_deploy_env').click() - self.navigate_to('Environments') - self.check_the_status_of_env('linux_windows_services', 'Ready') - self.check_that_deploy_finished('linux_windows_services') - - def test_015_checking_type_and_last_operation(self): - self.log_in() - self.navigate_to('Environments') - self.create_environment('test') - self.env_to_service('test') - - self.create_linux_telnet('telnet') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'telnet')) - self.driver.find_element_by_id('services__action_deploy_env').click() - - self.assertTrue(self.check_service_parameter( - 'services', 'telnet', '3', 'Linux Telnet')) - self.assertTrue(self.check_service_parameter( - 'services', 'telnet', '4', 'Deploy in progress')) - self.assertFalse(self.check_service_parameter( - 'services', 'telnet', '5', 'Service draft created')) - self.navigate_to('Environments') - self.check_the_status_of_env('test', 'Ready') - self.check_that_deploy_finished('test') diff --git a/muranodashboard-tests/sanity_check.py b/muranodashboard-tests/sanity_check.py deleted file mode 100644 index 8cc8cac..0000000 --- a/muranodashboard-tests/sanity_check.py +++ /dev/null @@ -1,1179 +0,0 @@ -import os -import sys -sys.path.append(os.getcwd()) - -import selenium.webdriver.common.by as by -from selenium.webdriver.support.ui import WebDriverWait -import testtools - -from base import UITestCase - - -class UISanityTests(UITestCase): - - def test_001_create_delete_environment(self): - """ - Test check ability to create and delete environment - - Scenario: - 1. Create environment - 2. Navigate to this environment - 3. Go back to environment list and delete created environment - """ - self.go_to_submenu('Environments') - self.create_environment('test_create_del_env') - self.driver.find_element_by_link_text('test_create_del_env').click() - - self.delete_environment('test_create_del_env') - self.assertFalse(self.check_element_on_page(by.By.LINK_TEXT, - 'test_create_del_env')) - - def test_002_edit_environment(self): - """ - Test check ability to change environment name - - Scenario: - 1. Create environment - 2. Change environment's name - 3. Check that there is renamed environment is in environment list - """ - self.go_to_submenu('Environments') - self.create_environment('test_edit_env') - self.driver.find_element_by_link_text('test_edit_env') - - self.edit_environment(old_name='test_edit_env', new_name='edited_env') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'edited_env')) - self.assertFalse(self.check_element_on_page(by.By.LINK_TEXT, - 'test_edit_env')) - - def test_003_rename_image(self): - """ - Test check ability to mark murano image - - Scenario: - 1. Navigate to Images page - 2. Click on button "Mark Image" - 3. Fill the form and submit it - """ - self.navigate_to('Manage') - self.go_to_submenu('Images') - self.driver.find_element_by_id( - 'marked_images__action_mark_image').click() - - self.select_from_list('image', 'TestImageForDeletion') - self.fill_field(by.By.ID, 'id_title', 'New Image') - self.select_from_list('type', ' Windows Server 2012') - - self.select_and_click_element('Mark') - - def test_004_delete_image(self): - """ - Test check ability to delete image - - Scenario: - 1. Navigate to Images page - 2. Create test image - 3. Select created image and click on "Delete Metadata" - """ - self.navigate_to('Manage') - self.go_to_submenu('Images') - self.driver.find_element_by_id( - 'marked_images__action_mark_image').click() - - self.select_from_list('image', 'TestImageForDeletion') - self.fill_field(by.By.ID, 'id_title', 'Image for deletion') - self.select_from_list('type', ' Windows Server 2012') - - self.select_and_click_element('Mark') - - element_id = self.get_element_id('TestImageForDeletion') - self.driver.find_element_by_id( - "marked_images__row_%s__action_delete" % element_id).click() - self.confirm_deletion() - self.assertFalse(self.check_element_on_page(by.By.LINK_TEXT, - 'TestImageForDeletion')) - - def test_005_check_image_info(self): - """ - Test check ability to view image details - - Scenario: - 1. Navigate to Images page - 2. Create test image - 3. Click on the name of selected image, check image info - """ - self.navigate_to('Manage') - self.go_to_submenu('Images') - self.driver.find_element_by_id( - 'marked_images__action_mark_image').click() - - self.select_from_list('image', 'TestImageForDeletion') - self.fill_field(by.By.ID, 'id_title', 'TestImage') - self.select_from_list('type', ' Windows Server 2012') - - self.select_and_click_element('Mark') - - self.driver.find_element_by_link_text('TestImageForDeletion').click() - self.assertIn('{"type": "windows.2012", "title": "TestImage"}', - self.driver.page_source) - - @testtools.skip("App is not in incubator") - def test_006_create_and_delete_demo_service(self): - """ - Test check ability to create and delete demo service - - Scenario: - 1. Navigate to Environments page - 2. Create environment - 3. Create demo service in this environment by filling - the creation form - 4. Delete demo service from environment - """ - self.go_to_submenu('Environments') - self.create_environment('test') - self.env_to_components_list('test') - - self.driver.find_element_by_link_text('Add Application').click() - self.create_demo_service('DemoService') - - self.go_to_submenu('Environments') - self.env_to_components_list('test') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'DemoService')) - - self.delete_component('DemoService') - self.assertFalse(self.check_element_on_page(by.By.LINK_TEXT, - 'DemoService')) - - def test_007_create_and_delete_linux_telnet(self): - """ - Test check ability to create and delete Linux Telnet service - - Scenario: - 1. Navigate to 'Application Catalog' - 2. Click on 'Quick Deploy' for Telnet application - 3. Create Linux Telnet app by filling the creation form - 4. Delete Linux Telnet app from environment - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - telnet_id = self.get_element_id('Telnet') - - self.navigate_to('Application_Catalog') - self.go_to_submenu('Applications') - - self.create_linux_telnet('linuxtelnet', telnet_id) - - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'linuxtelnet')) - self.delete_component('linuxtelnet') - self.assertFalse(self.check_element_on_page(by.By.LINK_TEXT, - 'linuxtelnet')) - - def test_008_create_and_delete_linux_apache(self): - """ - Test check ability to create and delete Linux Apache service - - Scenario: - 1. Navigate to 'Application Catalog' - 2. Click on 'Quick Deploy' for Apache application - 3. Create Linux Apache app by filling the creation form - 4. Delete Linux Apache app from environment - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - apache_id = self.get_element_id('Apache HTTP Server') - - self.navigate_to('Application_Catalog') - self.go_to_submenu('Applications') - - self.create_linux_apache('linuxapache', apache_id) - - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'linuxapache')) - self.delete_component('linuxapache') - self.assertFalse(self.check_element_on_page(by.By.LINK_TEXT, - 'linuxapache')) - - def test_009_create_and_delete_ad_service(self): - """ - Test check ability to create and delete Active Directory service - - Scenario: - 1. Navigate to 'Application Catalog' - 2. Click on 'Quick Deploy' for Active Directory application - 3. Create Active Directory app by filling the creation form - 4. Delete Active Directory app from environment - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - ad_id = self.get_element_id('Active Directory') - - self.navigate_to('Application_Catalog') - self.go_to_submenu('Applications') - - self.select_and_click_action_for_app('quick-add', ad_id) - self.create_ad_service('muranotest.domain') - - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'muranotest.domain')) - - self.delete_component('muranotest.domain') - self.assertFalse(self.check_element_on_page(by.By.LINK_TEXT, - 'muranotest.domain')) - - @testtools.skip("App is not in incubator") - def test_010_create_and_delete_iis_service(self): - """ - Test check ability to create and delete IIS service - - Scenario: - 1. Navigate to Environments page - 2. Create environment - 3. Create IIS service in this environment by filling - the creation form - 4. Delete IIS service from environment - """ - self.go_to_submenu('Environments') - self.create_environment('test') - self.env_to_components_list('test') - - self.driver.find_element_by_link_text('Add Component').click() - self.create_iis_service('IISService') - - self.go_to_submenu('Environments') - self.env_to_components_list('test') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'IISService')) - self.delete_component('IISService') - self.assertFalse(self.check_element_on_page(by.By.LINK_TEXT, - 'IISService')) - - @testtools.skip("App is not in incubator") - def test_011_create_and_delete_asp_service(self): - """ - Test check ability to create and delete ASP.Net service - - Scenario: - 1. Navigate to Environments page - 2. Create environment - 3. Create ASP.Net service in this environment by filling - the creation form - 4. Delete ASP.Net service from environment - """ - self.go_to_submenu('Environments') - self.create_environment('test') - self.env_to_components_list('test') - - self.driver.find_element_by_link_text('Add Component').click() - self.create_asp_service('ASPService') - - self.go_to_submenu('Environments') - self.env_to_components_list('test') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'ASPService')) - - self.delete_component('ASPService') - self.assertFalse(self.check_element_on_page(by.By.LINK_TEXT, - 'ASPService')) - - @testtools.skip("App is not in incubator") - def test_012_create_and_delete_iisfarm_service(self): - """ - Test check ability to create and delete IIS Farm service - - Scenario: - 1. Navigate to Environments page - 2. Create environment - 3. Create IIS Farm service in this environment by filling - the creation form - 4. Delete IIS Farm service from environment - """ - self.go_to_submenu('Environments') - self.create_environment('test') - self.env_to_components_list('test') - - self.driver.find_element_by_link_text('Add Component').click() - self.create_iisfarm_service('IISFarmService') - - self.go_to_submenu('Environments') - self.env_to_components_list('test') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'IISFarmService')) - - self.delete_component('IISFarmService') - self.assertFalse(self.check_element_on_page(by.By.LINK_TEXT, - 'IISFarmService')) - - @testtools.skip("App is not in incubator") - def test_013_create_and_delete_aspfarm_service(self): - """ - Test check ability to create and delete ASP.Net Farm service - - Scenario: - 1. Navigate to Environments page - 2. Create environment - 3. Create ASP.Net Farm service in this environment by filling - the creation form - 4. Delete ASP.Net Farm service from environment - """ - self.go_to_submenu('Environments') - self.create_environment('test') - self.env_to_components_list('test') - - self.driver.find_element_by_link_text('Add Component').click() - self.create_aspfarm_service('ASPFarmService') - - self.go_to_submenu('Environments') - self.env_to_components_list('test') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'ASPFarmService')) - - self.delete_component('ASPFarmService') - self.assertFalse(self.check_element_on_page(by.By.LINK_TEXT, - 'ASPFarmService')) - - @testtools.skip("App is not in incubator") - def test_014_create_and_delete_mssql_service(self): - """ - Test check ability to create and delete MSSQL service - - Scenario: - 1. Navigate to Environments page - 2. Create environment - 3. Create MSSQL service in this environment by filling - the creation form - 4. Delete MSSQL service from environment - """ - self.go_to_submenu('Environments') - self.create_environment('test') - self.env_to_components_list('test') - - self.driver.find_element_by_link_text('Add Component').click() - self.create_mssql_service('MSSQLService') - - self.go_to_submenu('Environments') - self.env_to_components_list('test') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'MSSQLService')) - - self.delete_component('MSSQLService') - self.assertFalse(self.check_element_on_page(by.By.LINK_TEXT, - 'MSSQLService')) - - @testtools.skip("App is not in incubator") - def test_015_create_and_delete_sql_cluster_service(self): - """ - Test check ability to create and delete MSSQL cluster service - - Scenario: - 1. Navigate to Environments page - 2. Create environment - 3. Create MSSQL cluster service in this environment by filling - the creation form - 4. Delete MSSQL cluster service from environment - """ - self.go_to_submenu('Environments') - self.create_environment('test') - self.env_to_components_list('test') - - self.driver.find_element_by_link_text('Add Component').click() - self.create_ad_service('activeDirectory.mssql') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'activeDirectory.mssql')) - - self.driver.find_element_by_link_text('Create Service').click() - self.create_sql_cluster_service('SQLCluster', 'activeDirectory.mssql') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'SQLCluster')) - - self.delete_component('SQLCluster') - self.assertFalse(self.check_element_on_page(by.By.LINK_TEXT, - 'SQLCluster')) - - def test_016_create_and_delete_tomcat_service(self): - """ - Test check ability to create and delete Tomcat service - - Scenario: - 1. Navigate to 'Application Catalog' - 2. Click on 'Quick Deploy' for Tomcat application - 3. Firstly, create PostgreSQL app by filling the creation form - 4. Create Tomcat app, in case of database select created - early PostgreSQL - 5. Delete Tomcat app from environment - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - tomcat_id = self.get_element_id('Apache Tomcat') - postgre_id = self.get_element_id('PostgreSQL') - - self.navigate_to('Application_Catalog') - self.go_to_submenu('Environments') - self.create_environment('test') - env_id = self.get_element_id('test') - self.env_to_components_list('test') - - self.driver.find_element_by_link_text('Add Component').click() - self.select_and_click_action_for_app('add/{0}'.format(env_id), - postgre_id) - self.create_postgreSQL_service('PostgreSQL') - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'PostgreSQL')) - - self.driver.find_element_by_link_text('Add Component').click() - self.select_and_click_action_for_app('add/{0}'.format(env_id), - tomcat_id) - - self.create_tomcat_service('tomcat-serv', 'PostgreSQL') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'tomcat-serv')) - self.delete_component('tomcat-serv') - self.assertFalse(self.check_element_on_page(by.By.LINK_TEXT, - 'tomcat-serv')) - - def test_017_create_and_delete_postgreSQL_service(self): - """ - Test check ability to create and delete PostgreSQL service - - Scenario: - 1. Navigate to 'Application Catalog' - 2. Click on 'Quick Deploy' for PostgreSQL application - 3. Create PostgreSQL app by filling the creation form - 4. Delete PostgreSQL app from environment - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - postgresql_id = self.get_element_id('PostgreSQL') - - self.navigate_to('Application_Catalog') - self.go_to_submenu('Applications') - - self.select_and_click_action_for_app('quick-add', postgresql_id) - self.create_postgreSQL_service('PostgreSQL') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'PostgreSQL')) - - self.delete_component('PostgreSQL') - self.assertFalse(self.check_element_on_page(by.By.LINK_TEXT, - 'PostgreSQL')) - - @testtools.skip("https://bugs.launchpad.net/murano/+bug/1321690") - def test_018_check_regex_expression_for_ad_name(self): - """ - Test check that validation of domain name field work and appropriate - error message is appeared after entering incorrect domain name - - Scenario: - 1. Navigate to Environments page - 2. Create environment and start to create AD service - 3. Set "a" as a domain name and verify error message - 4. Set "aa" as a domain name and check that error message - didn't appear - 5. Set "@ct!v3" as a domain name and verify error message - 6. Set "active.com" as a domain name and check that error message - didn't appear - 7. Set "domain" as a domain name and verify error message - 8. Set "domain.com" as a domain name and check that error message - didn't appear - 9. Set "morethan15symbols.beforedot" as a domain name and - verify error message - 10. Set "lessthan15.beforedot" as a domain name and check that - error message didn't appear - 11. Set ".domain.local" as a domain name and - verify error message - 12. Set "domain.local" as a domain name and check that - error message didn't appear - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - ad_id = self.get_element_id('Active Directory') - - self.navigate_to('Application_Catalog') - self.go_to_submenu('Applications') - - self.select_and_click_action_for_app('quick-add', ad_id) - - self.fill_field(by.By.ID, field='id_0-name', value='a') - self.assertTrue(self.check_that_error_message_is_correct( - 'Ensure this value has at least 2 characters (it has 1).', 1)) - - self.fill_field(by.By.ID, field='id_0-name', value='aa') - self.assertFalse(self.check_that_error_message_is_correct( - 'Ensure this value has at least 2 characters (it has 1).', 1)) - - self.fill_field(by.By.ID, field='id_0-name', value='@ct!v3') - self.assertTrue(self.check_that_error_message_is_correct( - 'Only letters, numbers and dashes in the middle are allowed.', 1)) - - self.fill_field(by.By.ID, field='id_0-name', value='active.com') - self.assertFalse(self.check_that_error_message_is_correct( - 'Only letters, numbers and dashes in the middle are allowed.', 1)) - - self.fill_field(by.By.ID, field='id_0-name', value='domain') - self.assertTrue(self.check_that_error_message_is_correct( - 'Single-level domain is not appropriate.', 1)) - - self.fill_field(by.By.ID, field='id_0-name', value='domain.com') - self.assertFalse(self.check_that_error_message_is_correct( - 'Single-level domain is not appropriate.', 1)) - - self.fill_field(by.By.ID, field='id_0-name', - value='morethan15symbols.beforedot') - self.assertTrue(self.check_that_error_message_is_correct( - 'NetBIOS name cannot be shorter than' - ' 1 symbol and longer than 15 symbols.', 1)) - - self.fill_field(by.By.ID, field='id_0-name', - value='lessthan15.beforedot') - self.assertFalse(self.check_that_error_message_is_correct( - 'NetBIOS name cannot be shorter than' - ' 1 symbol and longer than 15 symbols.', 1)) - - self.fill_field(by.By.ID, field='id_0-name', value='.domain.local') - self.assertTrue(self.check_that_error_message_is_correct( - 'Period characters are allowed only when ' - 'they are used to delimit the components of domain style names', 1)) - - self.fill_field(by.By.ID, field='id_0-name', value='domain.local') - self.assertFalse(self.check_that_error_message_is_correct( - 'Period characters are allowed only when ' - 'they are used to delimit the components of domain style names', 1)) - - @testtools.skip("App is not in incubator") - def test_019_check_regex_expression_for_iis_name(self): - """ - Test check that validation of iis name field work and appropriate - error message is appeared after entering incorrect name - - Scenario: - 1. Navigate to Environments page - 2. Create environment and start to create IIS service - 3. Set "a" as a iis name and verify error message - 4. Set "aa" as a iis name and check that error message - didn't appear - 5. Set "S3rv!$" as a iis name and verify error message - 6. Set "Service" as a iis name and check that error message - didn't appear - """ - self.go_to_submenu('Environments') - self.create_environment('test') - self.env_to_components_list('test') - - self.driver.find_element_by_link_text('Add Component').click() - self.driver.find_element_by_xpath( - self.elements.get('apps', 'IIS')).click() - - self.fill_field(by.By.ID, field='id_0-name', value='a') - self.assertTrue(self.check_that_error_message_is_correct( - 'Ensure this value has at least 2 characters (it has 1).', 1)) - - self.fill_field(by.By.ID, field='id_0-name', value='aa') - self.assertFalse(self.check_that_error_message_is_correct( - 'Ensure this value has at least 2 characters (it has 1).', 1)) - - self.fill_field(by.By.ID, field='id_0-name', value='S3rv!$') - self.assertTrue(self.check_that_error_message_is_correct( - 'Just letters, numbers, underscores and hyphens are allowed.', 1)) - - self.fill_field(by.By.ID, field='id_0-name', value='Service') - self.assertFalse(self.check_that_error_message_is_correct( - 'Just letters, numbers, underscores and hyphens are allowed.', 1)) - - def test_020_check_regex_expression_for_git_repo_field(self): - """ - Test check that validation of git repository field work and appropriate - error message is appeared after entering incorrect url - - Scenario: - 1. Navigate to Application Catalog > Applications - 2. Start to create Tomcat service - 3. Set "a" as a git repository url and verify error message - 4. Set "://@:" as a git repository url and verify error message - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - tomcat_id = self.get_element_id('Apache Tomcat') - - self.navigate_to('Application_Catalog') - self.go_to_submenu('Applications') - self.select_and_click_action_for_app('quick-add', tomcat_id) - - self.fill_field(by.By.ID, field='id_0-repository', value='a') - self.assertTrue(self.check_that_error_message_is_correct( - 'Enter a correct git repository URL', 3)) - - self.fill_field(by.By.ID, field='id_0-repository', value='://@:') - self.assertTrue(self.check_that_error_message_is_correct( - 'Enter a correct git repository URL', 3)) - - def test_021_check_validation_for_hostname_template_field(self): - """ - Test check that validation of hostname template field work and - appropriate error message is appeared after entering incorrect name - - Scenario: - 1. Navigate to Application Catalog > Applications - 2. Start to create Telnet service - 3. Set "`qwe`" as a hostname template name a and verify error message - 4. Set "host" as a hostname template name and - check that there is no error message - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - telnet_id = self.get_element_id('Telnet') - - self.navigate_to('Application_Catalog') - self.go_to_submenu('Applications') - - self.select_and_click_action_for_app('quick-add', telnet_id) - self.fill_field(by.By.ID, 'id_0-name', 'name') - self.fill_field(by.By.ID, 'id_0-unitNamingPattern', '`qwe`') - - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - self.assertTrue(self.check_that_error_message_is_correct( - 'Enter a valid value.', 1)) - - self.fill_field(by.By.ID, 'id_0-unitNamingPattern', 'host') - self.driver.find_element_by_xpath( - self.elements.get('button', 'ButtonSubmit')).click() - - WebDriverWait(self.driver, 10).until(lambda s: s.find_element( - by.By.ID, 'id_1-osImage').is_displayed()) - - @testtools.skip("New UI in progress") - def test_022_check_bool_field_validation(self): - """ - Test check that validation of bool field work - - Scenario: - 1. Navigate to Environments page - 2. Create environment and start to create mssql cluster service - 3. Select externalAD and fill fields with incorrect values - 4. Unselect externalAD and click on Next, second step of wizard - should appears - """ - self.go_to_submenu('Environments') - self.create_environment('test') - self.env_to_components_list('test') - - self.driver.find_element_by_id('services__action_CreateService').click() - - self.select_from_list('service_choice-service', 'MS SQL Server Cluster') - next_button = self.elements.get('button', 'Next') - self.driver.find_element_by_xpath(next_button).click() - - sql_cluster = 'id_msSqlClusterServer-0' - - self.fill_field(by.By.ID, '{0}-name'.format(sql_cluster), 'ms-sql') - self.fill_field(by.By.ID, - '{0}-adminPassword'.format(sql_cluster), - 'P@ssw0rd') - self.fill_field(by.By.ID, - '{0}-adminPassword-clone'.format(sql_cluster), - 'P@ssw0rd') - self.driver.find_element_by_id( - '{0}-externalAD'.format(sql_cluster)).click() - self.fill_field(by.By.ID, - '{0}-domainAdminUserName'.format(sql_cluster), - 'user') - self.fill_field(by.By.ID, - '{0}-domainAdminPassword'.format(sql_cluster), - 'P@ssw0rd') - self.fill_field(by.By.ID, - '{0}-domainAdminPassword-clone'.format(sql_cluster), - 'anotherP@ssw0rd') - self.fill_field(by.By.ID, - '{0}-saPassword'.format(sql_cluster), - 'P@ssw0rd') - self.fill_field(by.By.ID, - '{0}-saPassword-clone'.format(sql_cluster), - 'P@ssw0rd') - - next_button = self.elements.get('button', 'Next2') - self.driver.find_element_by_xpath(next_button).click() - self.assertTrue(self.check_that_alert_message_is_appeared( - 'Active Directory Passwords don\'t match')) - - self.driver.find_element_by_id( - '{0}-externalAD'.format(sql_cluster)).click() - - self.assertTrue(self.check_that_error_message_is_correct( - 'This field is required.', 1)) - - @testtools.skip("App is not in incubator") - def test_023_positive_scenario_1_for_the_MS_SQL_Cluster_Form(self): - """ - Test check one possible scenario of creation mssql cluster - - Scenario: - 1. Navigate to Environments page - 2. Create environment and start to create mssql cluster service - 3. External AD and Mixed-Mode Auth checkboxes - are not selected. User select created earlier domain. - """ - self.go_to_submenu('Environments') - self.create_environment('scenario_1') - self.env_to_components_list('scenario_1') - - self.create_ad_service('activeDirectory.mssql') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'activeDirectory.mssql')) - - self.driver.find_element_by_link_text('Create Service').click() - - self.select_from_list('service_choice-service', 'MS SQL Server Cluster') - next_button = self.elements.get('button', 'Next') - self.driver.find_element_by_xpath(next_button).click() - - sql_cluster = 'id_msSqlClusterServer-0' - - self.fill_field(by.By.ID, '{0}-name'.format(sql_cluster), 'ms-sql') - self.fill_field(by.By.ID, - '{0}-adminPassword'.format(sql_cluster), - 'P@ssw0rd') - self.fill_field(by.By.ID, - '{0}-adminPassword-clone'.format(sql_cluster), - 'P@ssw0rd') - - self.select_from_list('msSqlClusterServer-0-domain', - 'activeDirectory.mssql') - - self.driver.find_element_by_id( - '{0}-mixedModeAuth'.format(sql_cluster)).click() - - next_button = self.elements.get('button', 'Next2') - self.driver.find_element_by_xpath(next_button).click() - self.assertTrue(self.check_element_on_page( - by.By.ID, 'id_msSqlClusterServer-1-clusterIp')) - - @testtools.skip("App is not in incubator") - def test_024_positive_scenario_2_for_the_MS_SQL_Cluster_Form(self): - """ - Test check one possible scenario of creation mssql cluster - - Scenario: - 1. Navigate to Environments page - 2. Create environment and start to create mssql cluster service - 3. External AD field is selected (and user fill - all required fields here) and Mixed-Mode Auth checkbox - is not selected. - """ - self.go_to_submenu('Environments') - self.create_environment('scenario_2') - self.env_to_components_list('scenario_2') - - self.driver.find_element_by_link_text('Create Service').click() - - self.select_from_list('service_choice-service', 'MS SQL Server Cluster') - next_button = self.elements.get('button', 'Next') - self.driver.find_element_by_xpath(next_button).click() - - sql_cluster = 'id_msSqlClusterServer-0' - - self.fill_field(by.By.ID, '{0}-name'.format(sql_cluster), 'ms-sql') - self.fill_field(by.By.ID, - '{0}-adminPassword'.format(sql_cluster), - 'P@ssw0rd') - self.fill_field(by.By.ID, - '{0}-adminPassword-clone'.format(sql_cluster), - 'P@ssw0rd') - - self.driver.find_element_by_id( - '{0}-externalAD'.format(sql_cluster)).click() - self.fill_field(by.By.ID, - '{0}-domainAdminUserName'.format(sql_cluster), - 'user') - self.fill_field(by.By.ID, - '{0}-domainAdminPassword'.format(sql_cluster), - 'P@ssw0rd') - self.fill_field(by.By.ID, - '{0}-domainAdminPassword-clone'.format(sql_cluster), - 'P@ssw0rd') - - self.driver.find_element_by_id( - '{0}-mixedModeAuth'.format(sql_cluster)).click() - - next_button = self.elements.get('button', 'Next2') - self.driver.find_element_by_xpath(next_button).click() - self.assertTrue(self.check_element_on_page( - by.By.ID, 'id_msSqlClusterServer-1-clusterIp')) - - @testtools.skip("App is not in incubator") - def test_025_positive_scenario_3_for_the_MS_SQL_Cluster_Form(self): - """ - Test check one possible scenario of creation mssql cluster - - Scenario: - 1. Navigate to Environments page - 2. Create environment and start to create mssql cluster service - 3. External AD and Mixed-Mode Auth checkboxes are selected. - User have to fill all required fields. - """ - self.go_to_submenu('Environments') - self.create_environment('scenario_3') - self.env_to_components_list('scenario_3') - - self.driver.find_element_by_link_text('Create Service').click() - - self.select_from_list('service_choice-service', 'MS SQL Server Cluster') - next_button = self.elements.get('button', 'Next') - self.driver.find_element_by_xpath(next_button).click() - - sql_cluster = 'id_msSqlClusterServer-0' - - self.fill_field(by.By.ID, '{0}-name'.format(sql_cluster), 'ms-sql') - self.fill_field(by.By.ID, - '{0}-adminPassword'.format(sql_cluster), - 'P@ssw0rd') - self.fill_field(by.By.ID, - '{0}-adminPassword-clone'.format(sql_cluster), - 'P@ssw0rd') - - self.driver.find_element_by_id('{0}-externalAD').click() - self.fill_field(by.By.ID, - '{0}-domainAdminUserName'.format(sql_cluster), - 'user') - self.fill_field(by.By.ID, - '{0}-domainAdminPassword'.format(sql_cluster), - 'P@ssw0rd') - self.fill_field(by.By.ID, - '{0}-domainAdminPassword-clone'.format(sql_cluster), - 'P@ssw0rd') - - self.fill_field(by.By.ID, - '{0}-saPassword'.format(sql_cluster), - 'P@ssw0rd') - self.fill_field(by.By.ID, - '{0}-saPassword-clone'.format(sql_cluster), - 'P@ssw0rd') - - next_button = self.elements.get('button', 'Next2') - self.driver.find_element_by_xpath(next_button).click() - self.assertTrue(self.check_element_on_page( - by.By.ID, 'id_msSqlClusterServer-1-clusterIp')) - - def test_026_modify_package_name(self): - """ - Test check ability to change name of the package - - Scenario: - 1. Navigate to 'Package Definitions' page - 2. Select package and click on 'Modify Package' - 3. Rename package - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - self.select_action_for_package('PostgreSQL', - 'modify_package') - self.fill_field(by.By.ID, 'id_name', 'PostgreSQL-modified') - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - - self.assertTrue(self.check_element_on_page( - by.By.XPATH, './/*[@data-display="PostgreSQL-modified"]')) - - self.select_action_for_package('PostgreSQL-modified', - 'modify_package') - self.fill_field(by.By.ID, 'id_name', 'PostgreSQL') - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - - self.assertTrue(self.check_element_on_page( - by.By.XPATH, './/*[@data-display="PostgreSQL"]')) - - def test_040_modify_description(self): - """ - Test check ability to change description of the package - - Scenario: - 1. Navigate to 'Package Definitions' page - 2. Select package and click on 'Modify Package' - 3. Change description - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - self.select_action_for_package('PostgreSQL', - 'modify_package') - - self.modify_package('description', 'New Description') - - self.navigate_to('Application_Catalog') - self.go_to_submenu('Applications') - self.check_element_on_page( - ".//*[@class='app-description']", - 'New Description') - - def test_028_modify_package_add_tag(self): - """ - Test check ability to add file in composed service - - Scenario: - 1. Navigate to 'Package Definitions' page - 2. Click on "Compose Service" and create new service - 3. Manage composed service: add file - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - self.select_action_for_package('PostgreSQL', - 'modify_package') - - self.fill_field(by.By.ID, 'id_tags', 'TEST_TAG') - self.modify_package('tags', 'TEST_TAG') - - app_id = self.get_element_id('PostgreSQL') - - self.navigate_to('Application_Catalog') - self.go_to_submenu('Applications') - self.select_and_click_action_for_app('details', app_id) - self.check_element_on_page( - ".//*[@id='content_body']/div[2]/div/div/div[2]/div[2]/ul/li[6]", - 'TEST_TAG') - - def test_029_download_package(self): - """ - Test check ability to download package from repository - - Scenario: - 1. Navigate to 'Package Definitions' page - 2. Select PostgreSQL package and click on "More>Download Package" - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - - self.select_action_for_package('PostgreSQL', 'more') - self.select_action_for_package('PostgreSQL', 'download_package') - - @testtools.skip("Work in progress") - def test_030_upload_package_add_to_env(self): - """ - Test check ability to upload package to repository - - Scenario: - 1. Navigate to 'Package Definitions' page - 2. Click on "Upload Package" - 3. Select zip archive with package and category, submit form - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - - self.click_on_package_action('upload_package') - self.choose_and_upload_files('AppForUploadTest.zip') - self.select_from_list('categories', 'Web') - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - - self.assertTrue(self.check_element_on_page( - by.By.XPATH, './/*[@data-display="AppForUploadTest"]')) - - def test_031_check_opportunity_to_toggle_package(self): - """ - Test check ability to make package active or inactive - - Scenario: - 1. Navigate to 'Package Definitions' page - 2. Select some package and make it inactive ("More>Toggle Package") - 3. Check that package became inactive - 4. Select some package and make it active ("More>Toggle Package ") - 5. Check that package became active - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - - self.select_action_for_package('PostgreSQL', 'more') - self.select_action_for_package('PostgreSQL', 'toggle_enabled') - - self.assertTrue(self.check_package_parameter( - 'PostgreSQL', '3', 'False')) - - self.select_action_for_package('PostgreSQL', 'more') - self.select_action_for_package('PostgreSQL', 'toggle_enabled') - - self.assertTrue(self.check_package_parameter( - 'PostgreSQL', '3', 'True')) - - def test_041_check_opportunity_to_delete_package(self): - """ - Test check ability to delete package from database - - Scenario: - 1. Navigate to 'Package Definitions' page - 2. Select some package - 3. Delete this package - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - - package = self.get_element_id('PostgreSQL') - self.select_and_click_element(package) - - self.click_on_package_action('delete_package') - self.confirm_deletion() - self.assertFalse(self.check_element_on_page( - by.By.XPATH, './/*[@data-display="PostgreSQL"]')) - - def test_033_check_application_catalog_panel(self): - """ - Test checks that 'Applications' panel is operable - - Scenario: - 1. Create environment - 2. Navigate to 'Application Catalog > Applications' panel - """ - self.go_to_submenu('Applications') - self.assertTrue(self.check_element_on_page( - by.By.XPATH, ".//*[@id='content_body']/div[1]/h2")) - - def test_034_env_creation_form_app_catalog_page(self): - """ - Test checks that app's option 'Add to environment' is operable - when there is no previously created env. In this case creation of the - environment should start after clicking 'Add to environment' button - - Scenario: - 1. Navigate to 'Application Catalog > Applications' panel - 2. Click on 'Add to environment' button for some application - 3. Create new environment - 4. Add application in created environment - """ - self.go_to_submenu('Applications') - self.driver.find_element_by_xpath( - self.elements.get('button', 'AddToEnv')).click() - - self.fill_field(by.By.ID, 'id_name', 'test_env') - self.driver.find_element_by_xpath( - self.elements.get('button', 'InputSubmit')).click() - - self.go_to_submenu('Environments') - self.driver.find_element_by_link_text('test_env').click() - self.assertTrue( - self.driver.find_element_by_id('services__action_AddApplication')) - - def test_035_check_info_about_app(self): - """ - Test checks that information about app is available and truly. - - Scenario: - 1. Navigate to 'Application Catalog > Applications' panel - 2. Choose some application and click on 'More info' - 3. Verify info about application - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - - app_id = self.get_element_id('PostgreSQL') - - self.navigate_to('Application_Catalog') - self.go_to_submenu('Applications') - self.select_and_click_action_for_app('details', app_id) - - self.assertIn('PostgreSQL is a powerful', self.driver.page_source) - self.driver.find_element_by_link_text('Requirements').click() - self.driver.find_element_by_link_text('License').click() - - def test_036_check_search_option(self): - """ - Test checks that 'Search' option is operable. - - Scenario: - 1. Navigate to 'Application Catalog > Applications' panel - 2. Click on 'Search' panel - 3. Type name of service that should be founded - 3. Click on 'Go' and check result - """ - self.go_to_submenu('Applications') - self.driver.find_element_by_id('MuranoSearchPanelToggle').click() - self.fill_field(by.By.XPATH, ".//*[@name='search']", 'PARAM') - self.driver.find_element_by_xpath( - ".//*[@id='MuranoSearchPanel']/form/button").click() - - def test_037_filter_by_category(self): - """ - Test checks ability to filter applications by category - in Application Catalog page - - Scenario: - 1. Navigate to 'Application Catalog' panel - 2. Click on 'Category' panel - 3. Select category and click on it - 4. Verify result - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - - package_category1 = self.get_element_id('PostgreSQL') - package_category2 = self.get_element_id('Active Directory') - - self.navigate_to('Application_Catalog') - self.go_to_submenu('Applications') - self.driver.find_element_by_id('MuranoCategoriesPanelToggle').click() - self.driver.find_element_by_link_text('Databases').click() - - self.assertTrue(self.check_element_on_page( - by.By.XPATH, ".//*[@href='/horizon/murano/catalog/details/{0}']". - format(package_category1))) - - self.driver.find_element_by_id('MuranoCategoriesPanelToggle').click() - self.driver.find_element_by_link_text('Microsoft Services').click() - - self.assertTrue(self.check_element_on_page( - by.By.XPATH, ".//*[@href='/horizon/murano/catalog/details/{0}']". - format(package_category2))) - - @testtools.skip("Work in progress") - def test_038_check_option_switch_env(self): - """ - Test checks ability to switch environment and to add app in other env - - Scenario: - 1. Navigate to 'Application Catalog>Environments' panel - 2. Create environment 'env1' - 3. Create environment 'env2' - 4. Navigate to 'Application Catalog>Application Catalog' - 5. Click on 'Environment' panel - 6. Switch to env2 - 7. Add application in env2 - 8. Navigate to 'Application Catalog>Environments' and go to the env2 - 9. Check that added application is here - """ - self.navigate_to('Manage') - self.go_to_submenu('Package Definitions') - - app_id = self.get_element_id('Telnet') - - self.navigate_to('Application_Catalog') - self.go_to_submenu('Environments') - self.create_environment('env1') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'env1')) - self.create_environment('env2') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'env1')) - self.go_to_submenu('Applications') - self.driver.find_element_by_id('MuranoDefaultEnvPanelToggle').click() - self.driver.find_element_by_id('environment_switcher').click() - self.driver.find_element_by_xpath( - ".//*[@id='environment_list']/li[2]/a").click() - - self.create_linux_telnet('linuxtelnet', app_id) - - self.go_to_submenu('Environments') - self.env_to_components_list('env1') - self.assertTrue(self.check_element_on_page(by.By.LINK_TEXT, - 'linuxtelnet')) - - def test_039_check_statistics_panel(self): - """ - Test checks that 'Statictics' panel is operable - - Scenario: - 1. Navigate to 'Application Catalog > Statistics' panel - """ - self.go_to_submenu('Statistics') - self.driver.find_element_by_link_text('Murano API Servers').click() - self.driver.find_element_by_link_text( - 'Murano Instance Statistics').click() diff --git a/rest_api_tests/functional/Environments.txt b/rest_api_tests/functional/Environments.txt deleted file mode 100644 index 397fd24..0000000 --- a/rest_api_tests/functional/Environments.txt +++ /dev/null @@ -1,39 +0,0 @@ -*** Settings *** -Suite Setup -Library simple_REST.py -Resource keywords.txt - -*** Test Cases *** -Create environment - [Setup] Set Default Headers - User send a POST request to '/environments' with body {"name": "test"} - The response code should be 200 - The response body should have key 'name' with value "test" - -Get list of environments - [Setup] Set Default Headers - User send a GET request to '/environments' - The response code should be 200 - The response body should have key 'environments' with not empty list - -Update Environment - [Setup] Set Default Headers - ${id} Get Environment ID by name test - User send a PUT request to '/environments/${id}' with body {"name": "new_name"} - The response code should be 200 - The response body should have key 'name' with value "new_name" - -Get environment parameters - [Setup] Set Default Headers - ${id} Get Environment ID by name new_name - User send a GET request to '/environments/${id}' - The response body should have keys status created updated version - The response body should have keys id name services - -Delete Environment - [Setup] Set Default Headers - ${id} Get Environment ID by name new_name - User send a DELETE request to '/environments/${id}' - The response code should be 200 - User send a GET request to '/environments/${id}' - The response code should be 404 diff --git a/rest_api_tests/functional/Sessions.txt b/rest_api_tests/functional/Sessions.txt deleted file mode 100644 index e1c817c..0000000 --- a/rest_api_tests/functional/Sessions.txt +++ /dev/null @@ -1,100 +0,0 @@ -*** Settings *** -Suite Setup -Library simple_REST.py -Resource keywords.txt - -*** Test Cases *** -Create session for environment - [Setup] Set Default Headers - User send a POST request to '/environments' with body {"name": "test001"} - The response code should be 200 - ${id} Get Environment ID by name test001 - User send a POST request to '/environments/${id}/configure' without body - The response code should be 200 - The response body should have key 'environment_id' with value "${id}" - -Get session parameters - [Setup] Set Default Headers - User send a POST request to '/environments' with body {"name": "test002"} - The response code should be 200 - ${id} Get Environment ID by name test002 - User send a POST request to '/environments/${id}/configure' without body - The response code should be 200 - ${session} Get Response Body - User send a GET request to '/environments/${id}/sessions/${session['id']}' - The response code should be 200 - The response body should have keys id environment_id created updated - The response body should have keys user_id version state - The response body should have key 'state' with value "open" - -Create a few sessions for one environment - [Setup] Set Default Headers - User send a POST request to '/environments' with body {"name": "test003"} - The response code should be 200 - ${id} Get Environment ID by name test003 - User send a POST request to '/environments/${id}/configure' without body - The response code should be 200 - ${session1} Get Response Body - User send a POST request to '/environments/${id}/configure' without body - The response code should be 200 - ${session2} Get Response Body - User send a POST request to '/environments/${id}/configure' without body - The response code should be 200 - ${session3} Get Response Body - User send a GET request to '/environments/${id}/sessions/${session1['id']}' - The response code should be 200 - User send a GET request to '/environments/${id}/sessions/${session2['id']}' - The response code should be 200 - User send a GET request to '/environments/${id}/sessions/${session3['id']}' - The response code should be 200 - -Deploy empty session - [Tags] bug MRN-706 - [Setup] Set Default Headers - User send a POST request to '/environments' with body {"name": "test004-test"} - The response code should be 200 - ${id} Get Environment ID by name test004-test - User send a POST request to '/environments/${id}/configure' without body - The response code should be 200 - ${session} Get Response Body - User send a POST request to '/environments/${id}/sessions/${session['id']}/deploy' without body - The response code should be 200 - Sleep 5 - User send a GET request to '/environments/${id}/sessions/${session['id']}' - The response body should have key 'state' with value "open" - -Delete session - [Setup] Set Default Headers - User send a POST request to '/environments' with body {"name": "test005"} - The response code should be 200 - ${id} Get Environment ID by name test005 - User send a POST request to '/environments/${id}/configure' without body - The response code should be 200 - ${session} Get Response Body - User send a DELETE request to '/environments/${id}/sessions/${session['id']}' - The response code should be 200 - User send a GET request to '/environments/${id}/sessions/${session['id']}' - The response code should be 404 - -Delete only one session - [Setup] Set Default Headers - User send a POST request to '/environments' with body {"name": "test006"} - The response code should be 200 - ${id} Get Environment ID by name test006 - User send a POST request to '/environments/${id}/configure' without body - The response code should be 200 - ${session1} Get Response Body - User send a POST request to '/environments/${id}/configure' without body - The response code should be 200 - ${session2} Get Response Body - User send a POST request to '/environments/${id}/configure' without body - The response code should be 200 - ${session3} Get Response Body - User send a DELETE request to '/environments/${id}/sessions/${session2['id']}' - The response code should be 200 - User send a GET request to '/environments/${id}/sessions/${session2['id']}' - The response code should be 404 - User send a GET request to '/environments/${id}/sessions/${session1['id']}' - The response code should be 200 - User send a GET request to '/environments/${id}/sessions/${session3['id']}' - The response code should be 200 diff --git a/rest_api_tests/functional/keywords.txt b/rest_api_tests/functional/keywords.txt deleted file mode 100644 index ac54778..0000000 --- a/rest_api_tests/functional/keywords.txt +++ /dev/null @@ -1,112 +0,0 @@ -*** Settings *** -Library simple_REST.py -Library Collections - -*** Variables *** -${ip} 172.18.79.83 -${ip_keystone} 172.18.124.201 -${user} admin -${project} admin -${password} swordfish -${template} jenkinss -${url} http://? -${method} GET - -*** Keywords *** -User send a POST request to '${end_point}' with body ${body} - ${request_body} Set Variable ${body} - Set Global Variable ${url} http://${ip}:8082${end_point} - Set Global Variable ${method} POST - Log "POST request on link ${url} with body ${request_body}" - Set Body ${request_body} - POST Request ${url} - -User send a POST request to '${end_point}' without body - Set Global Variable ${url} http://${ip}:8082${end_point} - Set Global Variable ${method} POST - Log "POST request on link ${url} without body" - POST Request Without Body ${url} - -User send a PUT request to '${end_point}' with body ${body} - ${request_body} Set Variable ${body} - Set Global Variable ${url} http://${ip}:8082${end_point} - Set Global Variable ${method} PUT - Log "PUT request on link ${url} with body ${request_body}" - Set Body ${request_body} - PUT Request ${url} - -User send a GET request to '${end_point}' - Set Global Variable ${url} http://${ip}:8082${end_point} - Set Global Variable ${method} GET - Log "GET request on link ${url}" - GET Request ${url} - -User send a DELETE request to '${end_point}' - Set Global Variable ${url} http://${ip}:8082${end_point} - Set Global Variable ${method} DELETE - Log "DELETE request on link ${url}" - DELETE Request ${url} - -Get Environment ID by name - [Arguments] ${name} - ${id} Set Variable None - User send a GET request to '/environments' - The response code should be 200 - ${body} Get Response Body - @{environments} Convert To List ${body['environments']} - : FOR ${x} IN @{environments} - \ ${id} = Set Variable If "${x['name']}" == "${name}" ${x['id']} - [Return] ${id} - -The response code should be ${status_code} - ${response_body} Get Response Body - ${response_code} Get Response Code - Run Keyword If ${status_code} != ${response_code} Fail "User has sent ${method} request with url ${url}. Response code: ${response_code}. Response body: ${response_body}" - -The response body should be ${body} - ${response_body} Get Response Body - Log "Response body: ${response_body}. Expected body: ${body}" - Should Be Equal ${body} ${response_body} - -The response body should have keys - [Arguments] @{keys} - ${body} Get Response Body - : FOR ${key} IN @{keys} - \ Log "Expect ${key} in body ${body}" - \ Log ${body['${key}']} - -The response body should have key '${key}' with list ${value} - ${body} Get Response Body - ${array} Convert To List ${value} - Log "Expect ${key} == ${array} in body ${body}" - Should Be Equal ${body['${key}']} ${array} - -The response body should have key '${key}' with not empty list - ${body} Get Response Body - Log "Expect list ${key} in body ${body}" - ${length} Get Length ${body['${key}']} - Should Not Be Equal As Integers ${length} 0 - -The response body should have key '${key}' with value "${value}" - ${body} Get Response Body - Log "Expect ${key} == ${value} in body ${body}" - Should Be Equal ${body['${key}']} ${value} - -The response body not should have key '${key}' with value "${value}" - ${body} Get Response Body - Log "NoExpect ${key} == ${value} in body ${body}" - Should Be Not Equal ${body['${key}']} ${value} - -The response body parameter '${para}' should have key '${key}' with value "${value}" - ${body} Get Response Body - Log "Expect ${para}.${key} == ${value} in body ${body}" - Should Be Equal ${body['${para}']['${key}']} ${value} - -Set Default Headers - Set Headers {"Content-Type": "application/json"} - ${body} Set Variable {"auth": {"tenantName": "${project}", "passwordCredentials": {"username": "${user}", "password": "${password}"}}} - Set Body ${body} - POST Request http://${ip_keystone}:5000/v2.0/tokens - The response code should be 200 - ${body} Get Response Body - Update Headers X-Auth-Token ${body['access']['token']['id']} diff --git a/rest_api_tests/functional/simple_REST.py b/rest_api_tests/functional/simple_REST.py deleted file mode 100644 index b879eb9..0000000 --- a/rest_api_tests/functional/simple_REST.py +++ /dev/null @@ -1,170 +0,0 @@ -import json -import requests -import logging - - -logging.basicConfig() -LOG = logging.getLogger(__name__) - -class simple_REST: - - ROBOT_LIBRARY_SCOPE = 'GLOBAL' - __version__ = '0.1' - - headers = None - body = None - url = None - - def clear_headers(self): - """ - This function allows to clear headers for REST API requests - - Examples: - | *Clear Headers* | - | *Set Headers* | Content-Type | application/json | - """ - self.headers = [] - - def set_headers(self, headers_dict): - """ - This function allows to configure headers for REST API requests - - Examples: - | *Clear Headers* | - | *Set Headers* | Content-Type | application/json | - """ - try: - self.headers = json.loads(headers_dict) - except: - LOG.critical("Incorrect headers") - LOG.critical(self.headers) - - def update_headers(self, key, value): - """ - This function allows to modify headers for REST API requests - - Examples: - | *Clear Headers* | - | *Set Headers* | Content-Type | application/json | - | *Update Headers* | X-Auth-Token | 8808880808080808 | - """ - self.headers[key] = value - - def set_body(self, body_dict): - """ - This function allows to configure body for REST API requests - - Examples: - | *Clear Headers* | - | *Set Headers* | Content-Type | application/json | - | *Set Body* | {"name":"test"} | - | *POST request* | http://10.10.10.1:8082/environments | - """ - self.body = body_dict - - def get_headers(self): - """ - This function returns headers for REST API requests - - Examples: - | *Clear Headers* | - | *Set Headers* | Content-Type | application/json | - | ${headers} | *Get Headers* | - | *LOG* | ${headers} | - """ - return self.headers - - def GET_request(self, url): - """ - This function allows to send GET requests - - Examples: - | *Clear Headers* | - | *Set Headers* | Content-Type | application/json | - | *GET request* | http://10.10.10.1:8082/environments | - """ - self.response = requests.request('GET', url=url, headers=self.headers) - - def POST_request(self, url): - """ - This function allows to send POST requests - - Examples: - | *Clear Headers* | - | *Set Headers* | Content-Type | application/json | - | *Set Body* | {"name":"test"} | - | *POST request* | http://10.10.10.1:8082/environments | - """ - self.response = requests.request('POST', url, - headers=self.headers, - data=str(self.body)) - - def POST_request_without_body(self, url): - """ - This function allows to send POST requests - - Examples: - | *Clear Headers* | - | *Set Headers* | Content-Type | application/json | - | *Set Body* | {"name":"test"} | - | *POST request* | http://10.10.10.1:8082/environments | - """ - self.response = requests.request('POST', url, - headers=self.headers) - - def DELETE_request(self, url): - """ - This function allows to send DELETE requests - - Examples: - | *Clear Headers* | - | *Set Headers* | Content-Type | application/json | - | *DELETE request* | http://10.10.10.1:8082/environments | - """ - self.response = requests.request('DELETE', url=url, - headers=self.headers) - - def PUT_request(self, url): - """ - This function allows to send PUT requests - - Examples: - | *Clear Headers* | - | *Set Headers* | Content-Type | application/json | - | *Set Body* | {"name":"test-changed"} | - | *PUT request* | http://10.10.10.1:8082/634876 | - """ - self.response = requests.request('PUT', url, - headers=self.headers, - data=str(self.body)) - - def get_response_code(self): - """ - This function allows to get response code - - Examples: - | *Clear Headers* | - | *Set Headers* | Content-Type | application/json | - | *DELETE request* | http://10.10.10.1:8082/environments | - | ${code} | *Get Response Code* | - """ - if self.response: - if self.response.status_code != 200: - LOG.debug(self.response.text) - return self.response.status_code - - def get_response_body(self): - """ - This function allows to get response body - - Examples: - | *Clear Headers* | - | *Set Headers* | Content-Type | application/json | - | *GET request* | http://10.10.10.1:8082/environments | - | ${body} | *Get Response Body* | - """ - try: - return_text = json.loads(self.response.text) - except: - return_text = self.response.text - return return_text diff --git a/rest_api_tests/load_and_performance/MetaTests/TestMeta.conf b/rest_api_tests/load_and_performance/MetaTests/TestMeta.conf deleted file mode 100644 index 67e09f1..0000000 --- a/rest_api_tests/load_and_performance/MetaTests/TestMeta.conf +++ /dev/null @@ -1,27 +0,0 @@ -[main] -title = Test Report -description = Glazier API Performance Tests -url = http://172.18.78.92:8082/environments -meta_url = http://172.18.78.92:8084 - -[mix_for_load_testing] -description = The complex test with different random requests - -[ftest] -log_to = console file -log_path = test.log -result_path = result.xml -sleep_time_min = 0 -sleep_time_max = 0 - -[bench] -cycles = 5:10:25:50:75:100:125:150:175:200 -duration = 200 -startup_delay = 0.01 -sleep_time = 0.01 -cycle_time = 1 -log_to = -log_path = bench.log -result_path = result-bench.xml -sleep_time_min = 0 -sleep_time_max = 0.5 diff --git a/rest_api_tests/load_and_performance/MetaTests/config.ini b/rest_api_tests/load_and_performance/MetaTests/config.ini deleted file mode 100644 index 7d9862f..0000000 --- a/rest_api_tests/load_and_performance/MetaTests/config.ini +++ /dev/null @@ -1,5 +0,0 @@ -[keystone] -url = http://172.18.11.4:5000/v2.0/ -user = admin -password = swordfish -tenant = admin diff --git a/rest_api_tests/load_and_performance/MetaTests/test-requirements.txt b/rest_api_tests/load_and_performance/MetaTests/test-requirements.txt deleted file mode 100644 index 767c228..0000000 --- a/rest_api_tests/load_and_performance/MetaTests/test-requirements.txt +++ /dev/null @@ -1 +0,0 @@ -funkload>=1.16.1 diff --git a/rest_api_tests/load_and_performance/MetaTests/test_rest.py b/rest_api_tests/load_and_performance/MetaTests/test_rest.py deleted file mode 100644 index 065a201..0000000 --- a/rest_api_tests/load_and_performance/MetaTests/test_rest.py +++ /dev/null @@ -1,103 +0,0 @@ -import unittest -import json -import random -import logging -import ConfigParser -from funkload.utils import Data -from funkload.FunkLoadTestCase import FunkLoadTestCase -from keystoneclient.v2_0 import client as ksclient - - -logging.basicConfig() -LOG = logging.getLogger(' REST service tests') - -config = ConfigParser.RawConfigParser() -config.read('config.ini') -user = config.get('keystone', 'user') -password = config.get('keystone', 'password') -tenant = config.get('keystone', 'tenant') -keystone_url = config.get('keystone', 'url') -keystone_client = ksclient.Client(username=user, password=password, - tenant_name=tenant, auth_url=keystone_url) -token = str(keystone_client.auth_token) - -class TestMeta(FunkLoadTestCase): - - def setUp(self): - self.clearHeaders() - self.url = self.conf_get('main', 'meta_url') - self.setHeader('X-Auth-Token', token) - - def generate_num(self): - p="" - for i in xrange(10): - p += str(random.randint(0, 10)) - return p - - def test_get_ui_definitions(self): - url = self.url + "/" + "v1/client/ui" - resp = self.get(url, description="Get UI definitions") - assert resp.code == 200 - - def test_get_conductor_metadata(self): - url = self.url + "/" + "v1/client/conductor" - resp = self.get(url, description="Get conductor metadata") - assert resp.code == 200 - - def test_get_list_metadata_objects_workflows(self): - url = self.url + "/" + "v1/admin/workflows" - resp = self.get(url, description="Get list metadata objects(workflows)") - assert resp.code == 200 - - def test_get_list_metadata_objects_ui(self): - url = self.url + "/" + "v1/admin/ui" - resp = self.get(url, description="Get list metadata objects(ui)") - assert resp.code == 200 - - def test_get_list_metadata_objects_heat(self): - url = self.url + "/" + "v1/admin/heat" - resp = self.get(url, description="Get list metadata objects(heat)") - assert resp.code == 200 - - def test_get_list_metadata_objects_agent(self): - url = self.url + "/" + "v1/admin/agent" - resp = self.get(url, description="Get list metadata objects(agent)") - assert resp.code == 200 - - def test_get_list_metadata_objects_scripts(self): - url = self.url + "/" + "v1/admin/scripts" - resp = self.get(url, description="Get list metadata objects(scripts)") - assert resp.code == 200 - - def test_create_and_delete_dir(self): - typ = ['ui', 'workflows', 'agent', 'heat', 'scripts'] - random.shuffle(typ) - url = self.url + "/v1/admin/" + typ[1] + "/" + "folder" +\ - self.generate_num() - resp = self.put(url, description="Create folder") - response = self.delete(url, description="Delete folder") - assert resp.code == 200 - assert response.code == 200 - - def mix_for_load_testing(self): - k = random.randint(0,100) - if k < 12: - return self.test_get_ui_definitions() - elif k < 24: - return self.test_get_conductor_metadata() - elif k < 36: - return self.test_get_list_metadata_objects_workflows() - elif k < 48: - return self.test_get_list_metadata_objects_ui() - elif k < 60: - return self.test_get_list_metadata_objects_heat() - elif k < 72: - return self.test_get_list_metadata_objects_agent() - elif k < 84: - return self.test_get_list_metadata_objects_scripts() - elif k < 100: - return self.test_create_and_delete_dir() - - -if __name__ == '__main__': - unittest.main() diff --git a/rest_api_tests/load_and_performance/TestSuite.conf b/rest_api_tests/load_and_performance/TestSuite.conf deleted file mode 100644 index 36cc6a1..0000000 --- a/rest_api_tests/load_and_performance/TestSuite.conf +++ /dev/null @@ -1,26 +0,0 @@ -[main] -title = Test Report -description = Glazier API Performance Tests -url = http://172.18.78.92:8082/environments - -[mix_for_load_testing] -description = The complex test with different random requests - -[ftest] -log_to = console file -log_path = test.log -result_path = result.xml -sleep_time_min = 0 -sleep_time_max = 0 - -[bench] -cycles = 1:5:10:20:50:100 -duration = 200 -startup_delay = 0.01 -sleep_time = 0.01 -cycle_time = 1 -log_to = -log_path = bench.log -result_path = result-bench.xml -sleep_time_min = 0 -sleep_time_max = 0.5 diff --git a/rest_api_tests/load_and_performance/config.ini b/rest_api_tests/load_and_performance/config.ini deleted file mode 100644 index dfcc39f..0000000 --- a/rest_api_tests/load_and_performance/config.ini +++ /dev/null @@ -1,5 +0,0 @@ -[keystone] -url = http://172.18.124.202:5000/v2.0/ -user = sergey_demo_user -password = 111 -tenant = ForTests diff --git a/rest_api_tests/load_and_performance/test_rest.py b/rest_api_tests/load_and_performance/test_rest.py deleted file mode 100644 index 33267a4..0000000 --- a/rest_api_tests/load_and_performance/test_rest.py +++ /dev/null @@ -1,298 +0,0 @@ -import unittest -import json -import random -import logging -import ConfigParser -from funkload.utils import Data -from funkload.FunkLoadTestCase import FunkLoadTestCase -from keystoneclient.v2_0 import client as ksclient - - -logging.basicConfig() -LOG = logging.getLogger(' REST service tests') - - -class TestSuite(FunkLoadTestCase): - - def setUp(self): - self.clearHeaders() - self.url = self.conf_get('main', 'url') - config = ConfigParser.RawConfigParser() - config.read('config.ini') - user = config.get('keystone', 'user') - password = config.get('keystone', 'password') - tenant = config.get('keystone', 'tenant') - keystone_url = config.get('keystone', 'url') - keystone_client = ksclient.Client(username=user, password=password, - tenant_name=tenant, auth_url=keystone_url) - token = str(keystone_client.auth_token) - self.environments = [] - self.setHeader('X-Auth-Token', token) - - def tearDown(self): - for i in self.environments: - try: - self.action_delete_environment(i) - except: - pass - - def generate_num(self): - p="" - for i in xrange(10): - p += str(random.randint(0,10)) - return p - - def action_create_environment(self): - self.setHeader('Content-Type', 'application/json') - name = "Environment" + self.generate_num() - body = '{"name": "%s"}' % name - - response = self.post(self.url, params=Data('application/json', body), - description="Create Environment") - assert response.code == 200 - - result = json.loads(self.getBody()) - return str(result['id']) - - def action_delete_environment(self, env_id): - url = self.url + '/' + str(env_id) - response = self.delete(url, description="Delete Environment") - assert response.code == 200 - - def action_get_session_for_environment(self, env_id): - self.setHeader('Content-Type', 'application/json') - - url = self.url + '/' + str(env_id) + '/configure' - response = self.post(url, description="Get Session For Environment") - assert response.code == 200 - - result = json.loads(self.getBody()) - return str(result['id']) - - - def action_create_service_ad(self, env_id, session_id, name='ad'): - self.setHeader('Content-Type', 'application/json') - self.setHeader('X-Configuration-Session', str(session_id)) - - body = ('{"type": "activeDirectory", "name": "%s",' - '"adminPassword": "P@ssw0rd", "domain": "%s.local",' - '"availabilityZone": "nova", "unitNamingPattern": "",' - '"flavor": "m1.medium", "osImage": {"type": "ws-2012-std",' - '"name": "ws-2012-std",' - '"title": "Windows Server 2012 Standard"},' - '"configuration": "standalone",' - '"units": [{"isMaster": "True", "recoveryPassword": "P@ssw0rd",' - '"location": "west-dc"}]}') % (name,name) - - url = self.url + '/' + env_id + '/services' - - response = self.post(url, params=Data('application/json', body), - description="Create AD service") - assert response.code == 200 - - def action_create_service_iis(self, env_id, session_id, name='iis'): - self.setHeader('Content-Type', 'application/json') - self.setHeader('X-Configuration-Session', str(session_id)) - - body = ('{"type": "webServer", "domain": "",' - '"availabilityZone": "nova", "name": "%s",' - '"adminPassword": "P@ssw0rd", "unitNamingPattern": "",' - '"osImage": {"type": "ws-2012-std", "name": "ws-2012-std",' - '"title": "Windows Server 2012 Standard"},' - '"units": [{}], "credentials": {"username": "Administrator",' - '"password": "P@ssw0rd"},' - '"flavor": "m1.medium"}') % name - - url = self.url + '/' + env_id + '/services' - response = self.post(url, params=Data('application/json', body), - description="Create IIS service") - assert response.code == 200 - - def action_create_service_aspnet(self, env_id, session_id, name='aspnet'): - self.setHeader('Content-Type', 'application/json') - self.setHeader('X-Configuration-Session', str(session_id)) - - body = ('{"type": "aspNetApp", "domain": "",' - '"availabilityZone": "nova", "name": "%s", "repository":' - '"git://github.com/Mirantis/murano-mvc-demo.git",' - '"adminPassword": "P@ssw0rd", "unitNamingPattern": "",' - '"osImage": {"type": "ws-2012-std", "name": "ws-2012-std",' - '"title": "Windows Server 2012 Standard"},' - '"units": [{}], "credentials": {"username": "Administrator",' - '"password": "P@ssw0rd"},' - '"flavor": "m1.medium"}') % name - - url = self.url + '/' + env_id + '/services' - response = self.post(url, params=Data('application/json', body), - description="Create ASP.Net service") - assert response.code == 200 - - def action_create_service_iis_farm(self, env_id, session_id, name='iis_farm'): - self.setHeader('Content-Type', 'application/json') - self.setHeader('X-Configuration-Session', str(session_id)) - - body = ('{"type": "webServerFarm", "domain": "",' - '"availabilityZone": "nova", "name": "%s",' - '"adminPassword": "P@ssw0rd", "loadBalancerPort": 80,' - '"unitNamingPattern": "",' - '"osImage": {"type": "ws-2012-std", "name": "ws-2012-std",' - '"title": "Windows Server 2012 Standard"},' - '"units": [{}, {}],' - '"credentials": {"username": "Administrator",' - '"password": "P@ssw0rd"}, "flavor": "m1.medium"}') % name - - url = self.url + '/' + env_id + '/services' - response = self.post(url, params=Data('application/json', body), - description="Create IIS farm service") - assert response.code == 200 - - def action_create_service_aspnet_farm(self, env_id, session_id, - name='aspnet_farm'): - self.setHeader('Content-Type', 'application/json') - self.setHeader('X-Configuration-Session', str(session_id)) - - body = ('{"type": "aspNetAppFarm", "domain": "",' - '"availabilityZone": "nova", "name": "%s",' - '"repository": "git://github.com/Mirantis/murano-mvc-demo.git",' - '"adminPassword": "P@ssw0rd", "loadBalancerPort": 80,' - '"unitNamingPattern": "",' - '"osImage": {"type": "ws-2012-std", "name": "ws-2012-std",' - '"title": "Windows Server 2012 Standard"},' - '"units": [{}, {}],' - '"credentials": {"username": "Administrator",' - '"password": "P@ssw0rd"}, "flavor": "m1.medium"}') % name - - url = self.url + '/' + env_id + '/services' - response = self.post(url, params=Data('application/json', body), - description="Create ASP.Net farm service") - assert response.code == 200 - - def action_create_service_sql(self, env_id, session_id, name='sql'): - self.setHeader('Content-Type', 'application/json') - self.setHeader('X-Configuration-Session', str(session_id)) - - body = ('{"type": "msSqlServer", "domain": "",' - '"availabilityZone": "nova", "name": "%s",' - '"adminPassword": "P@ssw0rd", "unitNamingPattern": "",' - '"saPassword": "P@ssw0rd", "mixedModeAuth": "True",' - '"osImage": {"type": "ws-2012-std", "name": "ws-2012-std",' - '"title": "Windows Server 2012 Standard"},"units": [{}],' - '"credentials": {"username": "Administrator",' - '"password": "P@ssw0rd"}, "flavor": "m1.medium"}') % name - - url = self.url + '/' + env_id + '/services' - response = self.post(url, params=Data('application/json', body), - description="Create MSSQL service") - assert response.code == 200 - - def action_create_service_linux_agent(self, env_id, session_id, - name='linuxAgent'): - self.setHeader('Content-Type', 'application/json') - self.setHeader('X-Configuration-Session', str(session_id)) - - body = ('{"availabilityZone": "nova", "name": "%s",' - '"deployTelnet": "True", "unitNamingPattern": "",' - '"osImage": {"type": "linux",' - '"name": "F18-x86_64-cfntools-MURANO",' - '"title": "Linux with vNext agent"}, "units": [{}],' - '"flavor": "m1.medium", "type": "linuxTelnetService"}') % name - - url = self.url + '/' + env_id + '/services' - response = self.post(url, params=Data('application/json', body), - description="Create Linux Agent service") - assert response.code == 200 - - def test_create_and_delete_environment(self): - env_id = self.action_create_environment() - self.environments.append(env_id) - self.action_delete_environment(env_id) - self.environments.pop(self.environments.index(env_id)) - - def test_get_list_of_environments(self): - response = self.get(self.url, description="Get List Of Environments") - assert response.code == 200 - - def test_create_environment_with_ad(self): - env_id = self.action_create_environment() - self.environments.append(env_id) - session_id = self.action_get_session_for_environment(env_id) - self.action_create_service_ad(env_id, session_id, 'test1') - self.action_create_service_ad(env_id, session_id, 'test2') - self.action_create_service_ad(env_id, session_id, 'test3') - self.action_delete_environment(env_id) - self.environments.pop(self.environments.index(env_id)) - - def test_create_environment_with_iis(self): - env_id = self.action_create_environment() - self.environments.append(env_id) - session_id = self.action_get_session_for_environment(env_id) - self.action_create_service_iis(env_id, session_id, 'test1') - self.action_create_service_iis(env_id, session_id, 'test2') - self.action_create_service_iis(env_id, session_id, 'test3') - self.action_delete_environment(env_id) - self.environments.pop(self.environments.index(env_id)) - - def test_create_environment_with_aspnet(self): - env_id = self.action_create_environment() - self.environments.append(env_id) - session_id = self.action_get_session_for_environment(env_id) - self.action_create_service_aspnet(env_id, session_id, 'test1') - self.action_delete_environment(env_id) - self.environments.pop(self.environments.index(env_id)) - - def test_create_environment_with_iis_farm(self): - env_id = self.action_create_environment() - self.environments.append(env_id) - session_id = self.action_get_session_for_environment(env_id) - self.action_create_service_iis_farm(env_id, session_id, 'test1') - self.action_delete_environment(env_id) - self.environments.pop(self.environments.index(env_id)) - - def test_create_environment_with_aspnet_farm(self): - env_id = self.action_create_environment() - self.environments.append(env_id) - session_id = self.action_get_session_for_environment(env_id) - self.action_create_service_aspnet_farm(env_id, session_id, 'test1') - self.action_delete_environment(env_id) - self.environments.pop(self.environments.index(env_id)) - - def test_create_environment_with_sql(self): - env_id = self.action_create_environment() - self.environments.append(env_id) - session_id = self.action_get_session_for_environment(env_id) - self.action_create_service_sql(env_id, session_id, 'test1') - self.action_delete_environment(env_id) - self.environments.pop(self.environments.index(env_id)) - - def test_create_environment_with_linux_agent(self): - env_id = self.action_create_environment() - self.environments.append(env_id) - session_id = self.action_get_session_for_environment(env_id) - self.action_create_service_linux_agent(env_id, session_id, 'test1') - self.action_delete_environment(env_id) - self.environments.pop(self.environments.index(env_id)) - - def mix_for_load_testing(self): - k = random.randint(0,100) - if k < 5: - return self.test_create_and_delete_environment() - elif k < 10: - return self.test_get_list_of_environments() - elif k < 23: - return self.test_create_environment_with_ad() - elif k < 36: - return self.test_create_environment_with_iis() - elif k < 49: - return self.test_create_environment_with_aspnet() - elif k < 62: - return self.test_create_environment_with_iis_farm() - elif k < 75: - return self.test_create_environment_with_aspnet_farm() - elif k < 88: - return self.test_create_environment_with_sql() - elif k < 100: - return self.test_create_environment_with_linux_agent() - - -if __name__ == '__main__': - unittest.main() diff --git a/selenium-old/__init__.py b/selenium-old/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/selenium-old/conf.ini b/selenium-old/conf.ini deleted file mode 100644 index 12af6f5..0000000 --- a/selenium-old/conf.ini +++ /dev/null @@ -1,4 +0,0 @@ -[server] -address=http://172.18.124.101:8080 -user=admin -password=swordfish \ No newline at end of file diff --git a/selenium-old/features/__init__.py b/selenium-old/features/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/selenium-old/features/active_directories.feature b/selenium-old/features/active_directories.feature deleted file mode 100644 index 7c180d8..0000000 --- a/selenium-old/features/active_directories.feature +++ /dev/null @@ -1,18 +0,0 @@ -Feature: Active Directories - - Scenario: Create AD service with 1 instance - Given browser with new environment "test01" details page - When I create AD service "ad.local" with 1 instances - Then page should contain link "ad.local" - - Scenario: Create AD service with 3 instances - Given browser with new environment "test02" details page - When I create AD service "AD.net" with 3 instances - Then page should contain link "AD.net" - - Scenario: Create a few AD services - Given browser with new environment "test03" details page - When I create AD service "AD.net" with 1 instances - And I create AD service "test_ad.service" with 2 instances - Then page should contain link "AD.net" - And page should contain link "test_ad.service" \ No newline at end of file diff --git a/selenium-old/features/deploy_environments.feature b/selenium-old/features/deploy_environments.feature deleted file mode 100644 index 30ffc18..0000000 --- a/selenium-old/features/deploy_environments.feature +++ /dev/null @@ -1,55 +0,0 @@ -Feature: Deploy environments - - - Scenario: Deploy environment with AD service - Given browser with new environment "env1_for_deploy" details page - When I create AD service "ad.test" with 1 instances - And I deploy environment "env1_for_deploy" - Then environment "env1_for_deploy" has status "Deploy In Progress" - And environment "env1_for_deploy" has progress bar - - - Scenario: Check status of AD service - Given browser with environment "env1_for_deploy" details page - Then service "ad.test" has status "Deploy In Progress" - And service "ad.test" has progress bar - - - Scenario: Deploy environment with IIS service - Given browser with new environment "env2_for_deploy" details page - When I create IIS service "iis_service" without domain - And I deploy environment "env2_for_deploy" - Then environment "env2_for_deploy" has status "Deploy In Progress" - And environment "env2_for_deploy" has progress bar - - - Scenario: Check status of IIS service - Given browser with environment "env2_for_deploy" details page - Then service "iis_service" has status "Deploy In Progress" - And service "iis_service" has progress bar - - - Scenario: Deploy environment with AD and IIS services - Given browser with new environment "env3_for_deploy" details page - When I create AD service "ad.test" with 2 instances - And I create IIS service "iis_service" in domain ad.test - And I create IIS service "iis_service2" in domain ad.test - And I deploy environment "env3_for_deploy" - Then environment "env3_for_deploy" has status "Deploy In Progress" - And environment "env3_for_deploy" has progress bar - - - Scenario: Check environment status before deploy - Given browser with new environment "env4_for_deploy" details page - When I create AD service "ad-test" with 1 instances - And I create IIS service "iis_service" in domain ad-test - Then environment "env4_for_deploy" has status "Ready To Deploy" - And environment "env4_for_deploy" has no progress bar - - - Scenario: Check status of services before deploy - Given browser with environment "env4_for_deploy" details page - Then service "ad-test" has status "Ready To Deploy" - And service "ad-test" has no progress bar - And service "iis_service" has status "Ready To Deploy" - And service "iis_service" has no progress bar \ No newline at end of file diff --git a/selenium-old/features/environment.py b/selenium-old/features/environment.py deleted file mode 100644 index ed8c625..0000000 --- a/selenium-old/features/environment.py +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) 2013 Mirantis Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import logging -from datetime import datetime -from steps.login_page import LoginPage -from steps.boffin.dblogger import DBLogger -from selenium import webdriver - -LOG = logging.getLogger(__name__) - - -def before_all(context): - context.screenshots = True - context.dblogger_host = 'localhost' - context.driver = webdriver.Firefox() - context.page = LoginPage(context) - context.page.login() - - context.logger.test_suite_start("WEB UI sanity tests") - - - -def after_all(context): - context.driver.close() - context.logger.test_suite_finish() - - -def before_tag(context, tag): - if tag == 'time': - context.start = datetime.now() - - -def after_tag(context, tag): - if tag == 'time': - result = datetime.now() - context.start - LOG.info("Elapsed time: " + str(result)) - - -def before_scenario(context, scenario): - context.logger.test_case_start(scenario) diff --git a/selenium-old/features/environments.feature b/selenium-old/features/environments.feature deleted file mode 100644 index cd5376b..0000000 --- a/selenium-old/features/environments.feature +++ /dev/null @@ -1,24 +0,0 @@ -Feature: Environments - - - Scenario: Create environment - Given browser with Environments page - When I create environment "env1" - Then page should contain link "env1" - - Scenario: Delete environment - Given browser with Environments page - When I create environment "env2" - And I delete environment "env2" - Then page should not contain link "env2" - - Scenario: Delete environments - Given browser with Environments page - When I create environment "env3" - And I create environment "env4" - And I create environment "env5" - And I delete environment "env3" - And I delete environment "env5" - Then page should not contain link "env3" - And page should not contain link "env5" - And page should contain link "env4" \ No newline at end of file diff --git a/selenium-old/features/iis.feature b/selenium-old/features/iis.feature deleted file mode 100644 index 9f6835c..0000000 --- a/selenium-old/features/iis.feature +++ /dev/null @@ -1,21 +0,0 @@ -Feature: IIS service - - Scenario: Create IIS service without domain - Given browser with new environment "iis_test01" details page - When I create IIS service "iis" without domain - Then page should contain link "iis" - - Scenario: Create IIS service with domain - Given browser with new environment "iis_test02" details page - When I create AD service "ad.service" with 1 instances - And I create IIS service "iis.server" in domain ad.service - Then page should contain link "iis.server" - - Scenario: Create a few IIS services - Given browser with new environment "iis_test03" details page - When I create AD service "AD-NET" with 1 instances - And I create AD service "ad.service" with 2 instances - And I create IIS service "iis.server1" in domain AD-NET - And I create IIS service "iis.server2" in domain ad.service - Then page should contain link "iis.server1" - And page should contain link "iis.server2" \ No newline at end of file diff --git a/selenium-old/features/service_details.feature b/selenium-old/features/service_details.feature deleted file mode 100644 index 5cb636a..0000000 --- a/selenium-old/features/service_details.feature +++ /dev/null @@ -1,16 +0,0 @@ -Feature: services details - - Scenario: Check AD service parameters in details - Given browser with new environment "d_test01" details page - When I create AD service "ad" with 1 instances - And I navigate to service "ad" details page - Then service name should be equal to "ad" - And service domain should be equal to "ad" - - Scenario: Check IIS service parameters in details - Given browser with new environment "d_test02" details page - When I create AD service "ad.test" with 1 instances - And I create IIS service "iis_service" in domain ad.test - And I navigate to service "iis_service" details page - Then service name should be equal to "iis_service" - And service domain should be equal to "ad.test" \ No newline at end of file diff --git a/selenium-old/features/steps/__init__.py b/selenium-old/features/steps/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/selenium-old/features/steps/_steps.py b/selenium-old/features/steps/_steps.py deleted file mode 100644 index 2551cce..0000000 --- a/selenium-old/features/steps/_steps.py +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright (c) 2013 Mirantis Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from login_page import LoginPage -from environments_page import EnvironmentsPage -from services_page import ServicesPage -from selenium import webdriver -from behave import * - - -def check(browser, condition): - if condition: - browser.logger.test_case_finish() - else: - screenshot = browser.driver.get_screenshot_as_base64() - browser.dblogger.save_screenshot(screenshot) - browser.dblogger.test_case_finish('FAILED') - assert condition - - -@given('browser with Environments page') -def step(browser): - browser.page.Navigate('Project>Environments') - browser.page = EnvironmentsPage(browser) - - -@given('browser with environment "{environment_name}" details page') -def step(browser, environment_name): - browser.page.Navigate("Project>Environments>%s" % environment_name) - browser.page = ServicesPage(browser) - - -@given('browser with new environment "{environment_name}" details page') -def step(browser, environment_name): - page = browser.page - page.Navigate("Project>Environments") - page = EnvironmentsPage(browser) - page.create_environment(environment_name) - - page.Link(environment_name).Click() - browser.page = ServicesPage(browser) - - -@when('I create environment "{environment_name}"') -def step(browser, environment_name): - browser.page.create_environment(environment_name) - - -@when('I create AD service "{ad_name}" with {ad_count} instances') -def step(browser, ad_name, ad_count=1): - parameters = {'1-dc_name': ad_name, - '1-dc_count': ad_count, - '1-adm_password': "P@ssw0rd", - '1-recovery_password': "P@ssw0rd2"} - browser.page.create_service('Active Directory', parameters) - - -@when('I create IIS service "{iis_name}" without domain') -@when('I create IIS service "{iis_name}" in domain {iis_domain}') -def step(browser, iis_name, iis_domain=''): - parameters = {'1-iis_name': iis_name, - '1-adm_password': "P@ssw0rd", - '1-iis_domain': iis_domain} - browser.page.create_service('Internet Information Services', parameters) - - -@when('I delete environment "{environment_name}"') -def step(browser, environment_name): - browser.page.delete_environment(environment_name) - - -@when('I navigate to service "{service_name}" details page') -def step(browser, service_name): - page = browser.page - page.Navigate(service_name) - page.Link('Service').Click() - - -@then('page should contain link "{link_text}"') -def step(browser, link_text): - check(browser, browser.page.Link(link_text).isPresented()) - - -@then('page should not contain link "{link_text}"') -def step(browser, link_text): - check(browser, not browser.page.Link(link_text).isPresented()) - - -@then('service name should be equal to "{service_name}"') -def step(browser, service_name): - text = browser.page.TableCell('Name').Text() - check(browser, text == service_name) - - -@then('service domain should be equal to "{service_domain}"') -def step(browser, service_domain): - text = browser.page.TableCell('Domain').Text() - check(browser, text == service_domain) - - -@then('{element} "{element_name}" has {parameter}') -def step(browser, element, element_name, parameter): - page = browser.page - status = "" - if element == 'environment': - status = page.get_environment_status(element_name) - elif element == 'service': - status = page.get_service_status(element_name) - - progress_bar = '' - - if 'status' in parameter: - check(browser, parameter[8:-1] in status) - elif 'no progress bar' in parameter: - check(browser, not progress_bar in status) - elif 'progress bar' in parameter: - check(browser, progress_bar in status) diff --git a/selenium-old/features/steps/boffin/__init__.py b/selenium-old/features/steps/boffin/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/selenium-old/features/steps/boffin/dblogger.py b/selenium-old/features/steps/boffin/dblogger.py deleted file mode 100644 index 59340fa..0000000 --- a/selenium-old/features/steps/boffin/dblogger.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright (c) 2013 Mirantis Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging -from log4mongo.handlers import MongoHandler - - -class DBLogger: - """ - This class allows to save all log messages to the data base - based on Mango DB - it is the simple data base with good interfaces. - Please, see for more detailed information: - https://github.com/log4mongo - """ - - logger = None - test_suite = "Test Suite" - test_case = "Test Case" - - def __init__(self, dbhost = 'localhost'): - """ - Initialization of the Data Base Logger. - if dbhost == None this class will not use Data Base. - """ - self.logger = logging.getLogger('DBLogger') - - if dbhost: - self.logger.addHandler(MongoHandler(host=dbhost)) - - def test_suite_start(self, suite_name): - self.test_suite = str(suite_name) - self.logger.info("Test Suite started.", - extra={'suite_name': self.test_suite}) - - def test_suite_finish(self): - self.logger.info("Test Suite finished.", - extra={'suite_name': self.test_suite}) - - def test_case_start(self, test_case_name): - self.test_case = str(test_case_name) - self.logger.info("Test Case started.", - extra={'test_case_name': self.test_case, - 'test_suite': self.test_suite}) - - def test_case_finish(self, result='PASSED'): - self.logger.info("Test Case finished.", - extra={'test_case_name': self.test_case, - 'test_suite': self.test_suite, - 'result': str(result)}) - - def save_screenshot(self, base64_screenshot): - " This function allow to save screenshots in database " - self.logger.info("Screenshot", - extra={'test_suite': self.test_suite, - 'test_case': self.test_case, - 'screenshot': str(base64_screenshot)}) - - def info(self, message): - " wrapper for standard logger interface " - self.logger.info(message, - extra={'test_suite': self.test_suite, - 'test_case': self.test_case}) - - def debug(self, message): - " wrapper for standard logger interface " - self.logger.debug(message, - extra={'test_suite': self.test_suite, - 'test_case': self.test_case}) - - def warning(self, message): - " wrapper for standard logger interface " - self.logger.warning(message, - extra={'test_suite': self.test_suite, - 'test_case': self.test_case}) - - def critical(self, message): - " wrapper for standard logger interface " - self.logger.critical(message, - extra={'test_suite': self.test_suite, - 'test_case': self.test_case}) - - def error(self, message): - " wrapper for standard logger interface " - self.logger.error(message, - extra={'test_suite': self.test_suite, - 'test_case': self.test_case}) diff --git a/selenium-old/features/steps/boffin/elements.py b/selenium-old/features/steps/boffin/elements.py deleted file mode 100644 index 4cc8a68..0000000 --- a/selenium-old/features/steps/boffin/elements.py +++ /dev/null @@ -1,133 +0,0 @@ -# Copyright (c) 2013 Mirantis Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging -from selenium.webdriver.support.ui import Select - -logging.basicConfig() -LOG = logging.getLogger('elements') - - -class TableCellClass: - table = None - - def __init__(self, obj): - if not obj: - LOG.error('TableCell does not found') - self.table = obj - - def Text(self): - if self.table: - LOG.critical(self.table.text) - return self.table.text - else: - return '' - - -class ButtonClass: - button = None - - def __init__(self, obj): - if not obj: - LOG.error('Button does not found') - self.button = obj - - def Click(self): - if self.button: - self.button.click() - - def isPresented(self): - if self.button: - return True - return False - - -class LinkClass: - link = None - - def __init__(self, obj): - if not obj: - LOG.error('Link does not found') - self.link = obj - - def Click(self): - if self.link: - self.link.click() - - def isPresented(self): - if self.link: - return True - return False - - def Address(self): - if self.link: - return self.link.get_attribute('href') - else: - return '' - - -class EditBoxClass: - - def __init__(self, obj): - if not obj: - LOG.error('EditBox does not found') - self.edit = obj - - def isPresented(self): - if self.edit: - return True - return False - - def Set(self, value): - if self.edit: - try: - self.edit.clear() - self.edit.send_keys(value) - except: - LOG.error('Can not set value for text box.') - - def Text(self): - if self.edit: - return self.edit.get_text() - else: - return '' - - -class DropDownListClass: - select = None - - def __init__(self, obj): - if not obj: - LOG.error('DropDownList does not found') - self.select = obj - - def isPresented(self): - if self.select is not None: - return True - return False - - def Set(self, value): - if self.select: - try: - Select(self.select).select_by_visible_text(value) - except: - message = "Can not select element %s from drop down list." - LOG.error(message % value) - - def Text(self): - if self.select: - return self.select.get_text() - else: - return '' diff --git a/selenium-old/features/steps/boffin/objects_library.py b/selenium-old/features/steps/boffin/objects_library.py deleted file mode 100644 index 9130d3f..0000000 --- a/selenium-old/features/steps/boffin/objects_library.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) 2013 Mirantis Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import xml.etree.ElementTree as ET - - -class ObjectsLibrary: - objects = [] - - def __init__(self, file_name=None): - """ - Initialization of the Objects Library. - Read objects descriptions from XML file. - """ - - if file_name: - tree = ET.parse(file_name) - objects = tree.getroot() - for element in objects: - obj = {} - for parameter in element: - obj.update({parameter.tag: parameter.text}) - self.objects.append(obj) - - def get_object(self, name): - """ - Search objects in Objects Library. - """ - - for object in self.objects: - if object['name'] == name: - return object['parameter'] - return None diff --git a/selenium-old/features/steps/boffin/page.py b/selenium-old/features/steps/boffin/page.py deleted file mode 100644 index b7d8e9f..0000000 --- a/selenium-old/features/steps/boffin/page.py +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright (c) 2013 Mirantis Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import logging -import elements -import objects_library -import dblogger - - -""" - Disable selenium logging: -""" -logging.basicConfig() -logger = logging.getLogger('selenium.webdriver.remote.remote_connection') -logger.setLevel('ERROR') - - -error_msg = """ - Object with parameter: %s - does not found on page. - """ - - -class Page: - - driver = None - timeout = 60 - lib = None - name = None - - def __init__(self, context): - context.driver.set_page_load_timeout(self.timeout) - context.driver.implicitly_wait(0.1) - self.driver = context.driver - - db_host = getattr(context, 'dblogger_host', None) - context.logger = dblogger.DBLogger(dbhost = db_host) - self.context = context - - def _find_element(self, name, parameter=None): - """ - This method allows to find element, - based on descriptions in Object Library, - xpath, id, name or pertial link text. - If parameter != None will be used name % parameter - """ - - lib_name = "objects/objects.xml" - if self.name: - lib_name = "objects/%s.xml" % self.name - lib = objects_library.ObjectsLibrary(lib_name) - - if lib.get_object(name): - name = lib.get_object(name) - - if parameter: - name = name % parameter - - obj = None - k = 0 - - while (obj is None and k < self.timeout): - k += 1 - - try: - obj = self.driver.find_element_by_name(name) - return obj - except: - pass - try: - obj = self.driver.find_element_by_id(name) - return obj - except: - pass - try: - obj = self.driver.find_element_by_xpath(name) - return obj - except: - pass - try: - obj = self.driver.find_element_by_partial_link_text(name) - return obj - except: - pass - - self.context.logger.error(error_msg % name) - return None - - def Open(self, url): - self.driver.get(url) - - def Refresh(self): - self.driver.refresh() - - def TableCell(self, name, parameter=None): - obj = self._find_element(name, parameter) - table = elements.TableCellClass(obj) - return table - - def Button(self, name, parameter=None): - obj = self._find_element(name, parameter) - button = elements.ButtonClass(obj) - return button - - def Link(self, name, parameter=None): - obj = self._find_element(name, parameter) - link = elements.LinkClass(obj) - return link - - def EditBox(self, name, parameter=None): - obj = self._find_element(name, parameter) - edit = elements.EditBoxClass(obj) - return edit - - def DropDownList(self, name, parameter=None): - obj = self._find_element(name, parameter) - select = elements.DropDownListClass(obj) - return select - - def Navigate(self, path): - """ - This method allows to navigate by - webUI menu button and links to - the specific page - """ - steps = path.split('>') - - for step in steps: - self.Button(step).Click() - - self.driver.refresh() diff --git a/selenium-old/features/steps/environments_page.py b/selenium-old/features/steps/environments_page.py deleted file mode 100644 index c6b2bfa..0000000 --- a/selenium-old/features/steps/environments_page.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2013 Mirantis Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import re -from services_page import ServicesPage -import boffin.page as page - - -class EnvironmentsPage(page.Page): - name = 'Environments' - - def create_environment(self, name): - self.Button('Create Environment').Click() - self.EditBox('id_name').Set(name) - self.Button('Create').Click() - - def delete_environment(self, name): - link = self.Link(name).Address() - environment_id = re.search('tabula/(\S+)', link).group(0)[7:-1] - - self.Button('More', environment_id).Click() - self.Button('Delete', environment_id).Click() - # confirm: - self.Button('Delete Environment').Click() - - def deploy_environment(self, name): - link = self.Link(name).Address() - environment_id = re.search('tabula/(\S+)', link).group(0)[7:-1] - - self.Button('More', environment_id).Click() - self.Button('Deploy', environment_id).Click() - - def get_environment_status(self, name): - link = self.Link(name).Address() - environment_id = re.search('tabula/(\S+)', link).group(0)[7:-1] - - return self.TableCell('Status', environment_id).Text() diff --git a/selenium-old/features/steps/login_page.py b/selenium-old/features/steps/login_page.py deleted file mode 100644 index 40e920a..0000000 --- a/selenium-old/features/steps/login_page.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2013 Mirantis Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import ConfigParser -import boffin.page as page - - -class LoginPage(page.Page): - - def login(self): - config = ConfigParser.RawConfigParser() - config.read('conf.ini') - url = config.get('server', 'address') - user = config.get('server', 'user') - password = config.get('server', 'password') - - self.Open(url) - - self.EditBox('username').Set(user) - self.EditBox('password').Set(password) - xpath = "//button[@type='submit']" - self.Button(xpath).Click() diff --git a/selenium-old/features/steps/services_page.py b/selenium-old/features/steps/services_page.py deleted file mode 100644 index fa7ad90..0000000 --- a/selenium-old/features/steps/services_page.py +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2013 Mirantis Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import boffin.page as page -import re - - -class ServicesPage(page.Page): - - name = 'Services' - - def create_service(self, service_type, parameters): - self.Button('CreateService').Click() - self.DropDownList('0-service').Set(service_type) - self.Button('wizard_goto_step').Click() - - for key in parameters: - try: - self.EditBox(key).Set(parameters[key]) - except: - self.DropDownList(key).Set(parameters[key]) - self.Button('Create').Click() - - def delete_service(self, name): - link = self.Link(name).Address() - - service_id = re.search('tabula/(\S+)', link).group(0)[7:-1] - - self.Button('More', service_id).Click() - self.Button('Delete', service_id).Click() - # confirm: - self.Button('Delete Service').Click() - - def get_service_status(self, name): - link = self.Link(name).Address() - service_id = re.search('tabula/(\S+)', link).group(0)[7:-8] - - return self.TableCell('Status', service_id).Text() diff --git a/selenium-old/objects/Environments.xml b/selenium-old/objects/Environments.xml deleted file mode 100644 index 06a91b5..0000000 --- a/selenium-old/objects/Environments.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - Button - More - .//*[@id='tabula__row__%s']/td[4]/div/a[2] - - - Button - Create - //input[@value='Create'] - - - Button - Delete - tabula__row_%s__action_delete - - - Button - Deploy - tabula__row_%s__action_deploy - - - TableCell - Status - .//*[@id='tabula__row__%s']/td[3] - - \ No newline at end of file diff --git a/selenium-old/objects/Services.xml b/selenium-old/objects/Services.xml deleted file mode 100644 index 3cc962d..0000000 --- a/selenium-old/objects/Services.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - Button - More - .//*[@id='services__row__%s']/td[5]/div/a[2] - - - Button - Create - //input[@value='Create'] - - - Button - Delete - services__row_%s__action_delete - - - Button - CreateService - services__action_CreateService - - - TableCell - Name - .//*[@id='services_details___service']/div/dl/dd[1] - - - TableCell - Domain - .//*[@id='services_details___service']/div/dl/dd[3] - - - Link - Service - .//*[@id='services_details']/li[1]/a - - - TableCell - Status - .//*[@id='services__row__%s']/td[4] - - \ No newline at end of file diff --git a/selenium-old/objects/objects.xml b/selenium-old/objects/objects.xml deleted file mode 100644 index ff6ca19..0000000 --- a/selenium-old/objects/objects.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/selenium-old/setup.py b/selenium-old/setup.py deleted file mode 100644 index 71ff54e..0000000 --- a/selenium-old/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2013 Mirantis Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from distutils.core import setup, Command - - -class Behave(Command): - user_options = [] - def initialize_options(self): - pass - def finalize_options(self): - pass - def run(self): - import sys,subprocess - errno = subprocess.call([sys.executable, 'behave']) - raise SystemExit(errno) -setup( - #..., - cmdclass = {'tests': Behave}, - #..., -) diff --git a/selenium-old/tools/test-requires b/selenium-old/tools/test-requires deleted file mode 100644 index 0b7c4f9..0000000 --- a/selenium-old/tools/test-requires +++ /dev/null @@ -1,4 +0,0 @@ -selenium -unittest2 -behave -log4mongo \ No newline at end of file diff --git a/selenium-old/tox.ini b/selenium-old/tox.ini deleted file mode 100644 index 401665b..0000000 --- a/selenium-old/tox.ini +++ /dev/null @@ -1,17 +0,0 @@ -# Note: the following packages should be install: -# apt-get -y install firefox libstdc++5 xvfb x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic xserver-xorg-core -# Note: please, perform the following command -# before tests: -# Xvfb -fp /usr/share/fonts/X11/misc/ :22 -screen 0 1024x768x16 2>&1 & export DISPLAY=:22 - -[tox] -envlist = py27 -sitepackages=True - -[testenv] -setenv = VIRTUAL_ENV={envdir} - -deps = -r{toxinidir}/tools/test-requires -commands = apt-get -y install firefox libstdc++5 xvfb x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic xserver-xorg-core - Xvfb -fp /usr/share/fonts/X11/misc/ :22 -screen 0 1024x768x16 2>&1 & export DISPLAY=:22 - behave \ No newline at end of file diff --git a/tempest/README.md b/tempest/README.md deleted file mode 100644 index 2e787ae..0000000 --- a/tempest/README.md +++ /dev/null @@ -1 +0,0 @@ -All original files placed in https://github.com/Mirantis/tempest diff --git a/tempest/base.py b/tempest/base.py deleted file mode 100644 index d0e6d06..0000000 --- a/tempest/base.py +++ /dev/null @@ -1,781 +0,0 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2013 Mirantis, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import json -import socket -import requests -import os -import novaclient.v1_1.client as nvclient -import tempest.test -from tempest import clients -from tempest.common import rest_client -from tempest.services.image.v1.json.image_client import ImageClientJSON - - -class MuranoTest(tempest.test.BaseTestCase): - - @classmethod - def setUpClass(cls): - """ - This method allows to initialize authentication before - each test case and define parameters of Murano API Service - This method also create environment for all tests - """ - - super(MuranoTest, cls).setUpClass() - - if not cls.config.service_available.murano: - raise cls.skipException("Murano tests is disabled") - user = cls.config.identity.admin_username - password = cls.config.identity.admin_password - tenant = cls.config.identity.admin_tenant_name - auth_url = cls.config.identity.uri - client_args = (cls.config, user, password, auth_url, tenant) - - cls.client = rest_client.RestClient(*client_args) - cls.client.service = 'identity' - cls.token = cls.client.get_auth() - cls.client.base_url = cls.config.murano.murano_url - cls.environments = [] - cls.inst_wth_fl_ip = [] - image_cl = ImageClientJSON(cls.config, user, password, auth_url, - tenant) - resp, body = image_cl.image_list_detail() - for i in body: - if 'murano_image_info' in i['properties']: - if 'linux' in i['properties']['murano_image_info']: - cls.linux = i['name'] - elif 'windows' in i['properties']['murano_image_info']: - cls.windows = i['name'] - elif 'demo' in i['properties']['murano_image_info']: - cls.demo = i['name'] - - def tearDown(self): - """ - This method allows to clean up after each test. - The main task for this method - delete environment after - PASSED and FAILED tests. - """ - - super(MuranoTest, self).tearDown() - - for environment in self.environments: - try: - self.delete_environment(environment['id']) - except Exception: - pass - for inst in self.inst_wth_fl_ip: - try: - self.remove_floating_ip(inst) - except Exception: - pass - - def create_environment(self, name): - """ - This method allows to create environment. - - Input parameters: - name - Name of new environment - - Returns response and new environment. - """ - - post_body = '{"name": "%s"}' % name - resp, body = self.client.post('environments', post_body, - self.client.headers) - - return resp, json.loads(body) - - def delete_environment(self, environment_id): - """ - This method allows to delete environment - - Input parameters: - environment_id - ID of deleting environment - """ - self.client.delete('environments/' + str(environment_id), - self.client.headers) - - def update_environment(self, environment_id, environment_name): - """ - This method allows to update environment instance - - Input parameters: - environment_id - ID of updating environment - environment_name - name of updating environment - """ - post_body = '{"name": "%s"}' % (environment_name + "-changed") - resp, body = self.client.put('environments/' + str(environment_id), - post_body, self.client.headers) - return resp, json.loads(body) - - def get_list_environments(self): - """ - This method allows to get a list of existing environments - - Returns response and list of environments - """ - resp, body = self.client.get('environments', - self.client.headers) - return resp, json.loads(body) - - def get_environment_by_id(self, environment_id): - """ - This method allows to get environment's info by id - - Input parameters: - environment_id - ID of needed environment - Returns response and environment's info - """ - resp, body = self.client.get('environments/' + str(environment_id), - self.client.headers) - return resp, json.loads(body) - - def nova_auth(self): - user = self.config.identity.admin_username - password = self.config.identity.admin_password - tenant = self.config.identity.admin_tenant_name - auth_url = self.config.identity.uri - nova = nvclient.Client(user, password, tenant, auth_url, - service_type="compute") - return nova - - def search_instances(self, environment_id, hostname): - nova = self.nova_auth() - somelist = [] - for i in nova.servers.list(): - if ((str(environment_id) in str( - i.name)) and (str(hostname) in str(i.name))): - somelist.append(i.id) - return somelist - - def add_floating_ip(self, instance_id): - nova = self.nova_auth() - pool = nova.floating_ip_pools.list()[0].name - ip = nova.floating_ips.create(pool) - nova.servers.get(instance_id).add_floating_ip(ip) - return ip.ip - - def remove_floating_ip(self, instance_id): - nova = self.nova_auth() - fl_ips = nova.floating_ips.findall(instance_id=instance_id) - for fl_ip in fl_ips: - nova.floating_ips.delete(fl_ip.id) - return None - - def socket_check(self, ip, port): - sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - result = sock.connect_ex((str(ip), port)) - sock.close() - return result - - def create_session(self, environment_id): - """ - This method allow to create session - - Input parameters: - environment_id - ID of environment - where session should be created - """ - post_body = None - resp, body = self.client.post('environments/' + str(environment_id) + - '/configure', - post_body, self.client.headers) - return resp, json.loads(body) - - def get_session_info(self, environment_id, session_id): - """ - This method allow to get session's info - - Input parameters: - environment_id - ID of environment - where needed session was created - session_id - ID of needed session - Return response and session's info - """ - resp, body = self.client.get('environments/' + str(environment_id) + - '/sessions/' + str(session_id), - self.client.headers) - return resp, json.loads(body) - - def delete_session(self, environment_id, session_id): - """ - This method allow to delete session - - Input parameters: - environment_id - ID of environment - where needed session was created - session_id - ID of needed session - """ - self.client.delete('environments/' + str(environment_id) + - '/sessions/' + str(session_id), self.client.headers) - - def create_AD(self, environment_id, session_id): - """ - This method allow to add AD - - Input parameters: - environment_id - ID of current environment - session_id - ID of current session - """ - post_body = {"type": "activeDirectory", "name": "ad.local", - "adminPassword": "P@ssw0rd", "domain": "ad.local", - "availabilityZone": "nova", - "unitNamingPattern": "adinstance", - "flavor": "m1.medium", "osImage": - {"type": "ws-2012-std", "name": self.windows, "title": - "Windows Server 2012 Standard"}, "configuration": - "standalone", "units": [{"isMaster": True, - "recoveryPassword": "P@ssw0rd", - "location": "west-dc"}]} - - post_body = json.dumps(post_body) - self.client.headers.update({'X-Configuration-Session': session_id}) - resp, body = self.client.post('environments/' + str(environment_id) + - '/services', post_body, - self.client.headers) - return resp, json.loads(body) - - def create_IIS(self, environment_id, session_id, domain_name=""): - """ - This method allow to add IIS - - Input parameters: - environment_id - ID of current environment - session_id - ID of current session - """ - iis_name = "IISSERVICE" - creds = {'username': 'Administrator', - 'password': 'P@ssw0rd'} - post_body = {"type": "webServer", "domain": domain_name, - "availabilityZone": "nova", "name": iis_name, - "adminPassword": "P@ssw0rd", - "unitNamingPattern": "iisinstance", - "osImage": {"type": "ws-2012-std", "name": self.windows, - "title": "Windows Server 2012 Standard"}, - "units": [{}], "credentials": creds, - "flavor": "m1.medium"} - post_body = json.dumps(post_body) - self.client.headers.update({'X-Configuration-Session': session_id}) - resp, body = self.client.post('environments/' + str(environment_id) + - '/services', post_body, - self.client.headers) - return resp, json.loads(body) - - def create_apsnet(self, environment_id, session_id, domain_name=""): - """ - This method allow to add apsnet - - Input parameters: - environment_id - ID of current environment - session_id - ID of current session - """ - creds = {'username': 'Administrator', - 'password': 'P@ssw0rd'} - post_body = {"type": "aspNetApp", "domain": domain_name, - "availabilityZone": "nova", - "name": "someasp", "repository": - "git://github.com/Mirantis/murano-mvc-demo.git", - "adminPassword": "P@ssw0rd", - "unitNamingPattern": "aspnetinstance", - "osImage": {"type": "ws-2012-std", "name": self.windows, - "title": "Windows Server 2012 Standard"}, - "units": [{}], "credentials": creds, - "flavor": "m1.medium"} - post_body = json.dumps(post_body) - self.client.headers.update({'X-Configuration-Session': session_id}) - resp, body = self.client.post('environments/' + str(environment_id) + - '/services', post_body, - self.client.headers) - return resp, json.loads(body) - - def create_IIS_farm(self, environment_id, session_id, domain_name=""): - """ - This method allow to add IIS farm - - Input parameters: - environment_id - ID of current environment - session_id - ID of current session - """ - creds = {'username': 'Administrator', 'password': 'P@ssw0rd'} - post_body = {"type": "webServerFarm", "domain": domain_name, - "availabilityZone": "nova", "name": "someIISFARM", - "adminPassword": "P@ssw0rd", "loadBalancerPort": 80, - "unitNamingPattern": "", - "osImage": {"type": "ws-2012-std", "name": self.windows, - "title": "Windows Server 2012 Standard"}, - "units": [{}, {}], - "credentials": creds, "flavor": "m1.medium"} - post_body = json.dumps(post_body) - self.client.headers.update({'X-Configuration-Session': session_id}) - resp, body = self.client.post('environments/' + str(environment_id) + - '/services', post_body, - self.client.headers) - return resp, json.loads(body) - - def create_apsnet_farm(self, environment_id, session_id, domain_name=""): - """ - This method allow to add apsnet farm - - Input parameters: - environment_id - ID of current environment - session_id - ID of current session - """ - creds = {'username': 'Administrator', 'password': 'P@ssw0rd'} - post_body = {"type": "aspNetAppFarm", "domain": domain_name, - "availabilityZone": "nova", "name": "SomeApsFarm", - "repository": - "git://github.com/Mirantis/murano-mvc-demo.git", - "adminPassword": "P@ssw0rd", "loadBalancerPort": 80, - "unitNamingPattern": "", - "osImage": {"type": "ws-2012-std", "name": self.windows, - "title": "Windows Server 2012 Standard"}, - "units": [{}, {}], - "credentials": creds, "flavor": "m1.medium"} - post_body = json.dumps(post_body) - self.client.headers.update({'X-Configuration-Session': session_id}) - resp, body = self.client.post('environments/' + str(environment_id) + - '/services', post_body, - self.client.headers) - return resp, json.loads(body) - - def create_SQL(self, environment_id, session_id, domain_name=""): - """ - This method allow to add SQL - - Input parameters: - environment_id - ID of current environment - session_id - ID of current session - """ - post_body = {"type": "msSqlServer", "domain": domain_name, - "availabilityZone": "nova", "name": "SQLSERVER", - "adminPassword": "P@ssw0rd", - "unitNamingPattern": "sqlinstance", - "saPassword": "P@ssw0rd", "mixedModeAuth": True, - "osImage": {"type": "ws-2012-std", "name": self.windows, - "title": "Windows Server 2012 Standard"}, "units": [{}], - "credentials": {"username": "Administrator", - "password": "P@ssw0rd"}, "flavor": "m1.medium"} - post_body = json.dumps(post_body) - self.client.headers.update({'X-Configuration-Session': session_id}) - resp, body = self.client.post('environments/' + str(environment_id) + - '/services', post_body, - self.client.headers) - return resp, json.loads(body) - - def create_SQL_cluster(self, environment_id, session_id, domain_name=""): - """ - This method allow to add SQL cluster - - Input parameters: - environment_id - ID of current environment - session_id - ID of current session - """ - AG = self.config.murano.agListnerIP - clIP = self.config.murano.clusterIP - post_body = {"domain": domain_name, "domainAdminPassword": "P@ssw0rd", - "externalAD": False, - "sqlServiceUserName": "Administrator", - "sqlServicePassword": "P@ssw0rd", - "osImage": {"type": "ws-2012-std", "name": self.windows, - "title": "Windows Server 2012 Standard"}, - "agListenerName": "SomeSQL_AGListner", - "flavor": "m1.medium", - "agGroupName": "SomeSQL_AG", - "domainAdminUserName": "Administrator", - "agListenerIP": AG, - "clusterIP": clIP, - "type": "msSqlClusterServer", "availabilityZone": "nova", - "adminPassword": "P@ssw0rd", - "clusterName": "SomeSQL", "mixedModeAuth": True, - "unitNamingPattern": "", "units": [{"isMaster": True, - "name": "node1", "isSync": True}, {"isMaster": False, - "name": "node2", "isSync": True}], - "name": "Sqlname", "saPassword": "P@ssw0rd", - "databases": ['NewDB']} - post_body = json.dumps(post_body) - self.client.headers.update({'X-Configuration-Session': session_id}) - resp, body = self.client.post('environments/' + str(environment_id) + - '/services', post_body, - self.client.headers) - return resp, json.loads(body) - - def create_linux_telnet(self, environment_id, session_id): - post_body = {"availabilityZone": "nova", "name": "LinuxTelnet", - "deployTelnet": True, "unitNamingPattern": "telnet", - "osImage": {"type": "linux", "name": self.linux, - "title": "Linux Image"}, "units": [{}], - "flavor": "m1.small", "type": "linuxTelnetService"} - post_body = json.dumps(post_body) - self.client.headers.update({'X-Configuration-Session': session_id}) - resp, body = self.client.post('environments/' + str(environment_id) + - '/services', post_body, - self.client.headers) - return resp, json.loads(body) - - def create_linux_apache(self, environment_id, session_id): - post_body = {"availabilityZone": "nova", "name": "LinuxApache", - "deployApachePHP": True, "unitNamingPattern": "test-host", - "instanceCount": [{}], "osImage": - {"type": "linux", "name": self.linux, - "title": "Linux Image"}, "units": [{}], - "flavor": "m1.small", "type": "linuxApacheService"} - post_body = json.dumps(post_body) - self.client.headers.update({'X-Configuration-Session': session_id}) - resp, body = self.client.post('environments/' + str(environment_id) + - '/services', post_body, - self.client.headers) - return resp, json.loads(body) - - def create_demo_service(self, environment_id, session_id): - post_body = {"availabilityZone": "nova", "name": "demo", - "unitNamingPattern": "host", "osImage": - {"type": "cirros.demo", "name": self.demo, - "title": "Demo"}, "units": [{}], "flavor": "m1.small", - "configuration": "standalone", "type": "demoService"} - post_body = json.dumps(post_body) - self.client.headers.update({'X-Configuration-Session': session_id}) - resp, body = self.client.post('environments/' + str(environment_id) + - '/services', post_body, - self.client.headers) - return resp, json.loads(body) - - def delete_service(self, environment_id, session_id, service_id): - """ - This method allow to delete service - - Input parameters: - environment_id - ID of current environment - session_id - ID of current session - service_id - ID of needed service - """ - self.client.headers.update({'X-Configuration-Session': session_id}) - self.client.delete('environments/' + str(environment_id) - + '/services/' + str(service_id), - self.client.headers) - - def get_list_services(self, environment_id, session_id): - """ - This method allow to get list of services - - Input parameters: - environment_id - ID of current environment - session_id - ID of current session - """ - self.client.headers.update({'X-Configuration-Session': session_id}) - resp, body = self.client.get('environments/' + str(environment_id) + - '/services', - self.client.headers) - return resp, json.loads(body) - - def get_service_info(self, environment_id, session_id, service_id): - """ - This method allow to get detailed service info - - Input parameters: - environment_id - ID of current environment - session_id - ID of current session - service_id - ID of needed service - """ - self.client.headers.update({'X-Configuration-Session': session_id}) - resp, body = self.client.get('environments/' + str(environment_id) + - '/services/' + str(service_id), - self.client.headers) - return resp, json.loads(body) - - def update_service(self, environment_id, session_id, service_id, s_body): - """ - This method allows to update service - - Input parameters: - environment_id - env's id - session_id - session_id where service is attach - service_id - service id of updating service - s_body - json obj - """ - s_body['flavor'] = "m1.small" - post_body = json.dumps(s_body) - self.client.headers.update({'X-Configuration-Session': session_id}) - resp, body = self.client.put('environments/' + str(environment_id) + - '/services/' + str(service_id), - post_body, self.client.headers) - return resp, json.loads(body) - - def deploy_session(self, environment_id, session_id): - """ - This method allow to send environment on deploy - - Input parameters: - environment_id - ID of current environment - session_id - ID of current session - """ - post_body = None - resp = self.client.post('environments/' + str(environment_id) + - '/sessions/' + str(session_id) + - '/deploy', post_body, self.client.headers) - return resp - - def get_deployments_list(self, environment_id): - """ - This method allow to get list of deployments - - Input parameters: - environment_id - ID of current environment - """ - resp, body = self.client.get('environments/' + str(environment_id) + - '/deployments', self.client.headers) - return resp, json.loads(body) - - def get_deployment_info(self, environment_id, deployment_id): - """ - This method allow to get detailed info about deployment - - Input parameters: - environment_id - ID of current environment - deployment_id - ID of needed deployment - """ - resp, body = self.client.get('environments/' + str(environment_id) + - '/deployments/' + str(deployment_id), - self.client.headers) - return resp, json.loads(body) - - def create_environment_without_token(self, name): - post_body = '{"name": "%s"}' % name - resp = requests.post('%s/environments' % self.client.base_url, - data=post_body) - return resp - - def delete_environment_without_token(self, env_id): - resp = requests.delete('%s/environments/%s' % - (self.client.base_url, str(env_id))) - return resp - - def update_environment_without_token(self, env_id, env_name): - post_body = '{"name": "%s"}' % (env_name + "-changed") - resp = requests.put('%s/environments/%s' % - (self.client.base_url, env_id), - data=post_body) - return resp - - def create_session_without_token(self, env_id): - post_body = None - resp = requests.post('%s/environments/%s/configure' % - (self.client.base_url, str(env_id)), - data=post_body) - return resp - - def delete_session_without_token(self, env_id, sess_id): - resp = requests.delete('%s/environments/%s/sessions/%s' % - (self.client.base_url, env_id, sess_id)) - return resp - - def create_service_without_token(self, env_id, sess_id): - post_body = {"type": "activeDirectory", "name": "ad.local", - "adminPassword": "P@ssw0rd", "domain": "ad.local", - "availabilityZone": "nova", - "unitNamingPattern": "adinstance", - "flavor": "m1.medium", "osImage": - {"type": "ws-2012-std", "name": self.windows, "title": - "Windows Server 2012 Standard"}, "configuration": - "standalone", "units": [{"isMaster": True, - "recoveryPassword": "P@ssw0rd", - "location": "west-dc"}]} - post_body = json.dumps(post_body) - headers = {'X-Configuration-Session': sess_id} - resp = requests.post('%s/environments/%s/services' % - (self.client.base_url, str(env_id)), - data=post_body, headers=headers) - return resp - - def delete_service_without_token(self, env_id, sess_id, serv_id): - headers = {'X-Configuration-Session': sess_id} - resp = requests.delete('%s/environments/%s/services/%s' % - (self.client.base_url, env_id, serv_id), - headers=headers) - return resp - - def deploy_session_without_token(self, env_id, sess_id): - post_body = None - resp = requests.post('%s/environments/%s/sessions/%s/deploy' % - (self.client.base_url, env_id, sess_id), - data=post_body) - return resp - - def get_list_environments_without_token(self): - resp = requests.get('%s/environments' % self.client.base_url) - return resp - - def get_environment_without_token(self, env_id): - resp = requests.get('%s/environments/%s' % - (self.client.base_url, env_id)) - return resp - - def get_session_without_token(self, env_id, sess_id): - resp = requests.get('%s/environments/%s/sessions/%s' % - (self.client.base_url, env_id, sess_id)) - return resp - - def get_service_without_token(self, env_id, sess_id, serv_id): - headers = {'X-Configuration-Session': sess_id} - resp = requests.get('%s/environments/%s/services/%s' % - (self.client.base_url, env_id, serv_id), - headers=headers) - return resp - - def get_list_services_without_token(self, env_id, sess_id): - headers = {'X-Configuration-Session': sess_id} - resp = requests.get('%s/environments/%s/services' % - (self.client.base_url, env_id), headers=headers) - return resp - - -class MuranoMeta(tempest.test.BaseTestCase): - - @classmethod - def setUpClass(cls): - - super(MuranoMeta, cls).setUpClass() - if not cls.config.service_available.murano: - raise cls.skipException("Murano tests is disabled") - user = cls.config.identity.admin_username - password = cls.config.identity.admin_password - tenant = cls.config.identity.admin_tenant_name - auth_url = cls.config.identity.uri - client_args = (cls.config, user, password, auth_url, tenant) - cls.client = rest_client.RestClient(*client_args) - cls.client.service = 'identity' - cls.token = cls.client.get_auth() - cls.client.base_url = cls.config.murano.murano_metadata - - def get_ui_definitions(self): - resp, body = self.client.get('v1/client/ui', self.client.headers) - return resp, body - - def get_ui_definitions_without_token(self): - resp = requests.get('%s/v1/client/ui' % self.client.base_url) - return resp - - def get_conductor_metadata(self): - resp, body = self.client.get('v1/client/conductor', self.client.headers) - return resp, body - - def get_conductor_metadata_without_token(self): - resp = requests.get('%s/v1/client/conductor' % self.client.base_url) - return resp - - def get_list_metadata_objects(self, path): - resp, body = self.client.get('v1/admin/' + path, self.client.headers) - return resp, body - - def get_list_metadata_objects_without_token(self, path): - resp = requests.get('%s/v1/admin/%s' % (self.client.base_url, path)) - return resp - - def get_metadata_object(self, object): - resp, body = self.client.get('v1/admin/' + object, self.client.headers) - return resp, body - - def get_metadata_object_without_token(self, object): - resp = requests.get('%s/v1/admin/%s' % (self.client.base_url, object)) - return resp - - def upload_metadata_object(self, path): - with open('testfile.txt', 'w') as f: - f.write("It's a test file") - files = {'file': open('testfile.txt', 'rb')} - headers = {'X-Auth-Token': self.token} - resp = requests.post('%s/v1/admin/%s' % (self.client.base_url, path), - files=files, headers=headers) - os.remove('testfile.txt') - return resp - - def upload_metadata_object_without_token(self, path): - with open('testfile.txt', 'w') as f: - f.write("It's a test file") - files = {'file': open('testfile.txt', 'rb')} - resp = requests.post('%s/v1/admin/%s' % (self.client.base_url, path), - files=files) - os.remove('testfile.txt') - return resp - - def create_directory(self, path, name): - post_body = '{}' - resp, body = self.client.put('v1/admin/' + path + name, post_body, - self.client.headers) - return resp, body - - def create_directory_without_token(self, path, name): - post_body = None - resp = requests.put('%s/v1/admin/%s/%s' % - (self.client.base_url, path, name), data=post_body) - return resp - - def delete_metadata_obj_or_folder(self, object): - resp, body = self.client.delete('v1/admin/' + object, - self.client.headers) - return resp, body - - def delete_metadata_obj_or_folder_without_token(self, object): - resp = requests.delete('%s/v1/admin/%s' % - (self.client.base_url, object)) - return resp - - def create_new_service(self, name): - post_body = {"name": name,"version": "0.1", - "full_service_name": name, - "service_display_name": name} - post_body = json.dumps(post_body) - resp, body = self.client.put('v1/admin/services/' + name, post_body, - self.client.headers) - return resp, body - - def create_new_service_without_token(self, name): - post_body = {"name": name, "version": "0.1", - "full_service_name": name, - "service_display_name": name} - post_body = json.dumps(post_body) - resp = requests.put('%s/v1/admin/services/%s' % - (self.client.base_url, name), data=post_body) - return resp - - def update_new_service(self, name): - post_body = {"name": name + "1", "version": "0.1", - "full_service_name": name, - "service_display_name": name + "1"} - post_body = json.dumps(post_body) - resp, body = self.client.put('v1/admin/services/' + name, - post_body, self.client.headers) - return resp, body - - def update_new_service_without_token(self, name): - post_body = {"name": name + "1", "version": "0.1", - "full_service_name": name, - "service_display_name": name + "1"} - post_body = json.dumps(post_body) - resp = requests.put('%s/v1/admin/services/%s' % - (self.client.base_url, name), data=post_body) - return resp - - def delete_service(self, name): - resp, body = self.client.delete('v1/admin/services/' + name, - self.client.headers) - return resp, body - - def delete_service_without_token(self, name): - resp = requests.delete('%s/v1/admin/services/%s' % - (self.client.base_url, name)) - return resp diff --git a/tempest/test_murano_metadata.py b/tempest/test_murano_metadata.py deleted file mode 100644 index 84a2e89..0000000 --- a/tempest/test_murano_metadata.py +++ /dev/null @@ -1,368 +0,0 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import testtools -from tempest.test import attr -from tempest.api.murano import base - -class SanityMuranoTest(base.MuranoMeta): - - @attr(type='smoke') - def test_get_list_metadata_objects_ui(self): - resp, body = self.get_list_metadata_objects("ui") - assert body is not None - assert resp['status'] == '200' - - @attr(type='negative') - def test_get_list_metadata_objects_without_token(self): - resp = self.get_list_metadata_objects_without_token("ui") - assert resp.status_code == 401 - - @attr(type='negative') - def test_get_list_ui_definitions_without_token(self): - resp = self.get_ui_definitions_without_token() - assert resp.status_code == 401 - - @attr(type='smoke') - def test_get_list_metadata_objects_workflows(self): - resp, body = self.get_list_metadata_objects("workflows") - assert body is not None - assert resp['status'] == '200' - - @attr(type='smoke') - def test_get_list_metadata_objects_heat(self): - resp, body = self.get_list_metadata_objects("heat") - assert body is not None - assert resp['status'] == '200' - - @attr(type='smoke') - def test_get_list_metadata_objects_agent(self): - resp, body = self.get_list_metadata_objects("agent") - assert body is not None - assert resp['status'] == '200' - - @attr(type='smoke') - def test_get_list_metadata_objects_scripts(self): - resp, body = self.get_list_metadata_objects("scripts") - assert body is not None - assert resp['status'] == '200' - - @attr(type='smoke') - def test_get_list_metadata_objects_manifests(self): - resp, body = self.get_list_metadata_objects("manifests") - assert body is not None - assert resp['status'] == '200' - - @attr(type='negative') - def test_get_list_metadata_objects_uncorrect_type(self): - self.assertRaises(Exception, self.get_list_metadata_objects, - "someth") - - @attr(type='smoke') - def test_get_ui_definitions(self): - resp, body = self.get_ui_definitions() - assert body is not None - assert resp['status'] == '200' - - @attr(type='smoke') - def test_get_conductor_metadata(self): - resp, body = self.get_conductor_metadata() - assert body is not None - assert resp['status'] == '200' - - @attr(type='negative') - def test_get_conductor_metadata_without_token(self): - resp = self.get_conductor_metadata_without_token() - assert resp.status_code == 401 - - @attr(type='smoke') - def test_create_directory_and_delete_workflows(self): - resp, body = self.create_directory("workflows/", "testdir") - resp1, body1 = self.delete_metadata_obj_or_folder("workflows/testdir") - assert resp['status'] == '200' - assert resp1['status'] == '200' - - @attr(type='smoke') - def test_create_directory_and_delete_ui(self): - resp, body = self.create_directory("ui/", "testdir") - resp1, body1 = self.delete_metadata_obj_or_folder("ui/testdir") - assert resp['status'] == '200' - assert resp1['status'] == '200' - - @attr(type='smoke') - def test_create_directory_and_delete_heat(self): - resp, body = self.create_directory("heat/", "testdir") - resp1, body1 = self.delete_metadata_obj_or_folder("heat/testdir") - assert resp['status'] == '200' - assert resp1['status'] == '200' - - @attr(type='smoke') - def test_create_directory_and_delete_agent(self): - resp, body = self.create_directory("agent/", "testdir") - resp1, body1 = self.delete_metadata_obj_or_folder("agent/testdir") - assert resp['status'] == '200' - assert resp1['status'] == '200' - - @attr(type='smoke') - def test_create_directory_and_delete_scripts(self): - resp, body = self.create_directory("scripts/", "testdir") - resp1, body1 = self.delete_metadata_obj_or_folder("scripts/testdir") - assert resp['status'] == '200' - assert resp1['status'] == '200' - - @attr(type='negative') - def test_create_directory_without_token(self): - resp = self.create_directory_without_token("scripts", "testdir") - assert resp.status_code == 401 - - @attr(type='negative') - def test_delete_directory_without_token(self): - self.create_directory("scripts/", "testdir") - resp =\ - self.delete_metadata_obj_or_folder_without_token("scripts/testdir") - self.delete_metadata_obj_or_folder("scripts/testdir") - assert resp.status_code == 401 - - @attr(type='negative') - def test_create_directory_uncorrect_type(self): - self.assertRaises(Exception, self.create_directory, - "someth/", "testdir") - - @testtools.skip('It is look as a bug') - @attr(type='negative') - def test_double_create_directory(self): - self.create_directory("workflows/", "testdir") - self.assertRaises(Exception, self.create_directory, - "workflows/", "testdir") - self.delete_metadata_obj_or_folder("workflows/testdir") - - @attr(type='negative') - def test_delete_nonexistent_object(self): - self.assertRaises(Exception, self.delete_metadata_obj_or_folder, - "somth/blabla") - - @attr(type='negative') - def test_delete_basic_folder(self): - self.assertRaises(Exception, self.delete_metadata_obj_or_folder, - "workflows") - - @attr(type='negative') - def test_create_basic_folder(self): - self.assertRaises(Exception, self.create_directory, - "", "somth") - - @attr(type='negative') - def test_double_upload_file(self): - self.upload_metadata_object(path="workflows") - resp = self.upload_metadata_object(path="workflows") - assert resp.status_code == 403 - self.delete_metadata_obj_or_folder("workflows/testfile.txt") - - @attr(type='negative') - def test_upload_file_uncorrect(self): - resp = self.upload_metadata_object(path="workflows/testfil") - assert resp.status_code == 404 - - @attr(type='smoke') - def test_upload_file_and_delete_workflows(self): - resp = self.upload_metadata_object(path="workflows") - resp1, body1 = self.get_list_metadata_objects("workflows") - self.delete_metadata_obj_or_folder("workflows/testfile.txt") - assert resp.status_code == 200 - assert resp1['status'] == '200' - assert ('testfile.txt' in body1) - - @attr(type='smoke') - def test_upload_file_and_delete_ui(self): - resp = self.upload_metadata_object(path="ui") - resp1, body1 = self.get_list_metadata_objects("ui") - self.delete_metadata_obj_or_folder("ui/testfile.txt") - assert resp.status_code == 200 - assert resp1['status'] == '200' - assert ('testfile.txt' in body1) - - @attr(type='smoke') - def test_upload_file_and_delete_heat(self): - resp = self.upload_metadata_object(path="heat") - resp1, body1 = self.get_list_metadata_objects("heat") - self.delete_metadata_obj_or_folder("heat/testfile.txt") - assert resp.status_code == 200 - assert resp1['status'] == '200' - assert ('testfile.txt' in body1) - - @attr(type='smoke') - def test_upload_file_and_delete_agent(self): - resp = self.upload_metadata_object(path="agent") - resp1, body1 = self.get_list_metadata_objects("agent") - self.delete_metadata_obj_or_folder("agent/testfile.txt") - assert resp.status_code == 200 - assert resp1['status'] == '200' - assert ('testfile.txt' in body1) - - @attr(type='smoke') - def test_upload_file_and_delete_scripts(self): - resp = self.upload_metadata_object(path="scripts") - resp1, body1 = self.get_list_metadata_objects("scripts") - self.delete_metadata_obj_or_folder("scripts/testfile.txt") - assert resp.status_code == 200 - assert resp1['status'] == '200' - assert ('testfile.txt' in body1) - - @attr(type='smoke') - @testtools.skip('It is look as a bug') - def test_upload_file_and_delete_manifests(self): - resp = self.upload_metadata_object(path="manifests") - resp1, body1 = self.get_list_metadata_objects("manifests") - self.delete_metadata_obj_or_folder("manifests/testfile.txt") - assert resp.status_code == 200 - assert resp1['status'] == '200' - assert ('testfile.txt' in body1) - - @attr(type='smoke') - def test_upload_metadata_object_without_token(self): - resp = self.upload_metadata_object_without_token(path='manifests') - assert resp.status_code == 401 - - @attr(type='smoke') - def test_get_metadata_object(self): - self.upload_metadata_object(path="workflows") - resp1, body1 = self.get_metadata_object("workflows/testfile.txt") - self.delete_metadata_obj_or_folder("workflows/testfile.txt") - assert resp1['status'] == '200' - assert body1 is not None - - @attr(type='negative') - def test_get_metadata_object_without_token(self): - self.upload_metadata_object(path="workflows") - resp = self.get_metadata_object_without_token("workflows/testfile.txt") - self.delete_metadata_obj_or_folder("workflows/testfile.txt") - assert resp.status_code == 401 - - @attr(type='negative') - def test_get_nonexistent_metadata_object(self): - self.assertRaises(Exception, self.get_metadata_object, - "somth/blabla") - - @testtools.skip('Bug https://bugs.launchpad.net/murano/+bug/1249303') - @attr(type='smoke') - def test_create_directory_and_upload_file_workflows(self): - self.create_directory("workflows/", "testdir") - resp = self.upload_metadata_object(path="workflows/testdir") - resp1, body1 = self.get_list_metadata_objects("workflows/testdir") - resp2, body2 = self.delete_metadata_obj_or_folder("workflows/testdir") - assert resp.status_code == 200 - assert resp1['status'] == '200' - assert ('testfile.txt' in body1) - assert resp2['status'] == '200' - resp1, body1 = self.get_list_metadata_objects("workflows") - assert resp1['status'] == '200' - assert ('testfile.txt' not in body1) - - @testtools.skip('Bug https://bugs.launchpad.net/murano/+bug/1249303') - @attr(type='smoke') - def test_create_directory_and_upload_file_ui(self): - self.create_directory("ui/", "testdir") - resp = self.upload_metadata_object(path="ui/testdir") - resp1, body1 = self.get_list_metadata_objects("ui/testdir") - resp2, body2 = self.delete_metadata_obj_or_folder("ui/testdir") - assert resp.status_code == 200 - assert resp1['status'] == '200' - assert ('testfile.txt' in body1) - assert resp2['status'] == '200' - resp1, body1 = self.get_list_metadata_objects("ui") - assert resp1['status'] == '200' - assert ('testfile.txt' not in body1) - - @testtools.skip('Bug https://bugs.launchpad.net/murano/+bug/1249303') - @attr(type='smoke') - def test_create_directory_and_upload_file_heat(self): - self.create_directory("heat/", "testdir") - resp = self.upload_metadata_object(path="heat/testdir") - resp1, body1 = self.get_list_metadata_objects("heat/testdir") - resp2, body2 = self.delete_metadata_obj_or_folder("heat/testdir") - assert resp.status_code == 200 - assert resp1['status'] == '200' - assert ('testfile.txt' in body1) - assert resp2['status'] == '200' - resp1, body1 = self.get_list_metadata_objects("heat") - assert resp1['status'] == '200' - assert ('testfile.txt' not in body1) - - @testtools.skip('Bug https://bugs.launchpad.net/murano/+bug/1249303') - @attr(type='smoke') - def test_create_directory_and_upload_file_agent(self): - self.create_directory("agent/", "testdir") - resp = self.upload_metadata_object(path="agent/testdir") - resp1, body1 = self.get_list_metadata_objects("agent/testdir") - resp2, body2 = self.delete_metadata_obj_or_folder("agent/testdir") - assert resp.status_code == 200 - assert resp1['status'] == '200' - assert ('testfile.txt' in body1) - assert resp2['status'] == '200' - resp1, body1 = self.get_list_metadata_objects("agent") - assert resp1['status'] == '200' - assert ('testfile.txt' not in body1) - - @testtools.skip('Bug https://bugs.launchpad.net/murano/+bug/1249303') - @attr(type='smoke') - def test_create_directory_and_upload_file_scripts(self): - self.create_directory("scripts/", "testdir") - resp = self.upload_metadata_object(path="scripts/testdir") - resp1, body1 = self.get_list_metadata_objects("scripts/testdir") - resp2, body2 = self.delete_metadata_obj_or_folder("scripts/testdir") - assert resp.status_code == 200 - assert resp1['status'] == '200' - assert ('testfile.txt' in body1) - assert resp2['status'] == '200' - resp1, body1 = self.get_list_metadata_objects("scripts") - assert resp1['status'] == '200' - assert ('testfile.txt' not in body1) - - @attr(type='smoke') - def test_create_and_delete_new_service(self): - resp, body = self.create_new_service('test') - assert resp['status'] == '200' - assert 'success' in body - resp, body = self.delete_service('test') - assert resp['status'] == '200' - assert 'success' in body - - @attr(type='negative') - def test_create_service_without_token(self): - resp = self.create_new_service_without_token('test') - assert resp.status_code == 401 - - @attr(type='negative') - def test_delete_service_without_token(self): - self.create_new_service('test') - resp = self.delete_service_without_token('test') - self.delete_service('test') - assert resp.status_code == 401 - - @attr(type='smoke') - def test_update_created_service(self): - self.create_new_service('test') - resp, body = self.update_new_service('test') - assert resp['status'] == '200' - assert 'success' in body - self.delete_service('test') - - @attr(type='negative') - def test_update_service_without_token(self): - self.create_new_service('test') - resp = self.update_new_service_without_token('test') - self.delete_service('test') - assert resp.status_code == 401 diff --git a/tempest/test_murano_short_deploy.py b/tempest/test_murano_short_deploy.py deleted file mode 100644 index 2ad5756..0000000 --- a/tempest/test_murano_short_deploy.py +++ /dev/null @@ -1,107 +0,0 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import time - -from tempest.api.murano import base -from tempest.test import attr - - -class SanityMuranoTest(base.MuranoTest): - - def test_short_deploy_ad(self): - flag = 0 - resp, env = self.create_environment('test') - self.environments.append(env) - resp, sess = self.create_session(env['id']) - self.create_AD(env['id'], sess['id']) - self.deploy_session(env['id'], sess['id']) - self.get_session_info(env['id'], sess['id']) - env.update({'status': None}) - k = 0 - while env['status'] != "ready" or flag != 1: - time.sleep(15) - k += 1 - resp, env = self.get_environment_by_id(env['id']) - if 'status' not in env: - env.update({'status': None}) - if k > 4: - flag = 1 - assert flag == 1 - self.delete_environment(env['id']) - - def test_short_deploy_iis(self): - flag = 0 - resp, env = self.create_environment('test') - self.environments.append(env) - resp, sess = self.create_session(env['id']) - self.create_IIS(env['id'], sess['id']) - self.deploy_session(env['id'], sess['id']) - self.get_session_info(env['id'], sess['id']) - env.update({'status': None}) - k = 0 - while env['status'] != "ready" or flag != 1: - time.sleep(15) - k += 1 - resp, env = self.get_environment_by_id(env['id']) - if 'status' not in env: - env.update({'status': None}) - if k > 4: - flag = 1 - assert flag == 1 - self.delete_environment(env['id']) - - def test_short_deploy_aspnet(self): - flag = 0 - resp, env = self.create_environment('test') - self.environments.append(env) - resp, sess = self.create_session(env['id']) - self.create_apsnet(env['id'], sess['id']) - self.deploy_session(env['id'], sess['id']) - self.get_session_info(env['id'], sess['id']) - env.update({'status': None}) - k = 0 - while env['status'] != "ready" or flag != 1: - time.sleep(15) - k += 1 - resp, env = self.get_environment_by_id(env['id']) - if 'status' not in env: - env.update({'status': None}) - if k > 4: - flag = 1 - assert flag == 1 - self.delete_environment(env['id']) - - def test_short_deploy_sql(self): - flag = 0 - resp, env = self.create_environment('test') - self.environments.append(env) - resp, sess = self.create_session(env['id']) - self.create_SQL(env['id'], sess['id']) - self.deploy_session(env['id'], sess['id']) - self.get_session_info(env['id'], sess['id']) - env.update({'status': None}) - k = 0 - while env['status'] != "ready" or flag != 1: - time.sleep(15) - k += 1 - resp, env = self.get_environment_by_id(env['id']) - if 'status' not in env: - env.update({'status': None}) - if k > 4: - flag = 1 - assert flag == 1 - self.delete_environment(env['id']) \ No newline at end of file diff --git a/tempest/test_murano_wo_token.py b/tempest/test_murano_wo_token.py deleted file mode 100644 index 26f3e9c..0000000 --- a/tempest/test_murano_wo_token.py +++ /dev/null @@ -1,123 +0,0 @@ -from tempest.api.murano import base -from tempest.test import attr - - -class SanityMuranoTest(base.MuranoTest): - - @attr(type='negative') - def test_create_environment_without_token(self): - resp = self.create_environment_without_token('test') - assert resp.status_code == 401 - - @attr(type='negative') - def test_delete_environment_without_token(self): - _, env = self.create_environment('test') - self.environments.append(env) - resp = self.delete_environment_without_token(env['id']) - assert resp.status_code == 401 - self.delete_environment(env['id']) - self.environments.pop(self.environments.index(env)) - - @attr(type='negative') - def test_update_environment_without_token(self): - _, env = self.create_environment('test') - self.environments.append(env) - resp = self.update_environment_without_token(env['id'], env['name']) - assert resp.status_code == 401 - self.delete_environment(env['id']) - self.environments.pop(self.environments.index(env)) - - @attr(type='negative') - def test_create_session_without_token(self): - _, env = self.create_environment('test') - self.environments.append(env) - resp = self.create_session_without_token(env['id']) - assert resp.status_code == 401 - self.delete_environment(env['id']) - self.environments.pop(self.environments.index(env)) - - @attr(type='negative') - def test_delete_session_without_token(self): - _, env = self.create_environment('test') - self.environments.append(env) - _, sess = self.create_session(env['id']) - resp = self.delete_session_without_token(env['id'], sess['id']) - assert resp.status_code == 401 - self.delete_environment(env['id']) - self.environments.pop(self.environments.index(env)) - - @attr(type='negative') - def test_create_service_without_token(self): - _, env = self.create_environment('test') - self.environments.append(env) - _, sess = self.create_session(env['id']) - resp = self.create_service_without_token(env['id'], sess['id']) - assert resp.status_code == 401 - self.delete_environment(env['id']) - self.environments.pop(self.environments.index(env)) - - @attr(type='negative') - def test_delete_service_without_token(self): - _, env = self.create_environment('test') - self.environments.append(env) - _, sess = self.create_session(env['id']) - _, serv = self.create_AD(env['id'], sess['id']) - resp = self.delete_service_without_token(env['id'], sess['id'], serv['id']) - assert resp.status_code == 401 - self.delete_environment(env['id']) - self.environments.pop(self.environments.index(env)) - - @attr(type='negative') - def test_deploy_session_without_token(self): - _, env = self.create_environment('test') - self.environments.append(env) - _, sess = self.create_session(env['id']) - resp = self.deploy_session_without_token(env['id'], sess['id']) - assert resp.status_code == 401 - self.delete_environment(env['id']) - self.environments.pop(self.environments.index(env)) - - @attr(type='negative') - def test_get_list_environments_without_token(self): - resp = self.get_list_environments_without_token() - assert resp.status_code == 401 - - @attr(type='negative') - def test_get_environment_without_token(self): - _, env = self.create_environment('test') - self.environments.append(env) - resp = self.get_environment_without_token(env['id']) - assert resp.status_code == 401 - self.delete_environment(env['id']) - self.environments.pop(self.environments.index(env)) - - @attr(type='negative') - def test_get_session_without_token(self): - _, env = self.create_environment('test') - self.environments.append(env) - _, sess = self.create_session(env['id']) - resp = self.get_session_without_token(env['id'], sess['id']) - assert resp.status_code == 401 - self.delete_environment(env['id']) - self.environments.pop(self.environments.index(env)) - - @attr(type='negative') - def test_get_service_without_token(self): - _, env = self.create_environment('test') - self.environments.append(env) - _, sess = self.create_session(env['id']) - _, serv = self.create_AD(env['id'], sess['id']) - resp = self.get_service_without_token(env['id'], sess['id'], serv['id']) - assert resp.status_code == 401 - self.delete_environment(env['id']) - self.environments.pop(self.environments.index(env)) - - @attr(type='negative') - def test_get_list_services_without_token(self): - _, env = self.create_environment('test') - self.environments.append(env) - _, sess = self.create_session(env['id']) - resp = self.get_list_services_without_token(env['id'], sess['id']) - assert resp.status_code == 401 - self.delete_environment(env['id']) - self.environments.pop(self.environments.index(env)) diff --git a/webUI/Coverage_of_bugs_0.3.txt b/webUI/Coverage_of_bugs_0.3.txt deleted file mode 100644 index 19deba0..0000000 --- a/webUI/Coverage_of_bugs_0.3.txt +++ /dev/null @@ -1,382 +0,0 @@ -*** Settings *** -Suite Setup -Suite Teardown Close All Browsers -Test Setup Open Browser ${url} remote_url=http://172.18.124.233:4444/wd/hub browser=firefox ff_profile_dir=ffprofile -Test Teardown Close All Browsers -Library String -Library Boffin.WebUIlib 0 5 # Boffin framework library - -*** Variables *** -${resources_path} Resources/ -${url} http://10.100.0.2/horizon - -*** Test Cases *** -Create IIS+ ASP Farm + AD + IIS - [Tags] night 14 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "complex_env" for field Environment Name - User click on "Create" - User click on "complex_env" - User click on "Create Service" - User create IIS with name "iis1" and don't join to domain, select "Not in domain" - User click on "Create Service" - User create ASP.NET Farm with name "asp-farm" and don't join to domain, select "Not in domain" - User click on "Create Service" - User create Active Directory with domain name "singleAD.domain" - User click on "Create Service" - User create IIS with name "iis2" and don't join to domain, select "Not in domain" - Delete environment "complex_env" after test - -Create ASP.FARM + SQL Cluster + SQL + AD - [Tags] night 15 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "ASP.FARM + SQL Cluster + SQL + AD" for field Environment Name - User click on "Create" - User click on "ASP.FARM + SQL Cluster + SQL + AD" - User click on "Create Service" - User create ASP.NET Farm with name "asp-farm" and don't join to domain, select "Not in domain" - User click on "Create Service" - User create MS SQL cluster with name "sql-cluster" and join in domain "sqlAD.domain" - User click on "Create Service" - User create MS SQL server with name "sql-server" and join to domain, select "Not in domain" - Delete environment "ASP.FARM + SQL Cluster + SQL + AD" after test - -Create IIS + AD + SQL + SQL Cluster + ASP.FARM - [Tags] night 16 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "IIS + AD + SQL + SQL Cluster + ASP.FARM" for field Environment Name - User click on "Create" - User click on "IIS + AD + SQL + SQL Cluster + ASP.FARM" - User click on "Create Service" - User create IIS with name "iis" and don't join to domain, select "Not in domain" - User click on "Create Service" - User create Active Directory with domain name "singleAD.domain" - User click on "Create Service" - User create MS SQL server with name "mssql" and don't join to domain, select "Not in domain" - User click on "Create Service" - User create MS SQL cluster with name "sql-cluster" and join in domain "sqlAD.domain" - User click on "Create Service" - User create ASP.NET Farm with name "asp-farm" and don't join to domain, select "Not in domain" - Delete environment "IIS + AD + SQL + SQL Cluster + ASP.FARM" after test - -Create 4 MS SQL clusters - [Tags] night 17 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "4 SQL Clusters" for field Environment Name - User click on "Create" - User click on "4 SQL Clusters" - User click on "Create Service" - User create MS SQL cluster with name "sql1-cluster" and join in domain "sql1.domain" - User click on "Create Service" - User create MS SQL cluster with name "sql2-cluster" and join in domain "sql2.domain" - User click on "Create Service" - User create MS SQL cluster with name "sql3-cluster" and join in domain "sql3.domain" - User click on "Create Service" - User create MS SQL cluster with name "sql4-cluster" and join in domain "sql4.domain" - Delete environment "4 SQL Clusters" after test - -Create IIS + SQL + ASP.FARM delete IIS - [Tags] night 18 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "IIS + SQL + ASP.FARM" for field Environment Name - User click on "Create" - User click on "IIS + SQL + ASP.FARM" - User click on "Create Service" - User create IIS with name "iis" and don't join to domain, select "Not in domain" - User click on "Create Service" - User create MS SQL server with name "sql-server" and don't join to domain, select "Not in domain" - User click on "Create Service" - User create ASP.NET Farm with name "asp-farm" and don't join to domain, select "Not in domain" - Select "Delete Service" for chosen service "iis" - User confirms deletion - Page should not contain element "iis" - Delete environment "IIS + SQL + ASP.FARM" after test - -Add service in deployed env - [Tags] night 19 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "add_service_in_deployed_env" for field Environment Name - User click on "Create" - User click on "add_service_in_deployed_env" - User click on "Create Service" - User create IIS with name "iis" and don't join to domain, select "Not in domain" - User click on "Deploy This Environment" - Check the status of environment "add_service_in_deployed_env" (should be "Ready") - Check that deploy "add_service_in_deployed_env" finished - Navigate To Project>Environments - User click on "add_service_in_deployed_env" - User click on "Create Service" - User create IIS with name "iis2" and don't join to domain, select "Not in domain" - Delete environment "add_service_in_deployed_env" after test - -Check re-deploy - [Tags] night 20 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "re-deploy" for field Environment Name - User click on "Create" - User click on "re-deploy" - User click on "Create Service" - User create Active Directory with domain name "newdomain.com" - User click on "Deploy This Environment" - Check the status of environment "re-deploy" (should be "Ready") - Check that deploy "re-deploy" finished - Navigate To Project>Environments - User click on "re-deploy" - User click on "Create Service" - User create IIS with name "iis2" and \ join in domain "newdomain.com" - User click on "Deploy This Environment" - Check the status of environment "re-deploy" (should be "Ready") - Check that deploy "re-deploy" finished - Delete environment "re-deploy" after test - -Deploy instance with different flavor - [Tags] night 21 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "different_flavor" for field Environment Name - User click on "Create" - User click on "different_flavor" - User click on "Create Service" - User create IIS with name "iis-medium" with instance flavor m1.medium and select "Not in domain" - User click on "Create Service" - User select "Internet Information Services" from dropdown list "Service Type" - User click on "Next" - User set value "iis-large" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iisLARGE" for field Hostname template - User click on "Next" - User select "m1.large" from dropdown list "Instance flavor" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "iis-large" - User click on "Deploy This Environment" - Check the status of environment "different_flavor" (should be "Ready") - Check that deploy "different_flavor" finished - Navigate To Project>Instances - Check that size of instance "iis" is "m1.medium" - Check that size of instance "iisLARGE" is "m1.large" - Navigate To Project>Environments - Delete environment "different_flavor" after test - -Linux and Windows services in one environment - [Tags] night 22 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "ad_and_telnet" for field Environment Name - User click on "Create" - User click on "ad_and_telnet" - User click on "Create Service" - User create Active Directory with domain name "windows.service" - User click on "Create Service" - User select "Linux Telnet" from dropdown list "Service Type" - User click on "Next" - User set value "telnet-service" for field Service Name - User set value "telnet" for field Hostname - User click on "Next" - User select "Linux Image" from dropdown list "Instance image" - User click on "Create" - User click on "Deploy This Environment" - Check the status of environment "ad_and_telnet" (should be "Ready") - Check that deploy "ad_and_telnet" finished - -Checking type and last operation - [Tags] night 23 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "test" for field Environment Name - User click on "Create" - User click on "test" - User click on "Create Service" - User create IIS with name "service-iis" and don't join to domain, select "Not in domain" - User click on "Deploy This Environment" - Check that Type of service "service-iis" is "Internet Information Services" - Check that Last operation of service "service-iis" is "Service draft" - Check the status of environment "test" (should be "Ready") - Check that deploy "test" finished - Delete environment "test" after test - -*** Keywords *** -Log in WebUI by ${user}/${password} - Fill Field User Name ${user} - Fill Field Password ${password} - Click on Sign In - Navigate to Project>Environments - -User set value "${value}" for field ${field} - Fill Field ${field} ${value} - -Check the status of environment "${name}" (should be "${status}") - Navigate to Project>Environments - Wait Until Keyword Succeeds 40 min 5s Check that Status of environment "${name}" is "${status}" - -User click on "${element}" - Click on ${element} - -Page should contain element "${element}" - Page Should Contain ${element} - -Page should not contain element "${element}" - Reload Page - Page Should Not Contain ${element} - -User select "${item}" from dropdown list "${menu}" - Select Item From List ${menu} ${item} - -User confirms deletion - Click On Confirm deletion - -User create Active Directory with domain name "${name}" - User select "Active Directory" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Domain Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field Recovery password - User set value "P@ssw0rd" for field Confirm recovery password - User set value "${name}" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - -Select "${action}" for chosen ${type} "${env}" - ${xpath}= Find Associated Element ${env} ${action} - Click Element ${xpath} - -Check that deploy "${env}" finished - Navigate To Project>Environments - Select "More" for chosen environment "${env}" - Select "Show Deployments" for chosen environment "${env}" - Reload Page - ${text}= Get Text xpath=/html/body/div/div[2]/div[3]/form/table/tbody/tr/td[3] - Run Keyword If '${text}'== 'Failed' Take a screenshot of the failed deploy - Should Be Equal As Strings ${text} Successful - -User create IIS with name "${name}" ${join} "${domain}" - User select "Internet Information Services" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "iis" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page Should Contain ${name} - -User create ASP.NET App with name "${name}" ${join} "${domain}" - User select "ASP.NET Application" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "asp" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "${name}" - -User create IIS Farm with name "${name}" ${join} "${domain}" - User select "Internet Information Services Web Farm" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "iisfarm#" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "${name}" - -User create ASP.NET Farm with name "${name}" ${join} "${domain}" - User select "ASP.NET Application Web Farm" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "aspfarm#" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "${name}" - -User create MS SQL server with name "${name}" ${join} "${domain}" - User select "MS SQL Server" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "P@ssw0rd" for field SA Password - User set value "P@ssw0rd" for field Confirm SA password SQL - User set value "sql" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "${name}" - -User create MS SQL cluster with name "${name}" ${join} "${domain}" - User create Active Directory with domain name "${domain}" - Page should contain element "${domain}" - User click on "Create Service" - User select "MS SQL Server Cluster" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "P@ssw0rd" for field SA Password - User set value "P@ssw0rd" for field Confirm SA password - User click on "Next" - User set value "10.100.0.88" for field Cluster Static IP - User set value "cluster" for field Cluster Name - User set value "AG_name" for field Availability Group Name - User set value "AG_listener_name" for field Availability Group Listener Name - User set value "10.100.0.89" for field Availability Group Listener IP - User set value "user" for field SQL User Name - User set value "P@ssw0rd" for field SQL User Password - User set value "P@ssw0rd" for field Confirm password - User set value "sqlcluster#" for field Hostname template - User click on "Next" - User set value "testbase" for field Database list - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "${name}" - -Check that service "${service}" was joined in domain "${domain}" - User click on "${service}" - Page should contain element "${domain}" - -Delete environment "${name}" after test - Navigate To Project>Environments - Select "More" for chosen environment "${name}" - Select "Delete Environment" for chosen environment "${name}" - User confirms deletion - Page should not contain element "${name}" - -Check that ${subject} of ${element} "${name}" is "${status}" - ${row}= Get Table Row With ${name} - ${source}= Get Source - ${cell}= Get Web Element Selector ${subject} ${source} th this - ${#_of_column}= Get Substring ${cell} -2 -1 - ${text}= Get Text xpath=${row}/td[${#_of_column}] - Should Contain ${text} ${status} - -Take a screenshot of the failed deploy - User click on "Show Details" - User click on "Logs" - Capture Page Screenshot diff --git a/webUI/Coverage_of_bugs_0.4.txt b/webUI/Coverage_of_bugs_0.4.txt deleted file mode 100644 index 17627ba..0000000 --- a/webUI/Coverage_of_bugs_0.4.txt +++ /dev/null @@ -1,228 +0,0 @@ -*** Settings *** -Suite Setup -Suite Teardown Close All Browsers -Test Setup Open Browser ${url} remote_url=http://172.18.124.233:4444/wd/hub browser=firefox ff_profile_dir=ffprofile -Test Teardown Close All Browsers -Library String -Library Boffin.WebUIlib 60 60 # Boffin framework library -Resource Resources/objrepo/keywords.txt - -*** Variables *** -${resources_path} Resources/ -${url} http://10.100.0.6/horizon - -*** Test Cases *** -Create IIS + AD + IIS - [Tags] night 13 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "complex_env" for field Environment Name - User click on "Create" - User click on "complex_env" - User click on "Create Service" - User create IIS with name "iis1" and don't join to domain, select "Not in domain" - User click on "Create Service" - User create Active Directory with domain name "singleAD.domain" - User click on "Create Service" - User create IIS with name "iis2" and don't join to domain, select "Not in domain" - Delete environment "complex_env" after test - -Create ASP.FARM + SQL Cluster + SQL + AD - [Tags] 14 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "ASP.FARM + SQL Cluster + SQL + AD" for field Environment Name - User click on "Create" - User click on "ASP.FARM + SQL Cluster + SQL + AD" - User click on "Create Service" - User create ASP.NET Farm with name "asp-farm" and don't join to domain, select "Not in domain" - User click on "Create Service" - User create MS SQL cluster with name "sql-cluster" and join in domain "sqlAD.domain" - User click on "Create Service" - User create MS SQL server with name "sql-server" and join to domain, select "Not in domain" - Delete environment "ASP.FARM + SQL Cluster + SQL + AD" after test - -Create IIS + AD + SQL - [Tags] night 15 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "IIS + AD + SQL" for field Environment Name - User click on "Create" - User click on "IIS + AD + SQL" - User click on "Create Service" - User create IIS with name "iis" and don't join to domain, select "Not in domain" - User click on "Create Service" - User create Active Directory with domain name "singleAD.domain" - User click on "Create Service" - User create MS SQL server with name "mssql" and don't join to domain, select "Not in domain" - Delete environment "IIS + AD + SQL" after test - -Create 4 MS SQL clusters - [Tags] 16 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "4 SQL Clusters" for field Environment Name - User click on "Create" - User click on "4 SQL Clusters" - User click on "Create Service" - User create MS SQL cluster with name "sql1-cluster" and join in domain "sql1.domain" - User click on "Create Service" - User create MS SQL cluster with name "sql2-cluster" and join in domain "sql2.domain" - User click on "Create Service" - User create MS SQL cluster with name "sql3-cluster" and join in domain "sql3.domain" - User click on "Create Service" - User create MS SQL cluster with name "sql4-cluster" and join in domain "sql4.domain" - Delete environment "4 SQL Clusters" after test - -Create IIS + SQL + ASP delete IIS - [Tags] night 17 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "IIS + SQL + ASP" for field Environment Name - User click on "Create" - User click on "IIS + SQL + ASP" - User click on "Create Service" - User create IIS with name "iis" and don't join to domain, select "Not in domain" - User click on "Create Service" - User create MS SQL server with name "sql-server" and don't join to domain, select "Not in domain" - User click on "Create Service" - User create ASP.NET App with name "asp" and don't join to domain, select "Not in domain" - Select "Delete Service" for chosen service "iis" - User confirms deletion - Page should not contain element "iis" - Delete environment "IIS + SQL + ASP" after test - -Add service in deployed env - [Tags] night 18 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "add_service_in_deployed_env" for field Environment Name - User click on "Create" - User click on "add_service_in_deployed_env" - User click on "Create Service" - User create Telnet with name "telnet" - User click on "Deploy This Environment" - Check the status of environment "add_service_in_deployed_env" (should be "Ready") - Check that deploy "add_service_in_deployed_env" finished - Navigate To Murano>Environments - User click on "add_service_in_deployed_env" - User click on "Create Service" - User create IIS with name "iis2" and don't join to domain, select "Not in domain" - Delete environment "add_service_in_deployed_env" after test - -Check that service can be joined to domain - [Tags] 19 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "re-deploy" for field Environment Name - User click on "Create" - User click on "re-deploy" - User click on "Create Service" - User create Active Directory with domain name "newdomain.com" - User click on "Deploy This Environment" - Check the status of environment "re-deploy" (should be "Ready") - Check that deploy "re-deploy" finished - Navigate To Murano>Environments - User click on "re-deploy" - User click on "Create Service" - User create IIS with name "iis2" and join in domain "newdomain.com" - User click on "Deploy This Environment" - Check the status of environment "re-deploy" (should be "Ready") - Check that deploy "re-deploy" finished - Delete environment "re-deploy" after test - -Deploy instance with different flavor - [Tags] 20 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "different_flavor" for field Environment Name - User click on "Create" - User click on "different_flavor" - User click on "Create Service" - User select "Internet Information Services" from dropdown list "Service Type" - User click on "Next" - User set value "iis-medium" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "MEDIUM" for field Hostname template - User click on "Next" - User select "m1.medium" from dropdown list "Instance flavor" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "iis-medium" - User click on "Create Service" - User select "Internet Information Services" from dropdown list "Service Type" - User click on "Next" - User set value "iis-large" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "LARGE" for field Hostname template - User click on "Next" - User select "m1.large" from dropdown list "Instance flavor" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "iis-large" - User click on "Deploy This Environment" - Check the status of environment "different_flavor" (should be "Ready") - Check that deploy "different_flavor" finished - Navigate To Project>Instances - Check that size of instance "MEDIUM" is "m1.medium" - Check that size of instance "LARGE" is "m1.large" - Navigate To Murano>Environments - Delete environment "different_flavor" after test - -Linux and Windows services in one environment - [Tags] night 21 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "ad_and_telnet" for field Environment Name - User click on "Create" - User click on "ad_and_telnet" - User click on "Create Service" - User create Active Directory with domain name "windows.service" - User click on "Create Service" - User select "Linux Telnet" from dropdown list "Service Type" - User click on "Next" - User set value "telnet-service" for field Service Name - User set value "telnet" for field Hostname - User click on "Next" - User select "Linux Image" from dropdown list "Instance image" - User select "murano-lb-key" from dropdown list "Key Pair" - User click on "Create" - #User click on "Deploy This Environment" - #Check the status of environment "ad_and_telnet" (should be "Ready") - #Check that deploy "ad_and_telnet" finished - Delete environment "ad_and_telnet" after test - -Checking type and last operation - [Tags] night 22 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "test" for field Environment Name - User click on "Create" - User click on "test" - User click on "Create Service" - User create Telnet with name "telnet" - User click on "Deploy This Environment" - Check that Type of service "telnet" is "Linux Telnet" - Check that Last operation of service "telnet" is "Creating" - Check the status of environment "test" (should be "Ready") - Check that deploy "test" finished - Delete environment "test" after test - -Check that there is instance url in service info (after deploy) - [Tags] 23 night - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "instance_url" for field Environment Name - User click on "Create" - User click on "instance_url" - User click on "Create Service" - User create IIS with name "iis" and don't join to domain, select "Not in domain" - User click on "Deploy This Environment" - Check the status of environment "instance_url" (should be "Ready") - Check that deploy "instance_url" finished - Navigate To Murano>Environments - User click on "instance_url" - User click on "iis" - Page should contain element "Service instance name" diff --git a/webUI/Creation_and_deletion_0.3.txt b/webUI/Creation_and_deletion_0.3.txt deleted file mode 100644 index 1a6a3a2..0000000 --- a/webUI/Creation_and_deletion_0.3.txt +++ /dev/null @@ -1,265 +0,0 @@ -*** Settings *** -Suite Setup -Suite Teardown Close All Browsers -Test Setup Open Browser ${url} remote_url=http://172.18.124.233:4444/wd/hub browser=firefox ff_profile_dir=ffprofile -Test Teardown Close All Browsers -Library String -Library Boffin.WebUIlib 0 5 # Boffin framework library - -*** Variables *** -${resources_path} Resources/ -${url} http://10.100.0.2/horizon - -*** Test Cases *** -Create and Delete AD service - [Tags] commit 7 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "create_delete_ad" for field Environment Name - User click on "Create" - User click on "create_delete_ad" - User click on "Create Service" - User select "Active Directory" from dropdown list "Service Type" - User click on "Next" - User set value "muranotest.domain" for field Domain Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field Recovery password - User set value "P@ssw0rd" for field Confirm recovery password - User set value "muranotest.domain" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - User click on "Delete Service" - User confirms deletion - Page should not contain element "muranotest.domain" - Delete environment "create_delete_ad" after test - -Create and Delete IIS service - [Tags] commit 8 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "create_delete_iis" for field Environment Name - User click on "Create" - User click on "create_delete_iis" - User click on "Create Service" - User select "Internet Information Services" from dropdown list "Service Type" - User click on "Next" - User set value "iis_service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iis" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - User click on "Delete Service" - User confirms deletion - Page should not contain element "iis_service" - Delete environment "create_delete_iis" after test - -Create and Delete ASP.NET service - [Tags] commit 9 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "create_delete_asp" for field Environment Name - User click on "Create" - User click on "create_delete_asp" - User click on "Create Service" - User select "ASP.NET Application" from dropdown list "Service Type" - User click on "Next" - User set value "asp-service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "asp" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - User click on "Delete Service" - User confirms deletion - Page should not contain element "asp-service" - Delete environment "create_delete_asp" after test - -Create and Delete IIS Farm service - [Tags] commit 10 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "create_delete_iis_farm" for field Environment Name - User click on "Create" - User click on "create_delete_iis_farm" - User click on "Create Service" - User select "Internet Information Services Web Farm" from dropdown list "Service Type" - User click on "Next" - User set value "iis-farm" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iisfarm#" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - User click on "Delete Service" - User confirms deletion - Page should not contain element "iis-farm" - Delete environment "create_delete_iis_farm" after test - -Create and Delete ASP.NET Farm service - [Tags] commit 11 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "create_delete_asp_farm" for field Environment Name - User click on "Create" - User click on "create_delete_asp_farm" - User click on "Create Service" - User select "ASP.NET Application Web Farm" from dropdown list "Service Type" - User click on "Next" - User set value "asp-farm" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "aspfarm#" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - User click on "Delete Service" - User confirms deletion - Page should not contain element "asp-farm" - Delete environment "create_delete_asp_farm" after test - -Create and Delete MS SQL server - [Tags] commit 12 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "create_delete_mssql" for field Environment Name - User click on "Create" - User click on "create_delete_mssql" - User click on "Create Service" - User select "MS SQL Server" from dropdown list "Service Type" - User click on "Next" - User set value "ms_sql" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field SA Password - User set value "P@ssw0rd" for field Confirm SA password SQL - User set value "sql" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - User click on "Delete Service" - User confirms deletion - Page should not contain element "ms_sql" - Delete environment "create_delete_mssql" after test - -Create and Delete Telnet Service - [Tags] commit 14 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "create_delete_telnet" for field Environment Name - User click on "Create" - User click on "create_delete_telnet" - User click on "Create Service" - User select "Linux Telnet" from dropdown list "Service Type" - User click on "Next" - User set value "telnet-service" for field Service Name - User set value "telnet" for field Hostname - User click on "Next" - User select "Linux Image" from dropdown list "Instance image" - User click on "Create" - User click on "Delete Service" - User confirms deletion - Page should not contain element "telnet-service" - Delete environment "create_delete_telnet" after test - -Create and Delete Apache service - [Tags] commit 15 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "create_delete_apache" for field Environment Name - User click on "Create" - User click on "create_delete_apache" - User click on "Create Service" - User select "Linux Apache" from dropdown list "Service Type" - User click on "Next" - User set value "apache-service" for field Service Name - User set value "apache" for field Hostname - User click on "Next" - User select "Linux Image" from dropdown list "Instance image" - User click on "Create" - User click on "Delete Service" - User confirms deletion - Page should not contain element "apache-service" - Delete environment "create_delete_apache" after test - -Check opportunity to choose Instance Flavor - [Tags] commit 16 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "env_inst_flavor" for field Environment Name - User click on "Create" - User click on "env_inst_flavor" - User click on "Create Service" - User select "Internet Information Services" from dropdown list "Service Type" - User click on "Next" - User set value "iis-service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iis" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User select "m1.small" from dropdown list "Instance flavor" - User select "m1.large" from dropdown list "Instance flavor" - User select "m1.medium" from dropdown list "Instance flavor" - Delete environment "env_inst_flavor" after test - -*** Keywords *** -Log in WebUI by ${user}/${password} - Fill Field User Name ${user} - Fill Field Password ${password} - Click on Sign In - Navigate to Project>Environments - -User set value "${value}" for field ${field} - Fill Field ${field} ${value} - -Check the status of environment "${name}" (should be "${status}") - Navigate to Project>Environments - Wait Until Keyword Succeeds 40 min 5s Check that Status of environment "${name}" is "${status}" - -User click on "${element}" - Click on ${element} - -Page should contain element "${element}" - Page Should Contain ${element} - -Page should not contain element "${element}" - Reload Page - Page Should Not Contain ${element} - -User select "${item}" from dropdown list "${menu}" - Select Item From List ${menu} ${item} - -User confirms deletion - Click On Confirm deletion - -User create Active Directory with domain name "${name}" - User select "Active Directory" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Domain Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field Recovery password - User set value "P@ssw0rd" for field Confirm recovery password - User set value "${name}" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - -Select "${action}" for chosen ${type} "${env}" - ${xpath}= Find Associated Element ${env} ${action} - Click Element ${xpath} - -Delete environment "${name}" after test - Navigate To Project>Environments - Select "More" for chosen environment "${name}" - Select "Delete Environment" for chosen environment "${name}" - User confirms deletion - Page should not contain element "${name}" diff --git a/webUI/Creation_and_deletion_0.4.txt b/webUI/Creation_and_deletion_0.4.txt deleted file mode 100644 index 0646ef2..0000000 --- a/webUI/Creation_and_deletion_0.4.txt +++ /dev/null @@ -1,253 +0,0 @@ -*** Settings *** -Suite Setup -Suite Teardown Close All Browsers -Test Setup Open Browser ${url} remote_url=http://172.18.124.233:4444/wd/hub browser=firefox ff_profile_dir=ffprofile -Test Teardown Close All Browsers -Library String -Library Boffin.WebUIlib 60 60 # Boffin framework library -Resource Resources/objrepo/keywords.txt - -*** Variables *** -${resources_path} Resources/ -${url} http://10.100.0.6/horizon - -*** Test Cases *** -Create and Delete AD service - [Tags] commit 7 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "create_delete_ad" for field Environment Name - User click on "Create" - User click on "create_delete_ad" - User click on "Create Service" - User select "Active Directory" from dropdown list "Service Type" - User click on "Next" - User set value "muranotest.domain" for field Domain Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field Recovery password - User set value "P@ssw0rd" for field Confirm recovery password - User set value "muranotest.domain" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - User click on "Delete Service" - User confirms deletion - Page should not contain element "muranotest.domain" - Delete environment "create_delete_ad" after test - -Create and Delete IIS service - [Tags] commit 8 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "create_delete_iis" for field Environment Name - User click on "Create" - User click on "create_delete_iis" - User click on "Create Service" - User select "Internet Information Services" from dropdown list "Service Type" - User click on "Next" - User set value "iis_service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iis" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - User click on "Delete Service" - User confirms deletion - Page should not contain element "iis_service" - Delete environment "create_delete_iis" after test - -Create and Delete ASP.NET service - [Tags] commit 9 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "create_delete_asp" for field Environment Name - User click on "Create" - User click on "create_delete_asp" - User click on "Create Service" - User select "ASP.NET Application" from dropdown list "Service Type" - User click on "Next" - User set value "asp-service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "asp" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - User click on "Delete Service" - User confirms deletion - Page should not contain element "asp-service" - Delete environment "create_delete_asp" after test - -Create and Delete IIS Farm service - [Tags] 10 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "create_delete_iis_farm" for field Environment Name - User click on "Create" - User click on "create_delete_iis_farm" - User click on "Create Service" - User select "Internet Information Services Web Farm" from dropdown list "Service Type" - User click on "Next" - User set value "iis-farm" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iisfarm#" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - User click on "Delete Service" - User confirms deletion - Page should not contain element "iis-farm" - Delete environment "create_delete_iis_farm" after test - -Create and Delete ASP.NET Farm service - [Tags] 11 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "create_delete_asp_farm" for field Environment Name - User click on "Create" - User click on "create_delete_asp_farm" - User click on "Create Service" - User select "ASP.NET Application Web Farm" from dropdown list "Service Type" - User click on "Next" - User set value "asp-farm" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "aspfarm#" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - User click on "Delete Service" - User confirms deletion - Page should not contain element "asp-farm" - Delete environment "create_delete_asp_farm" after test - -Create and Delete MS SQL server - [Tags] commit 12 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "create_delete_mssql" for field Environment Name - User click on "Create" - User click on "create_delete_mssql" - User click on "Create Service" - User select "MS SQL Server" from dropdown list "Service Type" - User click on "Next" - User set value "ms_sql" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field SA Password - User set value "P@ssw0rd" for field Confirm SA password SQL - User set value "sql" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - User click on "Delete Service" - User confirms deletion - Page should not contain element "ms_sql" - Delete environment "create_delete_mssql" after test - -Create and Delete MS SQL Cluster - [Tags] 13 commit - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "create_delete_sqlcluster" for field Environment Name - User click on "Create" - User click on "create_delete_sqlcluster" - User click on "Create Service" - User create Active Directory with domain name "activeDirectory.mssql" - Page should contain element "activeDirectory.mssql" - User click on "Create Service" - User select "MS SQL Server Cluster" from dropdown list "Service Type" - User click on "Next" - User set value "sql_cluster" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "activeDirectory.mssql" from dropdown list "Domain" - User set value "P@ssw0rd" for field SA Password - User set value "P@ssw0rd" for field Confirm SA password - User click on "Next" - Set IP address from the subnet where Cluster Static IP is running - User set value "cluster" for field Cluster Name - User set value "AG_name" for field Availability Group Name - User set value "AG_listener_name" for field Availability Group Listener Name - Set IP address from the subnet where Availability Group Listener IP is running - User set value "user" for field SQL User Name - User set value "P@ssw0rd" for field SQL User Password - User set value "P@ssw0rd" for field Confirm password - User set value "sqlcluster#" for field Hostname template - User click on "Next" - User set value "testbase" for field Database list - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Select "Delete Service" for chosen service "sql_cluster" - User confirms deletion - Page should not contain element "sql_cluster" - Delete environment "create_delete_sqlcluster" after test - -Create and Delete Telnet Service - [Tags] commit 14 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "create_delete_telnet" for field Environment Name - User click on "Create" - User click on "create_delete_telnet" - User click on "Create Service" - User select "Linux Telnet" from dropdown list "Service Type" - User click on "Next" - User set value "telnet-service" for field Service Name - User set value "telnet" for field Hostname - User click on "Next" - User select "Linux Image" from dropdown list "Instance image" - User select "murano-lb-key" from dropdown list "Key Pair" - User click on "Create" - User click on "Delete Service" - User confirms deletion - Page should not contain element "telnet-service" - Delete environment "create_delete_telnet" after test - -Create and Delete Apache service - [Tags] commit 15 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "create_delete_apache" for field Environment Name - User click on "Create" - User click on "create_delete_apache" - User click on "Create Service" - User select "Linux Apache" from dropdown list "Service Type" - User click on "Next" - User set value "apache-service" for field Service Name - User set value "apache" for field Hostname - User click on "Next" - User select "Linux Image" from dropdown list "Instance image" - User select "murano-lb-key" from dropdown list "Key Pair" - User click on "Create" - User click on "Delete Service" - User confirms deletion - Page should not contain element "apache-service" - Delete environment "create_delete_apache" after test - -Check opportunity to choose Instance Flavor - [Tags] commit 16 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "env_inst_flavor" for field Environment Name - User click on "Create" - User click on "env_inst_flavor" - User click on "Create Service" - User select "Internet Information Services" from dropdown list "Service Type" - User click on "Next" - User set value "iis-service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iis" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User select "m1.small" from dropdown list "Instance flavor" - User select "m1.large" from dropdown list "Instance flavor" - User select "m1.medium" from dropdown list "Instance flavor" - Delete environment "env_inst_flavor" after test diff --git a/webUI/Deploy_0.3.txt b/webUI/Deploy_0.3.txt deleted file mode 100644 index fc266d7..0000000 --- a/webUI/Deploy_0.3.txt +++ /dev/null @@ -1,518 +0,0 @@ -*** Settings *** -Suite Setup -Suite Teardown Close All Browsers -Test Setup Open Browser ${url} remote_url=http://172.18.124.233:4444/wd/hub browser=firefox ff_profile_dir=ffprofile -Test Teardown Close All Browsers -Library String -Library Boffin.WebUIlib 0 5 # Boffin framework library - -*** Variables *** -${resources_path} Resources/ -${url} http://10.100.0.30/horizon - -*** Test Cases *** -Deploy environment with AD Service - [Tags] night 1 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "deploy_one_ad" for field Environment Name - User click on "Create" - User click on "deploy_one_ad" - User click on "Create Service" - User select "Active Directory" from dropdown list "Service Type" - User click on "Next" - User set value "muranotest.domain" for field Domain Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field Recovery password - User set value "P@ssw0rd" for field Confirm recovery password - User set value "ad" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "muranotest.domain" - User click on "Deploy This Environment" - Check the status of environment "deploy_one_ad" (should be "Ready") - Check that deploy "deploy_one_ad" finished - Delete environment "deploy_one_ad" after test - -Deploy environment with IIS Service - [Tags] night 2 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "deploy_iis" for field Environment Name - User click on "Create" - User click on "deploy_iis" - User click on "Create Service" - User select "Internet Information Services" from dropdown list "Service Type" - User click on "Next" - User set value "iis-service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iis" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "iis-service" - User click on "Deploy This Environment" - Check the status of environment "deploy_iis" (should be "Ready") - Check that deploy "deploy_iis" finished - Delete environment "deploy_iis" after test - -Deploy environment with ASP.NET Service - [Tags] night 3 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "deploy_asp" for field Environment Name - User click on "Create" - User click on "deploy_asp" - User click on "Create Service" - User select "ASP.NET Application" from dropdown list "Service Type" - User click on "Next" - User set value "asp-service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "asp" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "asp-service" - User click on "Deploy This Environment" - Check the status of environment "deploy_asp" (should be "Ready") - Check that deploy "deploy_asp" finished - Delete environment "deploy_asp" after test - -Deploy environment with IIS Farm - [Tags] night 4 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "deploy_iis_farm" for field Environment Name - User click on "Create" - User click on "deploy_iis_farm" - User click on "Create Service" - User select "Internet Information Services Web Farm" from dropdown list "Service Type" - User click on "Next" - User set value "iis_farm" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iisfarm#" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "iis_farm" - User click on "Deploy This Environment" - Check the status of environment "deploy_iis_farm" (should be "Ready") - Check that deploy "deploy_iis_farm" finished - Delete environment "deploy_iis_farm" after test - -Deploy environment with ASP.NET Farm - [Tags] night 5 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "deploy_asp_farm" for field Environment Name - User click on "Create" - User click on "deploy_asp_farm" - User click on "Create Service" - User select "ASP.NET Application Web Farm" from dropdown list "Service Type" - User click on "Next" - User set value "asp-farm" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "aspfarm#" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "asp-farm" - User click on "Deploy This Environment" - Check the status of environment "deploy_asp_farm" (should be "Ready") - Check that deploy "deploy_asp_farm" finished - Delete environment "deploy_asp_farm" after test - -Deploy environment with MS SQL server - [Tags] night 6 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "deploy_mssql" for field Environment Name - User click on "Create" - User click on "deploy_mssql" - User click on "Create Service" - User select "MS SQL Server" from dropdown list "Service Type" - User click on "Next" - User set value "ms_sql" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field SA Password - User set value "P@ssw0rd" for field Confirm SA password SQL - User set value "sql" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "ms_sql" - User click on "Deploy This Environment" - Check the status of environment "deploy_mssql" (should be "Ready") - Check that deploy "deploy_mssql" finished - Delete environment "deploy_mssql" after test - -Deploy environment with MS SQL cluster - [Tags] night 7 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "deploy_sqlcluster" for field Environment Name - User click on "Create" - User click on "deploy_sqlcluster" - User click on "Create Service" - User create Active Directory with domain name "activeDirectory.mssql" - Page should contain element "activeDirectory.mssql" - User click on "Create Service" - User select "MS SQL Server Cluster" from dropdown list "Service Type" - User click on "Next" - User set value "sql_cluster" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "activeDirectory.mssql" from dropdown list "Domain" - User set value "P@ssw0rd" for field SA Password - User set value "P@ssw0rd" for field Confirm SA password - User click on "Next" - User set value "10.100.0.88" for field Cluster Static IP - User set value "cluster" for field Cluster Name - User set value "AG_name" for field Availability Group Name - User set value "AG_listener_name" for field Availability Group Listener Name - User set value "10.100.0.89" for field Availability Group Listener IP - User set value "user" for field SQL User Name - User set value "P@ssw0rd" for field SQL User Password - User set value "P@ssw0rd" for field Confirm password - User set value "sqlcluster#" for field Hostname template - User click on "Next" - User set value "testbase" for field Database list - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "sql_cluster" - User click on "Deploy This Environment" - Check the status of environment "deploy_sqlcluster" (should be "Ready") - Check that deploy "deploy_sqlcluster" finished - Delete environment "deploy_sqlcluster" after test - -Deploy Telnet Service - [Tags] night 8 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "deploy_telnet" for field Environment Name - User click on "Create" - User click on "deploy_telnet" - User click on "Create Service" - User select "Linux Telnet" from dropdown list "Service Type" - User click on "Next" - User set value "telnet-service" for field Service Name - User set value "telnet" for field Hostname - User click on "Next" - User select "Linux Image" from dropdown list "Instance image" - User click on "Create" - User click on "Deploy This Environment" - Check the status of environment "deploy_telnet" (should be "Ready") - Check that deploy "deploy_telnet" finished - -Deploy AD with 2 instances - [Tags] night 9 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "deploy_ad_2_inst" for field Environment Name - User click on "Create" - User click on "deploy_ad_2_inst" - User click on "Create Service" - User select "Active Directory" from dropdown list "Service Type" - User click on "Next" - User set value "twoInstance.domain" for field Domain Name - User set value "2" for field Instance Count - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field Recovery password - User set value "P@ssw0rd" for field Confirm recovery password - User set value "adtwo#" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "twoInstance.domain" - User click on "Deploy This Environment" - Check the status of environment "deploy_ad_2_inst" (should be "Ready") - Check that deploy "deploy_ad_2_inst" finished - Delete environment "deploy_ad_2_inst" after test - -Create IIS and IIS Farm in domain - [Tags] night 10 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "iis_iisfarm_in_domain" for field Environment Name - User click on "Create" - User click on "iis_iisfarm_in_domain" - User click on "Create Service" - User create Active Directory with domain name "adForIIS.domain" - User click on "Create Service" - User create IIS with name "iis-service" and join in domain "adForIIS.domain" - Check that service "iis-service" was joined in domain "adForIIS.domain" - User click on "environment iis_iisfarm_in_domain" - User click on "Create Service" - User create IIS Farm with name "iis-farm" and join in domain "adForIIS.domain" - Check that service "iis-farm" was joined in domain "adForIIS.domain" - Delete environment "iis_iisfarm_in_domain" after test - -Create ASP.Net and ASP.Net Farm in domain - [Tags] night 11 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "asp_aspfarm_in_domain" for field Environment Name - User click on "Create" - User click on "asp_aspfarm_in_domain" - User click on "Create Service" - User create Active Directory with domain name "adForASP.domain" - User click on "Create Service" - User create ASP.NET App with name "asp-service" and join in domain "adForASP.domain" - Check that service "asp-service" was joined in domain "adForASP.domain" - User click on "environment asp_aspfarm_in_domain" - User click on "Create Service" - User create ASP.NET Farm with name "asp-farm" and join in domain "adForASP.domain" - Check that service "asp-farm" was joined in domain "adForASP.domain" - Delete environment "asp_aspfarm_in_domain" after test - -Deploy IIS Farm and ASP.NET Farm in 2 domains - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "farms_in_domains" for field Environment Name - User click on "Create" - User click on "farms_in_domains" - User click on "Create Service" - User create Active Directory with domain name "iisdomain.murano" - User click on "Create Service" - User create Active Directory with domain name "aspdomain.murano" - User click on "Create Service" - User create IIS Farm with name "iis-farm" and join in domain "iisdomain.murano" - Check that service "iis-farm" was joined in domain "iisdomain.murano" - User click on "environment farms_in_domains" - User click on "Create Service" - User create ASP.NET Farm with name "asp-farm" and join in domain "aspdomain.murano" - Check that service "asp-farm" was joined in domain "aspdomain.murano" - User click on "environment farms_in_domains" - User click on "Deploy This Environment" - Check the status of environment "farms_in_domains" (should be "Ready") - Check that deploy "farms_in_domains" finished - -Deploy MS SQL server and IIS in domain - [Tags] night 12 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "iis_sqlserver_in_domain" for field Environment Name - User click on "Create" - User click on "iis_sqlserver_in_domain" - User click on "Create Service" - User create Active Directory with domain name "iisANDsql.domain" - User click on "Create Service" - User create IIS with name "iis-service" and join in domain "iisANDsql.domain" - Check that service "iis-service" was joined in domain "iisANDsql.domain" - User click on "environment iis_sqlserver_in_domain" - User click on "Create Service" - User create MS SQL server with name "mssql" and join in domain "iisANDsql.domain" - Check that service "mssql" was joined in domain "iisANDsql.domain" - User click on "environment iis_sqlserver_in_domain" - User click on "Deploy This Environment" - Check the status of environment "iis_sqlserver_in_domain" (should be "Ready") - Check that deploy "iis_sqlserver_in_domain" finished - Delete environment "iis_sqlserver_in_domain" after test - -Deploy Apache service - [Tags] night 13 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "deploy_apache" for field Environment Name - User click on "Create" - User click on "deploy_apache" - User click on "Create Service" - User select "Linux Apache" from dropdown list "Service Type" - User click on "Next" - User set value "apache-service" for field Service Name - User set value "telnet" for field Hostname - User click on "Next" - User select "Linux Image" from dropdown list "Instance image" - User click on "Create" - User click on "Deploy This Environment" - Check the status of environment "deploy_apache" (should be "Ready") - Check that deploy "deploy_apache" finished - -*** Keywords *** -Log in WebUI by ${user}/${password} - Fill Field User Name ${user} - Fill Field Password ${password} - Click on Sign In - Navigate to Project>Environments - -User set value "${value}" for field ${field} - Fill Field ${field} ${value} - -Check the status of environment "${name}" (should be "${status}") - Navigate to Project>Environments - Wait Until Keyword Succeeds 40 min 5s Check that Status of environment "${name}" is "${status}" - -User click on "${element}" - Click on ${element} - -Page should contain element "${element}" - Page Should Contain ${element} - -Page should not contain element "${element}" - Reload Page - Page Should Not Contain ${element} - -User select "${item}" from dropdown list "${menu}" - Select Item From List ${menu} ${item} - -User confirms deletion - Click On Confirm deletion - -User create Active Directory with domain name "${name}" - User select "Active Directory" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Domain Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field Recovery password - User set value "P@ssw0rd" for field Confirm recovery password - User set value "${name}" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - -Select "${action}" for chosen ${type} "${env}" - ${xpath}= Find Associated Element ${env} ${action} - Click Element ${xpath} - -Check that deploy "${env}" finished - Navigate To Project>Environments - Select "More" for chosen environment "${env}" - Select "Show Deployments" for chosen environment "${env}" - Reload Page - ${text}= Get Text xpath=/html/body/div/div[2]/div[3]/form/table/tbody/tr/td[3] - Run Keyword If '${text}'== 'Failed' Take a screenshot of the failed deploy - Should Be Equal As Strings ${text} Successful - -User create IIS with name "${name}" ${join} "${domain}" - User select "Internet Information Services" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "iis" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page Should Contain ${name} - -User create ASP.NET App with name "${name}" ${join} "${domain}" - User select "ASP.NET Application" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "asp" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "${name}" - -User create IIS Farm with name "${name}" ${join} "${domain}" - User select "Internet Information Services Web Farm" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "iisfarm#" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "${name}" - -User create ASP.NET Farm with name "${name}" ${join} "${domain}" - User select "ASP.NET Application Web Farm" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "aspfarm#" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "${name}" - -User create MS SQL server with name "${name}" ${join} "${domain}" - User select "MS SQL Server" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "P@ssw0rd" for field SA Password - User set value "P@ssw0rd" for field Confirm SA password SQL - User set value "sql" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "${name}" - -User create MS SQL cluster with name "${name}" ${join} "${domain}" - User create Active Directory with domain name "${domain}" - Page should contain element "${domain}" - User click on "Create Service" - User select "MS SQL Server Cluster" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "P@ssw0rd" for field SA Password - User set value "P@ssw0rd" for field Confirm SA password - User click on "Next" - User set value "10.100.0.88" for field Cluster Static IP - User set value "cluster" for field Cluster Name - User set value "AG_name" for field Availability Group Name - User set value "AG_listener_name" for field Availability Group Listener Name - User set value "10.100.0.89" for field Availability Group Listener IP - User set value "user" for field SQL User Name - User set value "P@ssw0rd" for field SQL User Password - User set value "P@ssw0rd" for field Confirm password - User set value "sqlcluster#" for field Hostname template - User click on "Next" - User set value "testbase" for field Database list - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "${name}" - -Check that service "${service}" was joined in domain "${domain}" - User click on "${service}" - Page should contain element "${domain}" - -Delete environment "${name}" after test - Navigate To Project>Environments - Select "More" for chosen environment "${name}" - Select "Delete Environment" for chosen environment "${name}" - User confirms deletion - Page should not contain element "${name}" - -Check that ${subject} of ${element} "${name}" is "${status}" - ${row}= Get Table Row With ${name} - ${source}= Get Source - ${cell}= Get Web Element Selector ${subject} ${source} th this - ${#_of_column}= Get Substring ${cell} -2 -1 - ${text}= Get Text xpath=${row}/td[${#_of_column}] - Should Contain ${text} ${status} - -Take a screenshot of the failed deploy - User click on "Show Details" - User click on "Logs" - Capture Page Screenshot diff --git a/webUI/Deploy_0.4.txt b/webUI/Deploy_0.4.txt deleted file mode 100644 index aa9da53..0000000 --- a/webUI/Deploy_0.4.txt +++ /dev/null @@ -1,337 +0,0 @@ -*** Settings *** -Suite Setup -Suite Teardown Close All Browsers -Test Setup Open Browser ${url} remote_url=http://172.18.124.233:4444/wd/hub browser=firefox ff_profile_dir=ffprofile -Test Teardown Close All Browsers -Library String -Library Boffin.WebUIlib 60 60 # Boffin framework library -Resource Resources/objrepo/keywords.txt - -*** Variables *** -${resources_path} Resources/ -${url} http://10.100.0.6/horizon - -*** Test Cases *** -Deploy environment with AD Service - [Tags] night 1 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "deploy_one_ad" for field Environment Name - User click on "Create" - User click on "deploy_one_ad" - User click on "Create Service" - User select "Active Directory" from dropdown list "Service Type" - User click on "Next" - User set value "muranotest.domain" for field Domain Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field Recovery password - User set value "P@ssw0rd" for field Confirm recovery password - User set value "ad" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "muranotest.domain" - User click on "Deploy This Environment" - Check the status of environment "deploy_one_ad" (should be "Ready") - Check that deploy "deploy_one_ad" finished - Delete environment "deploy_one_ad" after test - -Deploy environment with IIS Service - [Tags] night 2 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "deploy_iis" for field Environment Name - User click on "Create" - User click on "deploy_iis" - User click on "Create Service" - User select "Internet Information Services" from dropdown list "Service Type" - User click on "Next" - User set value "iis-service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iis" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "iis-service" - User click on "Deploy This Environment" - Check the status of environment "deploy_iis" (should be "Ready") - Check that deploy "deploy_iis" finished - Delete environment "deploy_iis" after test - -Deploy environment with ASP.NET Service - [Tags] night 3 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "deploy_asp" for field Environment Name - User click on "Create" - User click on "deploy_asp" - User click on "Create Service" - User select "ASP.NET Application" from dropdown list "Service Type" - User click on "Next" - User set value "asp-service" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "asp" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "asp-service" - User click on "Deploy This Environment" - Check the status of environment "deploy_asp" (should be "Ready") - Check that deploy "deploy_asp" finished - Delete environment "deploy_asp" after test - -Deploy environment with IIS Farm - [Tags] - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "deploy_iis_farm" for field Environment Name - User click on "Create" - User click on "deploy_iis_farm" - User click on "Create Service" - User select "Internet Information Services Web Farm" from dropdown list "Service Type" - User click on "Next" - User set value "iis_farm" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "iisfarm#" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "iis_farm" - User click on "Deploy This Environment" - Check the status of environment "deploy_iis_farm" (should be "Ready") - Check that deploy "deploy_iis_farm" finished - Delete environment "deploy_iis_farm" after test - -Deploy environment with ASP.NET Farm - [Tags] 4 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "deploy_asp_farm" for field Environment Name - User click on "Create" - User click on "deploy_asp_farm" - User click on "Create Service" - User select "ASP.NET Application Web Farm" from dropdown list "Service Type" - User click on "Next" - User set value "asp-farm" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "aspfarm#" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "asp-farm" - User click on "Deploy This Environment" - Check the status of environment "deploy_asp_farm" (should be "Ready") - Check that deploy "deploy_asp_farm" finished - Delete environment "deploy_asp_farm" after test - -Deploy environment with MS SQL server - [Tags] night 5 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "deploy_mssql" for field Environment Name - User click on "Create" - User click on "deploy_mssql" - User click on "Create Service" - User select "MS SQL Server" from dropdown list "Service Type" - User click on "Next" - User set value "ms_sql" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field SA Password - User set value "P@ssw0rd" for field Confirm SA password SQL - User set value "sql" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "ms_sql" - User click on "Deploy This Environment" - Check the status of environment "deploy_mssql" (should be "Ready") - Check that deploy "deploy_mssql" finished - Delete environment "deploy_mssql" after test - -Deploy environment with MS SQL cluster - [Tags] 6 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "deploy_sqlcluster" for field Environment Name - User click on "Create" - User click on "deploy_sqlcluster" - User click on "Create Service" - User create Active Directory with domain name "activeDirectory.mssql" - Page should contain element "activeDirectory.mssql" - User click on "Create Service" - User select "MS SQL Server Cluster" from dropdown list "Service Type" - User click on "Next" - User set value "sql_cluster" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "activeDirectory.mssql" from dropdown list "Domain" - User set value "P@ssw0rd" for field SA Password - User set value "P@ssw0rd" for field Confirm SA password - User click on "Next" - Set IP address from the subnet where Cluster Static IP is running - User set value "cluster" for field Cluster Name - User set value "AG_name" for field Availability Group Name - User set value "AG_listener_name" for field Availability Group Listener Name - Set IP address from the subnet where Availability Group Listener IP is running - User set value "user" for field SQL User Name - User set value "P@ssw0rd" for field SQL User Password - User set value "P@ssw0rd" for field Confirm password - User set value "sqlcluster#" for field Hostname template - User click on "Next" - User set value "testbase" for field Database list - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "sql_cluster" - User click on "Deploy This Environment" - Check the status of environment "deploy_sqlcluster" (should be "Ready") - Check that deploy "deploy_sqlcluster" finished - Delete environment "deploy_sqlcluster" after test - -Deploy Telnet Service - [Tags] night 7 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "deploy_telnet" for field Environment Name - User click on "Create" - User click on "deploy_telnet" - User click on "Create Service" - User select "Linux Telnet" from dropdown list "Service Type" - User click on "Next" - User set value "telnet-service" for field Service Name - User set value "telnet" for field Hostname - User click on "Next" - User select "Linux Image" from dropdown list "Instance image" - User select "murano-lb-key" from dropdown list "Key Pair" - User click on "Create" - User click on "Deploy This Environment" - Check the status of environment "deploy_telnet" (should be "Ready") - Check that deploy "deploy_telnet" finished - -Deploy AD with 2 instances - [Tags] night 8 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "deploy_ad_2_inst" for field Environment Name - User click on "Create" - User click on "deploy_ad_2_inst" - User click on "Create Service" - User select "Active Directory" from dropdown list "Service Type" - User click on "Next" - User set value "twoInstance.domain" for field Domain Name - User set value "2" for field Instance Count - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field Recovery password - User set value "P@ssw0rd" for field Confirm recovery password - User set value "adtwo#" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "twoInstance.domain" - User click on "Deploy This Environment" - Check the status of environment "deploy_ad_2_inst" (should be "Ready") - Check that deploy "deploy_ad_2_inst" finished - Delete environment "deploy_ad_2_inst" after test - -Create IIS and IIS Farm in domain - [Tags] night - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "iis_iisfarm_in_domain" for field Environment Name - User click on "Create" - User click on "iis_iisfarm_in_domain" - User click on "Create Service" - User create Active Directory with domain name "adForIIS.domain" - User click on "Create Service" - User create IIS with name "iis-service" and join in domain "adForIIS.domain" - Check that service "iis-service" was joined in domain "adForIIS.domain" - User click on "environment iis_iisfarm_in_domain" - User click on "Create Service" - User create IIS Farm with name "iis-farm" and join in domain "adForIIS.domain" - Check that service "iis-farm" was joined in domain "adForIIS.domain" - Delete environment "iis_iisfarm_in_domain" after test - -Create ASP.Net and ASP.Net Farm in domain - [Tags] night - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "asp_aspfarm_in_domain" for field Environment Name - User click on "Create" - User click on "asp_aspfarm_in_domain" - User click on "Create Service" - User create Active Directory with domain name "adForASP.domain" - User click on "Create Service" - User create ASP.NET App with name "asp-service" and join in domain "adForASP.domain" - Check that service "asp-service" was joined in domain "adForASP.domain" - User click on "environment asp_aspfarm_in_domain" - User click on "Create Service" - User create ASP.NET Farm with name "asp-farm" and join in domain "adForASP.domain" - Check that service "asp-farm" was joined in domain "adForASP.domain" - Delete environment "asp_aspfarm_in_domain" after test - -Deploy IIS Farm and ASP.NET Farm in 2 domains - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "farms_in_domains" for field Environment Name - User click on "Create" - User click on "farms_in_domains" - User click on "Create Service" - User create Active Directory with domain name "iisdomain.murano" - User click on "Create Service" - User create Active Directory with domain name "aspdomain.murano" - User click on "Create Service" - User create IIS Farm with name "iis-farm" and join in domain "iisdomain.murano" - Check that service "iis-farm" was joined in domain "iisdomain.murano" - User click on "environment farms_in_domains" - User click on "Create Service" - User create ASP.NET Farm with name "asp-farm" and join in domain "aspdomain.murano" - Check that service "asp-farm" was joined in domain "aspdomain.murano" - User click on "environment farms_in_domains" - User click on "Deploy This Environment" - Check the status of environment "farms_in_domains" (should be "Ready") - Check that deploy "farms_in_domains" finished - -Deploy MS SQL server and IIS - [Tags] night 11 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "iis_sqlserver" for field Environment Name - User click on "Create" - User click on "iis_sqlserver" - User click on "Create Service" - User create IIS with name "iis-service" and don't join to domain, select "Not in domain" - User click on "Create Service" - User create MS SQL server with name "mssql" and don't join to domain, select "Not in domain" - User click on "Deploy This Environment" - Check the status of environment "iis_sqlserver" (should be "Ready") - Check that deploy "iis_sqlserver" finished - Delete environment "iis_sqlserver" after test - -Deploy Apache service - [Tags] night 12 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "deploy_apache" for field Environment Name - User click on "Create" - User click on "deploy_apache" - User click on "Create Service" - User select "Linux Apache" from dropdown list "Service Type" - User click on "Next" - User set value "apache-service" for field Service Name - User set value "apache" for field Hostname - User click on "Next" - User select "Linux Image" from dropdown list "Instance image" - User select "murano-lb-key" from dropdown list "Key Pair" - User click on "Create" - User click on "Deploy This Environment" - Check the status of environment "deploy_apache" (should be "Ready") - Check that deploy "deploy_apache" finished diff --git a/webUI/Fields_validation.txt b/webUI/Fields_validation.txt deleted file mode 100644 index 3fd4ebe..0000000 --- a/webUI/Fields_validation.txt +++ /dev/null @@ -1,203 +0,0 @@ -*** Settings *** -Suite Setup -Suite Teardown Close All Browsers -Test Setup Open Browser ${url} remote_url=http://172.18.124.233:4444/wd/hub browser=firefox ff_profile_dir=ffprofile -Test Teardown Close All Browsers -Library String -Library Boffin.WebUIlib 60 60 # Boffin framework library -Resource Resources/objrepo/keywords.txt - -*** Variables *** -${resources_path} Resources/ -${url} http://10.100.0.6/horizon - -*** Test Cases *** -Creating test env - [Tags] night - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "test_env" for field Environment Name - User click on "Create" - Page should contain element "test_env" - -Check regex exspression for AD's name - [Tags] night - Log in WebUI by WebTestUser/swordfish - User click on "test_env" - User click on "Create Service" - User select "Active Directory" from dropdown list "Service Type" - User click on "Next" - User set value "a" for field Domain Name - User click on "Next" - Page should contain element "Ensure this value has at least 2 characters (it has 1)." - User set value "@ct!v3" for field Domain Name - User click on "Next" - Page should contain element "Only letters, numbers and dashes in the middle are allowed." - User set value "domain" for field Domain Name - User click on "Next" - Page should contain element "Single-level domain is not appropriate." - User set value "morethan15symbols.beforedot" for field Domain Name - User click on "Next" - Page should contain element "NetBIOS name cannot be shorter than 1 symbol and longer than 15 symbols." - User set value ".domain.local" for field Domain Name - User click on "Next" - Page should contain element "Period characters are allowed only when they are used to delimit the components of domain style names." - -Check regex for IIS's name - [Tags] night - Log in WebUI by WebTestUser/swordfish - User click on "test_env" - User click on "Create Service" - User select "Internet Information Services" from dropdown list "Service Type" - User click on "Next" - User set value "a" for field Service Name - User click on "Next" - Page should contain element "Ensure this value has at least 2 characters (it has 1)." - User set value "@ct!v3" for field Service Name - User click on "Next" - Page should contain element "Just letters, numbers, underscores and hyphens are allowed." - -Check reges for Git repository - [Tags] night - Log in WebUI by WebTestUser/swordfish - User click on "test_env" - User click on "Create Service" - User select "ASP.NET Application" from dropdown list "Service Type" - User click on "Next" - User set value "a" for field Git repository - User click on "Next" - Page should contain element "Enter correct git repository url" - User set value "://@:" for field Git repository - User click on "Next" - Page should contain element "Enter correct git repository url" - -InValid image types - [Tags] night - Log in WebUI by WebTestUser/swordfish - Navigate to Murano>Images - Select "Delete Metadata" for chosen image "ws-2012-std" - User confirms deletion - Navigate to Murano>Environments - User click on "test_env" - User click on "Create Service" - Page should contain element "Murano image type "windows" is not registered" - User click on "X" - Navigate to Murano>Images - User click on "Mark Image" - User select "ws-2012-std" from dropdown list "Image" - User set value "Windows Server 2012 Standard" for field Title - User select "Windows Server 2012" from dropdown list "with supported types of images" - User click on "Mark" - -Positive scenario №1 for the MS SQL Cluster Form - [Documentation] Scenario 1: \ External AD and Mixed-Mode Auth checkboxes are not selected. User select created earlier domain. - [Tags] night - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "scenario_1" for field Environment Name - User click on "Create" - User click on "scenario_1" - User click on "Create Service" - User create Active Directory with domain name "murano.domain" - User click on "Create Service" - User select "MS SQL Server Cluster" from dropdown list "Service Type" - User click on "Next" - User set value "test_cluster" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "murano.domain" from dropdown list "Domain" - Set checkbox "Mixed-mode Authentication" - User click on "Next" - Page should contain element "Hostname template" - -Positive scenario №2 for MQ SQL Cluster - [Documentation] Scenario 2: \ External AD field is selected (and user fill all fields )and Mixed-Mode Auth checkbox is not selected. - [Tags] night - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "scenario_2" for field Environment Name - User click on "Create" - User click on "scenario_2" - User click on "Create Service" - User select "MS SQL Server Cluster" from dropdown list "Service Type" - User click on "Next" - User set value "test_cluster" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - Set checkbox "Active Directory is configured by the System Administrator" - User set value "user" for field Active Directory User - User set value "P@ssw0rd" for field Active Directory Password - User set value "P@ssw0rd" for field Confirm AD password - Set checkbox "Mixed-mode Authentication" - User click on "Next" - Page should contain element "Hostname template" - -Positive scenario №3 for the MS SQL Cluster Form - [Documentation] Scenario 3: \ External AD and Mixed-Mode Auth checkboxes are \ selected. User have to fill all reguired fields. - [Tags] night - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "scenario_3" for field Environment Name - User click on "Create" - User click on "scenario_3" - User click on "Create Service" - User select "MS SQL Server Cluster" from dropdown list "Service Type" - User click on "Next" - User set value "test_cluster" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - Set checkbox "Active Directory is configured by the System Administrator" - User set value "user" for field Active Directory User - User set value "P@ssw0rd" for field Active Directory Password - User set value "P@ssw0rd" for field Confirm AD password - User set value "P@ssw0rd" for field SA Password - User set value "P@ssw0rd" for field Confirm SA password - User click on "Next" - Page should contain element "Hostname template" - -Bool field validation - [Tags] night - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "bool_validation" for field Environment Name - User click on "Create" - User click on "bool_validation" - User click on "Create Service" - User select "MS SQL Server Cluster" from dropdown list "Service Type" - User click on "Next" - User set value "test_cluster" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - Set checkbox "Active Directory is configured by the System Administrator" - User set value "user" for field Active Directory User - User set value "P@ssw0rd" for field Active Directory Password - User set value "anotherP@ssw0rd" for field Confirm AD password - User set value "P@ssw0rd" for field SA Password - User set value "P@ssw0rd" for field Confirm SA Password - User click on "Next" - Page should contain element "Active Directory Passwords don't match" - Set checkbox "Active Directory is configured by the System Administrator" - User click on "Next" - Page should contain element "This field is required." - -Check validation of "Hostname template" field - Log in WebUI by WebTestUser/swordfish - User click on "test_env" - User click on "Create Service" - User select "Demo Service" from dropdown list "Service Type" - User click on "Next" - User set value "demo_service" for field Service Name - User set value "demo" for field Hostname template - User click on "Next" - Page should contain element "Incrementation symbol "#" is required" - User set value "1" for field Instance Count - User click on "Next" - Page should contain element "Instance Configuration" - -Delete test env - [Tags] night - Log in WebUI by WebTestUser/swordfish - Select "More" for chosen environment "test_env" - Select "Delete Environment" for chosen environment "test_env" - User confirms deletion - Page should not contain element "test_env" diff --git a/webUI/Files_for_autotests/agent/AgentTemplate.template b/webUI/Files_for_autotests/agent/AgentTemplate.template deleted file mode 100644 index 937a240..0000000 --- a/webUI/Files_for_autotests/agent/AgentTemplate.template +++ /dev/null @@ -1,23 +0,0 @@ -{ - "Resources": { - "$MuranoSecurityGroup-{envName}": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "SecurityGroupIngress": [ - { - "ToPort": "80", - "IpProtocol": "tcp", - "FromPort": "80", - "CidrIp": "0.0.0.0/0" - }, - { - "ToPort": "443", - "IpProtocol": "tcp", - "FromPort": "443", - "CidrIp": "0.0.0.0/0" - } - ] - } - } - } -} diff --git a/webUI/Files_for_autotests/heat/ServiceHeatTemplate.template b/webUI/Files_for_autotests/heat/ServiceHeatTemplate.template deleted file mode 100644 index 60095d5..0000000 --- a/webUI/Files_for_autotests/heat/ServiceHeatTemplate.template +++ /dev/null @@ -1,47 +0,0 @@ -{ - "AWSTemplateFormatVersion": "2010-09-09", - - "Parameters": { - "KeyName": { - "Description": "Key Pair name for Load Balancer", - "Type": "String", - "Default": "murano-lb-key" - } - }, - - "Resources": { - "$instanceName": { - "Type": "AWS::EC2::Instance", - "Properties": { - "InstanceType": "$instanceType", - "ImageId": "$imageName", - "AvailabilityZone": "$availabilityZone", - "UserData": "$userData" - } - }, - "MuranoDefaultSecurityGroup": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "SecurityGroupIngress": [ - { - "ToPort": "22", - "IpProtocol": "tcp", - "FromPort": "22", - "CidrIp": "0.0.0.0/0" - }, - { - "ToPort": "-1", - "IpProtocol": "icmp", - "FromPort": "-1", - "CidrIp": "0.0.0.0/0" - } - ], - "GroupDescription": "Default security group for Murano Environments" - } - } - - }, - - "Outputs": { - } -} diff --git a/webUI/Files_for_autotests/myAgentTemplate.template b/webUI/Files_for_autotests/myAgentTemplate.template deleted file mode 100644 index 937a240..0000000 --- a/webUI/Files_for_autotests/myAgentTemplate.template +++ /dev/null @@ -1,23 +0,0 @@ -{ - "Resources": { - "$MuranoSecurityGroup-{envName}": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "SecurityGroupIngress": [ - { - "ToPort": "80", - "IpProtocol": "tcp", - "FromPort": "80", - "CidrIp": "0.0.0.0/0" - }, - { - "ToPort": "443", - "IpProtocol": "tcp", - "FromPort": "443", - "CidrIp": "0.0.0.0/0" - } - ] - } - } - } -} diff --git a/webUI/Files_for_autotests/myHeatTemplate.template b/webUI/Files_for_autotests/myHeatTemplate.template deleted file mode 100644 index a737bc2..0000000 --- a/webUI/Files_for_autotests/myHeatTemplate.template +++ /dev/null @@ -1,53 +0,0 @@ -{ - "AWSTemplateFormatVersion": "2010-09-09", - - "Parameters": { - "KeyName": { - "Description": "Key Pair name for Load Balancer", - "Type": "String", - "Default": "murano-lb-key" - } - }, - - "Resources": { - "$instanceName": { - "Type": "AWS::EC2::Instance", - "Properties": { - "InstanceType": "$instanceType", - "ImageId": "$imageName", - "AvailabilityZone": "$availabilityZone", - "UserData": "$userData" - } - }, - "MuranoDefaultSecurityGroup": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "SecurityGroupIngress": [ - { - "ToPort": "3389", - "IpProtocol": "tcp", - "FromPort": "3389", - "CidrIp": "0.0.0.0/0" - }, - { - "ToPort": "22", - "IpProtocol": "tcp", - "FromPort": "22", - "CidrIp": "0.0.0.0/0" - }, - { - "ToPort": "-1", - "IpProtocol": "icmp", - "FromPort": "-1", - "CidrIp": "0.0.0.0/0" - } - ], - "GroupDescription": "Default security group for Murano Environments" - } - } - - }, - - "Outputs": { - } -} diff --git a/webUI/Files_for_autotests/myScript.ps1 b/webUI/Files_for_autotests/myScript.ps1 deleted file mode 100644 index ba135eb..0000000 --- a/webUI/Files_for_autotests/myScript.ps1 +++ /dev/null @@ -1,42 +0,0 @@ - -Function DeployTestingFunction { - $stream = [System.IO.StreamWriter] "C:/test_report.txt" - $stream.WriteLine(“Test Report”) - - $host_name = [System.Net.Dns]::GetHostByName((hostname)).HostName - $stream.WriteLine(“Host: $host_name”) - - $ip_address = [System.Net.Dns]::GetHostByName((hostname)).AddressList.IPAddressToString - $stream.WriteLine(“IP Address: $ip_address”) - - $win_agent = Get-Process WindowsAgent | Select-Object name,fileversion,productversion,company - if ($win_agent) { $agent_status = ‘running’ } else { $agent_status = ‘error’ } - $stream.WriteLine(“Murano Windows Agent Process Status: $agent_status”) - if ($win_agent) { $agent_version = $win_agent.FileVersion - $stream.WriteLine(“Murano Windows Agent Version: $agent_version”) } - - $stream.WriteLine(“Firewall Opened Ports:”) - $firewall_rules = Get-NetFirewallPortFilter | Select-Object Protocol, RemotePort, LocalPort - foreach ($rule in $firewall_rules) { $stream.WriteLine($rule) } - - $stream.close() -} - - - - - - - - - - - - - - - - - - - diff --git a/webUI/Files_for_autotests/myService-manifest.yaml b/webUI/Files_for_autotests/myService-manifest.yaml deleted file mode 100644 index c1fcd6a..0000000 --- a/webUI/Files_for_autotests/myService-manifest.yaml +++ /dev/null @@ -1,18 +0,0 @@ -agent: -- AgentTemplate.template -author: 'User' -description: The new service uploaded by user -enabled: true -full_service_name: myService -heat: -- ServiceHeatTemplate.template -scripts: -- ServiceScript.ps1 -service_display_name: My Service -service_version: '' -ui: -- Yaml.yaml -version: '0.1' -workflows: -- XMLWorkflow.xml - diff --git a/webUI/Files_for_autotests/myService.tar b/webUI/Files_for_autotests/myService.tar deleted file mode 100644 index 96c9f34..0000000 Binary files a/webUI/Files_for_autotests/myService.tar and /dev/null differ diff --git a/webUI/Files_for_autotests/myService.tar.gz b/webUI/Files_for_autotests/myService.tar.gz deleted file mode 100644 index 62147c0..0000000 Binary files a/webUI/Files_for_autotests/myService.tar.gz and /dev/null differ diff --git a/webUI/Files_for_autotests/myXMLWorkflow.xml b/webUI/Files_for_autotests/myXMLWorkflow.xml deleted file mode 100644 index 3858236..0000000 --- a/webUI/Files_for_autotests/myXMLWorkflow.xml +++ /dev/null @@ -1,355 +0,0 @@ - - - - - Creating instance ) - - - - - - - - - - - - ( - Unable to deploy instance ) due to - - - - - - - - - - Unable to set admin password on unit ) due to - - - - - - - - - - Unable to set domain administrator password on unit ) due to - Creating Primary Domain Controller on unit ) - - - - - - - - - - - - - - - Primary Domain Controller created - - - - - ( - - - - - - - - - - - - - - - Unable assign DNS IP on unit ) due to - - - - - - - - - - ( - - - - - - ( - - - - - - - - - - - - /$.services[?(@.type == 'active' and @.domain == ' - - - - - - - - - - - - - Unit ) has joined domain - Unit ) was unable to join the domain due to - Creating Secondary Domain Controller on unit ) - - - - - - - - - - - - - Secondary Domain Controller created - - - created - - - - - ( - - - - - - - - - - - - Creating IIS Web Server on unit ) - - - - - - - - - ( - Unable to install IIS on ) due to - - - - - - - ( - - - - - - - - - - - Instance ) created - - - - - ( - - - - - - - - - - - - - - - - - - - - ( - - - - - - - - - - - - - - - - - - - - ( - - - - - - - - - ( - - - - - - - - - Unable to create a Primary DC on unit ) due to - - - - - - - - ( - - - - - - - - - - - - - - - - Unit ) has left domain - Unit ) was unable to leave the domain due to - - - ' and @.state.primaryDcIp)] - - - - - - - - - - - - - - - - - - - - - - ( - - - - - ( - - - - - - - - - - - ( - - - - - - - - - - - - - - Domain - Unable to create Secondary Domain Controller on unit ) due to - Unable to create domain - - - - - - ( - - - - IIS ) has started - - - - - ( - - - - - - diff --git a/webUI/Murano_Repository_0.4.txt b/webUI/Murano_Repository_0.4.txt deleted file mode 100644 index 8d9a0ca..0000000 --- a/webUI/Murano_Repository_0.4.txt +++ /dev/null @@ -1,163 +0,0 @@ -*** Settings *** -Suite Setup -Suite Teardown Close All Browsers -Test Setup Open Browser ${url} remote_url=http://172.18.124.233:4444/wd/hub browser=firefox ff_profile_dir=ffprofile -Test Teardown Close All Browsers -Library String -Library Boffin.WebUIlib 60 60 # Boffin framework library -Resource Resources/objrepo/keywords.txt - -*** Variables *** -${resources_path} Resources/ -${url} http://10.100.0.6/horizon -${files_path} Files_for_autotests/ - -*** Test Cases *** -Check opportunity to compose a new service in repository - [Tags] night commit - Log in WebUI by WebTestUser/swordfish - User click on "Service Definitions" - User click on "Compose Service" - User set value "New Test Service" for field Service_Name - User set value "newService" for field Fully Qualified Service Name - User set value " New Test Service Here is a new description" for field Description - User click on "UI Files" - Choose Demo.yaml (set checkbox on in the 3 column) - User click on "Workflows" - Choose Demo.xml (set checkbox on in the 3 column) - User click on "Agent Templates" - Choose Demo.template (set checkbox on in the 3 column) - User click on "Scripts" - Choose CopyPrerequisites.ps1 (set checkbox on in the 3 column) - User click on "Submit" - Page should contain element "New Test Service" - -Check opportunity to toggle service (make it active/inactive) - [Tags] night - Log in WebUI by WebTestUser/swordfish - User click on "Service Definitions" - Select "More" for chosen service "Internet Information Services" - Select "Toggle Active" for chosen service "Internet Information Services" - Check that Active of element "Internet Information Services" is "False" - Select "More" for chosen service "Internet Information Services" - Select "Toggle Active" for chosen service "Internet Information Services" - Check that Active of element "Internet Information Services" is "True" - -Modify Service(change name) - [Tags] night commit - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "test" for field Environment Name - User click on "Create" - Navigate to Murano>Service Definitions - Select "Modify Service" for chosen service "Linux Apache" - User set value "Linux Apache2" for field Service_Name - User click on "Submit" - Navigate to Murano>Environments - User click on "test" - User click on "Create Service" - User select "Linux Apache2" from dropdown list "Service Type" - User click on "Next" - Page should contain element "Linux Apache2" - -Modify Service (change description) - [Tags] don'twork - Log in WebUI by WebTestUser/swordfish - User click on "Service Definitions" - Select "Modify Service" for chosen service "Active Directory" - User set value "Here is a new description" for field Description - User click on "Submit" - Select "More" for chosen service "Active Directory" - Select "Manage Service" for chosen service "Active Directory" - Page should contain element "Description" - Page should contain element "Here is a new description" - -Check opportunity to select composed service in Service Type list - [Tags] night - Log in WebUI by WebTestUser/swordfish - User click on "Service Definitions" - Compose a new service "TestService" - Navigate To Murano>Environments - User click on "test" - User click on "Create Service" - User select "TestService" from dropdown list "Service Type" - User click on "Next" - Page should contain element "Service Name" - -Check opportunity to delete service from repository - [Tags] night commit - Log in WebUI by WebTestUser/swordfish - User click on "Service Definitions" - Compose a new service "ServiceForDeletion" - Select "More" for chosen service "ServiceForDeletion" - Select "Delete Service" for chosen service "ServiceForDeletion" - User confirms deletion - Page should not contain element "ServiceForDeletion" - -Check opportunity to toggle files (make few services active/inactive) - [Tags] night - Log in WebUI by WebTestUser/swordfish - User click on "Service Definitions" - Choose Internet Information Services (set checkbox on in the 1 column) - Choose Active Directory (set checkbox on in the 1 column) - User click on "Toggle Active" - Check that Active of element "Internet Information Services" is "False" - Check that Active of element "Active Directory" is "False" - Choose Internet Information Services (set checkbox on in the 1 column) - Choose Active Directory (set checkbox on in the 1 column) - User click on "Toggle Active" - Check that Active of element "Internet Information Services" is "True" - Check that Active of element "Active Directory" is "True" - -Check opportunity to download service in repository - [Tags] don'twork - Log in WebUI by WebTestUser/swordfish - User click on "Service Definitions" - User click on "Upload Service" - Choose and download file "myService.tar.gz" to repository - Page should contain element "My Service" - -Check opportunity to manage service (add files to existing service) - [Tags] don'twork - Log in WebUI by WebTestUser/swordfish - User click on "Service Definitions" - Compose a new service "Service" - Select "More" for chosen service "Service" - Select "Manage Service" for chosen service "Service" - User click on "Heat Templates" - Choose and download file "myHeatTemplate.template" to repository - Page should contain element "myHeatTemplate.template" - User click on "Scripts" - Choose and download file "myScript.ps1" to repository - Page should contain element "myScript.ps1" - -Check opportunity to manage service (delete component from existing service) - [Tags] night - Log in WebUI by WebTestUser/swordfish - User click on "Service Definitions" - Select "More" for chosen service "MS SQL Server Cluster" - Select "Manage Service" for chosen service "MS SQL Server Cluster" - Select "More" for chosen file "SQLCluster.template" - Select "Delete File" for chosen file "SQLCluster.template" - User confirms deletion - Page should not contain element "SQLCluster.template" - -Manage Files (Check ability to add file to repository) - [Tags] don'twork - Log in WebUI by WebTestUser/swordfish - User click on "Service Definitions" - User click on "Manage Files" - User click on "Upload File" - User select "UI Definition (*.yaml)" from dropdown list "File data type" - Choose and download file "myYaml.yaml" to repository - Page should contain element "myYaml.yaml" - -Manage Files (Check ability to delete file from repository) - [Tags] night - Log in WebUI by WebTestUser/swordfish - User click on "Service Definitions" - User click on "Manage Files" - Choose Demo.yaml (set checkbox on in the 1 column) - User click on "Delete Files" - User confirms deletion - Page should not contain element "Demo.yaml" diff --git a/webUI/Resources/objrepo/common.ini b/webUI/Resources/objrepo/common.ini deleted file mode 100644 index 7b27ed4..0000000 --- a/webUI/Resources/objrepo/common.ini +++ /dev/null @@ -1,52 +0,0 @@ -[DEFAULT] -type=identifier -frame= -parent= - -[confirmrecoverypassword] -type=id -identificator=id_activeDirectory-0-recoveryPassword-clone - -[confirmsapasswordsql] -type=id -identificator=id_msSqlServer-0-saPassword-clone - -[confirmsapassword] -type=id -identificator=id_msSqlClusterServer-0-saPassword-clone - -[confirmdeletion] -type=xpath -identificator=.//*[@id='modal_wrapper']/div/div[3]/a[1] - -[newname] -type=xpath -identificator=.//*[@id='id_name'] - -[title] -type=xpath -identificator=.//*[@id='id_title'] - -[withsupportedtypesofimages] -type=xpath -identificator=.//*[@id='id_type'] - -[service_name] -type=xpath -identificator=.//*[@id='id_service_display_name'] - -[description] -type=xpath -identificator=.//*[@id='id_description'] - -[author] -type=xpath -identificator=.//*[@id='id_author'] - -[confirmadpassword] -type=id -identificator=id_msSqlClusterServer-0-domainAdminPassword-clone - -[x] -type=xpath -identificator=.//*[@id='create_service']/div/a diff --git a/webUI/Resources/objrepo/keywords.txt b/webUI/Resources/objrepo/keywords.txt deleted file mode 100644 index 029bb61..0000000 --- a/webUI/Resources/objrepo/keywords.txt +++ /dev/null @@ -1,242 +0,0 @@ -*** Settings *** -Library String -Library Boffin.WebUIlib 0 5 # Boffin framework library - -*** Keywords *** -Log in WebUI by ${user}/${password} - Fill Field User Name ${user} - Fill Field Password ${password} - Click on Sign In - Navigate to Murano>Environments - -User set value "${value}" for field ${field} - Fill Field ${field} ${value} - -Select "${action}" for chosen ${type} "${env}" - ${xpath}= Find Associated Element ${env} ${action} - Click Element ${xpath} - Sleep 5 - -User click on "${element}" - Wait For Page Loaded - Click on ${element} - Wait For Page Loaded - -Page should contain element "${element}" - Wait For Page Loaded - Page Should Contain ${element} - -Page should not contain element "${element}" - Reload Page - Page Should Not Contain ${element} - -User select "${item}" from dropdown list "${menu}" - Select Item From List ${menu} ${item} - -User confirms deletion - Click On Confirm deletion - -Delete environment "${name}" after test - Navigate To Murano>Environments - Select "More" for chosen environment "${name}" - Select "Delete Environment" for chosen environment "${name}" - User confirms deletion - Page should not contain element "${name}" - -Check the status of environment "${name}" (should be "${status}") - Navigate to Murano>Environments - Wait Until Keyword Succeeds 40 min 5s Check that Status of environment "${name}" is "${status}" - -User create Active Directory with domain name "${name}" - User select "Active Directory" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Domain Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User set value "P@ssw0rd" for field Recovery password - User set value "P@ssw0rd" for field Confirm recovery password - User set value "${name}" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Sleep 5s - -Check that deploy "${env}" finished - Navigate To Murano>Environments - Select "More" for chosen environment "${env}" - Select "Show Deployments" for chosen environment "${env}" - Reload Page - ${text}= Get Text xpath=/html/body/div/div[2]/div[3]/form/table/tbody/tr/td[3] - Run Keyword If '${text}'== 'Failed' Take a screenshot of the failed deploy - Should Be Equal As Strings ${text} Successful - -Check that ${subject} of ${element} "${name}" is "${status}" - Sleep 10 - ${row}= Get Table Row With ${name} - ${source}= Get Source - ${cell}= Get Web Element Selector ${subject} ${source} th this - ${#_of_column}= Get Substring ${cell} -2 -1 - ${text}= Get Text xpath=${row}/td[${#_of_column}] - Should Contain ${text} ${status} - -Take a screenshot of the failed deploy - User click on "Show Details" - User click on "Logs" - Capture Page Screenshot - -User create IIS with name "${name}" ${join} "${domain}" - User select "Internet Information Services" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "iis" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page Should Contain ${name} - -User create ASP.NET App with name "${name}" ${join} "${domain}" - User select "ASP.NET Application" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "asp" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "${name}" - -User create IIS Farm with name "${name}" ${join} "${domain}" - User select "Internet Information Services Web Farm" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "iisfarm#" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "${name}" - -User create ASP.NET Farm with name "${name}" ${join} "${domain}" - User select "ASP.NET Application Web Farm" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "git://github.com/Mirantis/murano-mvc-demo.git" for field Git repository - User set value "aspfarm#" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "${name}" - -User create MS SQL server with name "${name}" ${join} "${domain}" - User select "MS SQL Server" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "P@ssw0rd" for field SA Password - User set value "P@ssw0rd" for field Confirm SA password SQL - User set value "sql" for field Hostname template - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "${name}" - -User create MS SQL cluster with name "${name}" ${join} "${domain}" - User create Active Directory with domain name "${domain}" - Page should contain element "${domain}" - User click on "Create Service" - User select "MS SQL Server Cluster" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "P@ssw0rd" for field Administrator password - User set value "P@ssw0rd" for field Confirm password - User select "${domain}" from dropdown list "Domain" - User set value "P@ssw0rd" for field SA Password - User set value "P@ssw0rd" for field Confirm SA password - User click on "Next" - Set IP address from the subnet where Cluster Static IP is running - User set value "cluster" for field Cluster Name - User set value "AG_name" for field Availability Group Name - User set value "AG_listener_name" for field Availability Group Listener Name - Set IP address from the subnet where Availability Group Listener IP is running - User set value "user" for field SQL User Name - User set value "P@ssw0rd" for field SQL User Password - User set value "P@ssw0rd" for field Confirm password - User set value "sqlcluster#" for field Hostname template - User click on "Next" - User set value "testbase" for field Database list - User click on "Next" - User select "Windows Server 2012 Standard" from dropdown list "Instance image" - User click on "Create" - Page should contain element "${name}" - -User create Telnet with name "${name}" - User select "Linux Telnet" from dropdown list "Service Type" - User click on "Next" - User set value "${name}" for field Service Name - User set value "telnet" for field Hostname - User click on "Next" - User select "Linux Image" from dropdown list "Instance image" - User select "murano-lb-key" from dropdown list "Key Pair" - User click on "Create" - Wait For Page Loaded - -Check that service "${service}" was joined in domain "${domain}" - User click on "${service}" - Page should contain element "${domain}" - -Choose ${name} (set checkbox on in the ${num} column) - ${row}= Get Table Row With ${name} - Click Element xpath=${row}/td[${num}]/input - -Compose a new service "${name}" - User click on "Compose Service" - User set value "${name}" for field Service_Name - User set value "${name}Service" for field Fully Qualified Service Name - User set value "WebTestUser" for field Author - User set value " New Test Service Here is a new description" for field Description - User click on "UI Files" - Choose Demo.yaml (set checkbox on in the 3 column) - User click on "Workflows" - Choose Demo.xml (set checkbox on in the 3 column) - User click on "Agent Templates" - Choose Demo.template (set checkbox on in the 3 column) - User click on "Scripts" - Choose CopyPrerequisites.ps1 (set checkbox on in the 3 column) - User click on "Submit" - Page should contain element "${name}" - -Choose and download file "${file_name}" to repository - Click Element xpath=.//*[@id='id_file'] - Choose File id_file ${files_path}${file_name} - Sleep 5s - User click on "Upload" - Sleep 5s - -Set IP address from the subnet where ${component} is running - User set value "1.1.1.1" for field ${component} - User click on "Next" - Page should contain Specified IP address should belong to - ${xpath} Find Associated Element ${component} Specified IP address should belong to - ${string}= Get Text ${xpath} - @{words} Split String ${string} ${SPACE} - @{IP} Split String @{words}[6] . - ${last_byte}= Generate Random String 2 [NUMBERS] - User set value "@{IP}[0].@{IP}[1].@{IP}[2].${last_byte}" for field ${component} - -Set Checkbox "${name}" - ${checkbox} Wait For Element Found ${name} input previous - Click Element ${checkbox} - Sleep 2s diff --git a/webUI/Sanity_tests_0.3.txt b/webUI/Sanity_tests_0.3.txt deleted file mode 100644 index 7c05f56..0000000 --- a/webUI/Sanity_tests_0.3.txt +++ /dev/null @@ -1,119 +0,0 @@ -*** Settings *** -Suite Setup -Suite Teardown Close All Browsers -Test Setup Open Browser ${url} remote_url=http://172.18.124.233:4444/wd/hub browser=firefox ff_profile_dir=ffprofile -Test Teardown Close All Browsers -Library String -Library Boffin.WebUIlib 0 5 # Boffin framework library - -*** Variables *** -${resources_path} Resources/ -${url} http://10.100.0.2/horizon - -*** Test Cases *** -Create environment - [Tags] commit 1 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "env" for field Environment Name - User click on "Create" - Reload Page - Page should contain element "env" - Delete environment "env" after test - -Edit environment - [Tags] commit 2 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "env1" for field Environment Name - User click on "Create" - Select "More" for chosen environment "env1" - Select "Edit Environment" for chosen environment "env1" - User set value "edited_env" for field new Name - User click on "Save" - Page should contain element "edited_env" - Delete environment "edited_env" after test - -Delete Environment - [Tags] commit 3 - Log in WebUI by AutotestUser/swordfish - User click on "Create Environment" - User set value "env2" for field Environment Name - User click on "Create" - Select "More" for chosen environment "env2" - Select "Delete Environment" for chosen environment "env2" - User confirms deletion - Page should not contain element "env2" - -Delete Image from repo - [Tags] commit 4 - Log in WebUI by AutotestUser/swordfish - User click on "Marked Image" - User click on "Mark Image" - User select "ws-2012-std" from dropdown list "Image" - User set value "Image for deletion" for field Title - User select "Windows Server 2012" from dropdown list "with supported types of images" - User click on "Mark" - Page should contain element "Image for deletion" - Select "Delete Metadata" for chosen image "Image for deletion" - User confirms deletion - Page should not contain element "Image for deletion" - -Rename Windows image - [Tags] night commit 5 - Log in WebUI by AutotestUser/swordfish - User click on "Marked Image" - User click on "Mark Image" - User select "ws-2012-std" from dropdown list "Image" - User set value "Windows Server 2012 Standard" for field Title - User select "Windows Server 2012" from dropdown list "with supported types of images" - User click on "Mark" - Page should contain element "Windows Server 2012 Standard" - -Rename Linux image - [Tags] night commit 6 - Log in WebUI by AutotestUser/swordfish - User click on "Marked Image" - User click on "Mark Image" - User select "F18-x86_64-cfntools-MURANO" from dropdown list "Image" - User set value "Linux Image" for field Title - User select "Generic Linux" from dropdown list "with supported types of images" - User click on "Mark" - Page should contain element "Linux Image" - -*** Keywords *** -Log in WebUI by ${user}/${password} - Fill Field User Name ${user} - Fill Field Password ${password} - Click on Sign In - Navigate to Project>Environments - -User set value "${value}" for field ${field} - Fill Field ${field} ${value} - -Select "${action}" for chosen ${type} "${env}" - ${xpath}= Find Associated Element ${env} ${action} - Click Element ${xpath} - -User click on "${element}" - Click on ${element} - -Page should contain element "${element}" - Page Should Contain ${element} - -Page should not contain element "${element}" - Reload Page - Page Should Not Contain ${element} - -User select "${item}" from dropdown list "${menu}" - Select Item From List ${menu} ${item} - -User confirms deletion - Click On Confirm deletion - -Delete environment "${name}" after test - Navigate To Project>Environments - Select "More" for chosen environment "${name}" - Select "Delete Environment" for chosen environment "${name}" - User confirms deletion - Page should not contain element "${name}" diff --git a/webUI/Sanity_tests_0.4.txt b/webUI/Sanity_tests_0.4.txt deleted file mode 100644 index 3b3d062..0000000 --- a/webUI/Sanity_tests_0.4.txt +++ /dev/null @@ -1,84 +0,0 @@ -*** Settings *** -Suite Setup -Suite Teardown Close All Browsers -Test Setup Open Browser ${url} remote_url=http://172.18.124.233:4444/wd/hub browser=firefox ff_profile_dir=ffprofile -Test Teardown Close All Browsers -Library String -Library Boffin.WebUIlib 60 60 # Boffin framework library -Resource Resources/objrepo/keywords.txt - -*** Variables *** -${resources_path} Resources/ -${url} http://10.100.0.6/horizon - -*** Test Cases *** -Create environment - [Tags] commit 1 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "env" for field Environment Name - User click on "Create" - Wait For Page Loaded - Page should contain element "env" - Delete environment "env" after test - -Edit environment - [Tags] commit 2 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "env1" for field Environment Name - User click on "Create" - Select "More" for chosen environment "env1" - Select "Edit Environment" for chosen environment "env1" - User set value "edited_env" for field new Name - User click on "Save" - Page should contain element "edited_env" - Delete environment "edited_env" after test - -Delete Environment - [Tags] commit 3 - Log in WebUI by WebTestUser/swordfish - User click on "Create Environment" - User set value "env2" for field Environment Name - User click on "Create" - Select "More" for chosen environment "env2" - Select "Delete Environment" for chosen environment "env2" - User confirms deletion - Page should not contain element "env2" - -Delete Image from repo - [Tags] commit 4 - Log in WebUI by WebTestUser/swordfish - User click on "Images" - User click on "Mark Image" - User select "TestImageForDeletion" from dropdown list "Image" - User set value "Image for deletion" for field Title - User select "Windows Server 2012" from dropdown list "with supported types of images" - User click on "Mark" - Page should contain element "Image for deletion" - Select "Delete Metadata" for chosen image "Image for deletion" - User confirms deletion - Page should not contain element "Image for deletion" - -Rename Windows image - [Tags] night commit 5 - Log in WebUI by WebTestUser/swordfish - User click on "Images" - User click on "Mark Image" - User select "ws-2012-std" from dropdown list "Image" - User set value "Windows Server 2012 Standard" for field Title - User select "Windows Server 2012" from dropdown list "with supported types of images" - User click on "Mark" - Page should contain element "Windows Server 2012 Standard" - -Rename Linux image - [Tags] night commit 5 - Log in WebUI by WebTestUser/swordfish - User click on "Images" - User click on "Mark Image" - User select "cloud-centos" from dropdown list "Image" - User set value "Linux Image" for field Title - User select "Generic Linux" from dropdown list "with supported types of images" - User click on "Mark" - Page should contain element "Linux Image" - diff --git a/webUI/__init__.txt b/webUI/__init__.txt deleted file mode 100644 index e69de29..0000000 diff --git a/webUI/ffprofile/user.js b/webUI/ffprofile/user.js deleted file mode 100644 index b00d590..0000000 --- a/webUI/ffprofile/user.js +++ /dev/null @@ -1 +0,0 @@ -user_pref("webdriver_enable_native_events", false); diff --git a/webUI/output.xml b/webUI/output.xml deleted file mode 100644 index 1f8ad17..0000000 --- a/webUI/output.xml +++ /dev/null @@ -1,1053 +0,0 @@ - - - - - -Opens a new browser instance to given URL. - -${url} -remote_url=http://172.18.124.233:4444/wd/hub -browser=firefox -ff_profile_dir=ffprofile - -Opening browser 'firefox' to base url 'http://10.100.0.6/horizon' through remote server at 'http://172.18.124.233:4444/wd/hub' - - - - - - - - - -User Name -${user} - -Typing text 'WebTestUser' into text field 'xpath=html/body/div/div/div/form/div/fieldset/div/div/input' -Element Name: username -fullFileName Resources/objrepo/common.ini -Element Name: username -fullFileName Resources/objrepo/common.ini - - - - - -Password -${password} - -Typing password into text field 'xpath=html/body/div/div/div/form/div/fieldset/div[2]/div/input' -Element Name: password -fullFileName Resources/objrepo/common.ini -Element Name: password -fullFileName Resources/objrepo/common.ini - - - - - -Sign In - -Clicking element 'xpath=html/body/div/div/div/form/div[2]/button'. -Element Name: signin -fullFileName Resources/objrepo/common.ini -Element Name: signin -fullFileName Resources/objrepo/common.ini - - - -Navigates to the page by given links sequence. - -Murano>Environments - -Clicking link 'Murano'. -Clicking link 'Environments'. - - - - - - - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - - - -${element} - -Clicking element 'xpath=html/body/div/div[2]/div[3]/form/table/thead/tr/th/div/a'. -Element Name: createenvironment -fullFileName Resources/objrepo/common.ini -Element Name: createenvironment -fullFileName Resources/objrepo/common.ini - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - - - - - - - - - -${field} -${value} - -Typing text 'env' into text field 'xpath=html/body/div[3]/div/form/div[2]/div/fieldset/table/tbody/tr/td/div/div/input' -Element Name: environmentname -fullFileName Resources/objrepo/common.ini -Element Name: environmentname -fullFileName Resources/objrepo/common.ini - - - - - - - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - - - -${element} - -Clicking element 'xpath=html/body/div[3]/div/form/div[3]/input'. -Element Name: create -fullFileName Resources/objrepo/common.ini -Element Name: create -fullFileName Resources/objrepo/common.ini - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - - - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - -Verifies that current page contains `text`. - -${element} - -Current page contains text 'env'. - - - - - - - - - -Navigates to the page by given links sequence. - -Murano>Environments - -Clicking link 'Murano'. -Clicking link 'Environments'. - - - - - - - -This method allows to find element, which located near other element and returns xpath of this element. - -${env} -${action} - -Element Name: env -fullFileName Resources/objrepo/common.ini -${xpath} = xpath=html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/a[2] - - - -Click element identified by `locator`. - -${xpath} - -Clicking element 'xpath=html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/a[2]'. - - - -Pauses the test executed for the given time. - -5 - -Slept 5 seconds - - - - - - - - - -This method allows to find element, which located near other element and returns xpath of this element. - -${env} -${action} - -Element Name: env -fullFileName Resources/objrepo/common.ini -${xpath} = xpath=html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/ul/li[2]/button - - - -Click element identified by `locator`. - -${xpath} - -Clicking element 'xpath=html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/ul/li[2]/button'. - - - -Pauses the test executed for the given time. - -5 - -Slept 5 seconds - - - - - - - - - - - -Confirm deletion - -Clicking element 'xpath=.//*[@id='modal_wrapper']/div/div[3]/a[1]'. -Element Name: confirmdeletion -fullFileName Resources/objrepo/common.ini -A: xpath -A: xpath -Element Name: confirmdeletion -fullFileName Resources/objrepo/common.ini -A: xpath -A: xpath - - - - - - - - - -Simulates user reloading page. - - - - - -Verifies the current page does not contain `text`. - -${element} - -Current page does not contain text 'env'. - - - - - - - -Closes all open browsers and resets the browser cache. - - - - - - -1 -commit - - - - - -Opens a new browser instance to given URL. - -${url} -remote_url=http://172.18.124.233:4444/wd/hub -browser=firefox -ff_profile_dir=ffprofile - -Opening browser 'firefox' to base url 'http://10.100.0.6/horizon' through remote server at 'http://172.18.124.233:4444/wd/hub' - - - - - - - - - -User Name -${user} - -Typing text 'WebTestUser' into text field 'xpath=html/body/div/div/div/form/div/fieldset/div/div/input' -Element Name: username -fullFileName Resources/objrepo/common.ini -Element Name: username -fullFileName Resources/objrepo/common.ini - - - - - -Password -${password} - -Typing password into text field 'xpath=html/body/div/div/div/form/div/fieldset/div[2]/div/input' -Element Name: password -fullFileName Resources/objrepo/common.ini -Element Name: password -fullFileName Resources/objrepo/common.ini - - - - - -Sign In - -Clicking element 'xpath=html/body/div/div/div/form/div[2]/button'. -Element Name: signin -fullFileName Resources/objrepo/common.ini -Element Name: signin -fullFileName Resources/objrepo/common.ini - - - -Navigates to the page by given links sequence. - -Murano>Environments - -Clicking link 'Murano'. -Clicking link 'Environments'. - - - - - - - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - - - -${element} - -Clicking element 'xpath=html/body/div/div[2]/div[3]/form/table/thead/tr/th/div/a'. -Element Name: createenvironment -fullFileName Resources/objrepo/common.ini -Element Name: createenvironment -fullFileName Resources/objrepo/common.ini - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - - - - - - - - - -${field} -${value} - -Typing text 'env1' into text field 'xpath=html/body/div[3]/div/form/div[2]/div/fieldset/table/tbody/tr/td/div/div/input' -Element Name: environmentname -fullFileName Resources/objrepo/common.ini -Element Name: environmentname -fullFileName Resources/objrepo/common.ini - - - - - - - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - - - -${element} - -Clicking element 'xpath=html/body/div[3]/div/form/div[3]/input'. -Element Name: create -fullFileName Resources/objrepo/common.ini -Element Name: create -fullFileName Resources/objrepo/common.ini - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - - - - - - - -This method allows to find element, which located near other element and returns xpath of this element. - -${env} -${action} - -Element Name: env1 -fullFileName Resources/objrepo/common.ini -${xpath} = xpath=html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/a[2] - - - -Click element identified by `locator`. - -${xpath} - -Clicking element 'xpath=html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/a[2]'. - - - -Pauses the test executed for the given time. - -5 - -Slept 5 seconds - - - - - - - - - -This method allows to find element, which located near other element and returns xpath of this element. - -${env} -${action} - -Element Name: env1 -fullFileName Resources/objrepo/common.ini -${xpath} = xpath=html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/ul/li/a - - - -Click element identified by `locator`. - -${xpath} - -Clicking element 'xpath=html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/ul/li/a'. - - - -Pauses the test executed for the given time. - -5 - -Slept 5 seconds - - - - - - - - - - - -${field} -${value} - -Typing text 'edited_env' into text field 'xpath=.//*[@id='id_name']' -Element Name: newname -fullFileName Resources/objrepo/common.ini -A: xpath -A: xpath -Element Name: newname -fullFileName Resources/objrepo/common.ini -A: xpath -A: xpath - - - - - - - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - - - -${element} - -Clicking element 'xpath=html/body/div[3]/div/form/div[3]/input'. -Element Name: save -fullFileName Resources/objrepo/common.ini -Element Name: save -fullFileName Resources/objrepo/common.ini - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - - - - - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - -Verifies that current page contains `text`. - -${element} - -Current page contains text 'edited_env'. - - - - - - - - - -Navigates to the page by given links sequence. - -Murano>Environments - -Clicking link 'Murano'. -Clicking link 'Environments'. - - - - - - - -This method allows to find element, which located near other element and returns xpath of this element. - -${env} -${action} - -Element Name: edited_env -fullFileName Resources/objrepo/common.ini -${xpath} = xpath=html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/a[2] - - - -Click element identified by `locator`. - -${xpath} - -Clicking element 'xpath=html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/a[2]'. - - - -Pauses the test executed for the given time. - -5 - -Slept 5 seconds - - - - - - - - - -This method allows to find element, which located near other element and returns xpath of this element. - -${env} -${action} - -Element Name: edited_env -fullFileName Resources/objrepo/common.ini -${xpath} = xpath=html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/ul/li[2]/button - - - -Click element identified by `locator`. - -${xpath} - -Clicking element 'xpath=html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/ul/li[2]/button'. - - - -Pauses the test executed for the given time. - -5 - -Slept 5 seconds - - - - - - - - - - - -Confirm deletion - -Clicking element 'xpath=.//*[@id='modal_wrapper']/div/div[3]/a[1]'. -Element Name: confirmdeletion -fullFileName Resources/objrepo/common.ini -A: xpath -A: xpath -Element Name: confirmdeletion -fullFileName Resources/objrepo/common.ini -A: xpath -A: xpath - - - - - - - - - -Simulates user reloading page. - - - - - -Verifies the current page does not contain `text`. - -${element} - -Current page does not contain text 'edited_env'. - - - - - - - -Closes all open browsers and resets the browser cache. - - - - - - -2 -commit - - - - - -Opens a new browser instance to given URL. - -${url} -remote_url=http://172.18.124.233:4444/wd/hub -browser=firefox -ff_profile_dir=ffprofile - -Opening browser 'firefox' to base url 'http://10.100.0.6/horizon' through remote server at 'http://172.18.124.233:4444/wd/hub' - - - - - - - - - -User Name -${user} - -Typing text 'WebTestUser' into text field 'xpath=html/body/div/div/div/form/div/fieldset/div/div/input' -Element Name: username -fullFileName Resources/objrepo/common.ini -Element Name: username -fullFileName Resources/objrepo/common.ini - - - - - -Password -${password} - -Typing password into text field 'xpath=html/body/div/div/div/form/div/fieldset/div[2]/div/input' -Element Name: password -fullFileName Resources/objrepo/common.ini -Element Name: password -fullFileName Resources/objrepo/common.ini - - - - - -Sign In - -Clicking element 'xpath=html/body/div/div/div/form/div[2]/button'. -Element Name: signin -fullFileName Resources/objrepo/common.ini -Element Name: signin -fullFileName Resources/objrepo/common.ini - - - -Navigates to the page by given links sequence. - -Murano>Environments - -Clicking link 'Murano'. -Clicking link 'Environments'. - - - - - - - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - - - -${element} - -Clicking element 'xpath=html/body/div/div[2]/div[3]/form/table/thead/tr/th/div/a'. -Element Name: createenvironment -fullFileName Resources/objrepo/common.ini -Element Name: createenvironment -fullFileName Resources/objrepo/common.ini - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - - - - - - - - - -${field} -${value} - -Typing text 'env2' into text field 'xpath=html/body/div[3]/div/form/div[2]/div/fieldset/table/tbody/tr/td/div/div/input' -Element Name: environmentname -fullFileName Resources/objrepo/common.ini -Element Name: environmentname -fullFileName Resources/objrepo/common.ini - - - - - - - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - - - -${element} - -Clicking element 'xpath=html/body/div[3]/div/form/div[3]/input'. -Element Name: create -fullFileName Resources/objrepo/common.ini -Element Name: create -fullFileName Resources/objrepo/common.ini - - - -Waits for 'complete' page state during predefined page load timeout. - - - - - - - - - - - -This method allows to find element, which located near other element and returns xpath of this element. - -${env} -${action} - -Element Name: env2 -fullFileName Resources/objrepo/common.ini -${xpath} = xpath=html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/a[2] - - - -Click element identified by `locator`. - -${xpath} - -Clicking element 'xpath=html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/a[2]'. - - - -Pauses the test executed for the given time. - -5 - -Slept 5 seconds - - - - - - - - - -This method allows to find element, which located near other element and returns xpath of this element. - -${env} -${action} - -Element Name: env2 -fullFileName Resources/objrepo/common.ini -${xpath} = xpath=html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/ul/li[2]/button - - - -Click element identified by `locator`. - -${xpath} - -Clicking element 'xpath=html/body/div/div[2]/div[3]/form/table/tbody/tr/td[4]/div/ul/li[2]/button'. - - - -Pauses the test executed for the given time. - -5 - -Slept 5 seconds - - - - - - - - - - - -Confirm deletion - -Clicking element 'xpath=.//*[@id='modal_wrapper']/div/div[3]/a[1]'. -Element Name: confirmdeletion -fullFileName Resources/objrepo/common.ini -A: xpath -A: xpath -Element Name: confirmdeletion -fullFileName Resources/objrepo/common.ini -A: xpath -A: xpath - - - - - - - - - -Simulates user reloading page. - - - - - -Verifies the current page does not contain `text`. - -${element} - -Current page does not contain text 'env2'. - - - - - -Closes all open browsers and resets the browser cache. - - - - - - -3 -commit - - - - - -Opens a new browser instance to given URL. - -${url} -remote_url=http://172.18.124.233:4444/wd/hub -browser=firefox -ff_profile_dir=ffprofile - -Opening browser 'firefox' to base url 'http://10.100.0.6/horizon' through remote server at 'http://172.18.124.233:4444/wd/hub' - - - - - - - - - -User Name -${user} - -Typing text 'WebTestUser' into text field 'xpath=html/body/div/div/div/form/div/fieldset/div/div/input' -Element Name: username -fullFileName Resources/objrepo/common.ini -Element Name: username -fullFileName Resources/objrepo/common.ini - - - - - -Password -${password} - -Typing password into text field 'xpath=html/body/div/div/div/form/div/fieldset/div[2]/div/input' - -Takes a screenshot of the current page and embeds it into the log. - - - - -Keyword 'Capture Page Screenshot' could not be run on failure: Execution terminated by signal -Element Name: password -fullFileName Resources/objrepo/common.ini -Element Name: password -fullFileName Resources/objrepo/common.ini - - - - - -Closes all open browsers and resets the browser cache. - - - -Keyword 'Capture Page Screenshot' could not be run on failure: Execution terminated by signal -Execution stopped by user. - -