├── .gitignore ├── .gitlab-ci.yml ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── NOTICE ├── README.md ├── setup.cfg ├── setup.py ├── vuportal ├── .browserslistrc ├── .editorconfig ├── .gitignore ├── .gitkeep ├── README.md ├── angular.json ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.json ├── karma.conf.js ├── package.json ├── src │ ├── app │ │ ├── app-routing.module.ts │ │ ├── app.component.html │ │ ├── app.component.scss │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── components │ │ │ ├── add-clone-test │ │ │ │ ├── add-clone-test.component.html │ │ │ │ ├── add-clone-test.component.scss │ │ │ │ ├── add-clone-test.component.spec.ts │ │ │ │ └── add-clone-test.component.ts │ │ │ ├── alert │ │ │ │ ├── alert.component.html │ │ │ │ ├── alert.component.scss │ │ │ │ ├── alert.component.spec.ts │ │ │ │ └── alert.component.ts │ │ │ ├── clone-test │ │ │ │ ├── clone-test.component.html │ │ │ │ ├── clone-test.component.scss │ │ │ │ ├── clone-test.component.spec.ts │ │ │ │ └── clone-test.component.ts │ │ │ ├── delete-test │ │ │ │ ├── delete-test.component.html │ │ │ │ ├── delete-test.component.scss │ │ │ │ ├── delete-test.component.spec.ts │ │ │ │ └── delete-test.component.ts │ │ │ ├── footer │ │ │ │ ├── footer.component.html │ │ │ │ ├── footer.component.scss │ │ │ │ └── footer.component.ts │ │ │ ├── home │ │ │ │ ├── home.component.html │ │ │ │ ├── home.component.scss │ │ │ │ ├── home.component.spec.ts │ │ │ │ └── home.component.ts │ │ │ ├── management │ │ │ │ ├── management.component.html │ │ │ │ ├── management.component.scss │ │ │ │ ├── management.component.spec.ts │ │ │ │ └── management.component.ts │ │ │ ├── navigation │ │ │ │ ├── navigation.component.html │ │ │ │ ├── navigation.component.scss │ │ │ │ ├── navigation.component.spec.ts │ │ │ │ └── navigation.component.ts │ │ │ ├── start-test │ │ │ │ ├── start-test.component.html │ │ │ │ ├── start-test.component.scss │ │ │ │ ├── start-test.component.spec.ts │ │ │ │ └── start-test.component.ts │ │ │ ├── stop-test │ │ │ │ ├── stop-test.component.html │ │ │ │ ├── stop-test.component.scss │ │ │ │ ├── stop-test.component.spec.ts │ │ │ │ └── stop-test.component.ts │ │ │ └── view-report │ │ │ │ ├── view-report.component.html │ │ │ │ ├── view-report.component.scss │ │ │ │ ├── view-report.component.spec.ts │ │ │ │ └── view-report.component.ts │ │ ├── model │ │ │ └── test.ts │ │ └── services │ │ │ └── test-api.service.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ ├── environment.stage.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.scss │ └── test.ts ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.spec.json └── tslint.json ├── vuserver ├── .coveragerc ├── .dockerignore ├── .env │ ├── local │ └── staging ├── .flake8 ├── Dockerfile ├── Dockerfile-server ├── Dockerfile-test ├── __init__.py ├── apitests │ ├── .coveragerc │ ├── all.html │ ├── assets │ │ └── style.css │ ├── conftest.py │ ├── coverage.sh │ ├── getcoverage.sh │ ├── integration │ │ ├── OK.txt │ │ ├── includes.yaml │ │ ├── log_spec.yaml │ │ ├── test_01_init_gets.tavern.yaml │ │ ├── test_02_parallel_event.tavern.yaml │ │ ├── test_03_config_search.tavern.yaml │ │ ├── test_04_parallel_view.tavern.yaml │ │ ├── test_05_parallel_view.tavern.yaml │ │ ├── test_06_script_view.tavern.yaml │ │ ├── test_07_parallel_stat.tavern.yaml │ │ ├── test_08_parallel_capture.tavern.yaml │ │ ├── test_09_parallel_auto_capture.tavern.yaml │ │ ├── testfile.txt │ │ └── utils.py │ ├── logging.yaml │ ├── server.py │ └── updateservice.sh ├── assets │ └── style.css ├── build_vuserver.sh ├── container_pool │ ├── __init__.py │ ├── _trial_temp │ │ └── _trial_marker │ ├── admin.py │ ├── apps.py │ ├── deploy.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── serializers.py │ ├── urls.py │ └── views.py ├── decc │ ├── vuserver-app.yml │ └── vuserver-redis.yml ├── docker-compose-staging.yaml ├── docker-compose-test.yaml ├── log │ └── README.md ├── manage.py ├── parallel │ ├── __init__.py │ ├── admin.py │ ├── capture.py │ ├── consumers.py │ ├── event.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_auto_20220412_0214.py │ │ ├── 0003_auto_20220412_0224.py │ │ ├── 0004_auto_20220412_0937.py │ │ ├── 0005_auto_20220616_1122.py │ │ └── __init__.py │ ├── models.py │ ├── serializers.py │ ├── stat.py │ ├── template.yml │ ├── urls.py │ └── views.py ├── pylintrc ├── pytest.ini ├── requirements-test.txt ├── requirements.txt ├── script │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── nodejs │ │ └── vtaas-v2default │ │ │ ├── README.md │ │ │ ├── actions │ │ │ └── readme.md │ │ │ ├── common │ │ │ └── index.js │ │ │ ├── config.json │ │ │ ├── install.sh │ │ │ ├── package.json │ │ │ ├── run.bat │ │ │ ├── run.sh │ │ │ ├── screenshots │ │ │ └── readme.md │ │ │ ├── script │ │ │ └── utils.js │ │ │ ├── template.spec.js │ │ │ └── uploadfiles │ │ │ └── readme.md │ ├── serializers.py │ ├── urls.py │ └── views.py ├── start_local.sh ├── static │ ├── css │ │ ├── style.css │ │ └── video-js.css │ ├── favicon.ico │ └── js │ │ ├── channels │ │ ├── reconnecting-websocket.js │ │ └── websocketbridge.js │ │ ├── jquery-1.12.2.min.js │ │ └── video.min.js ├── templates │ ├── 404.html │ ├── 500.html │ ├── autocap.html │ ├── base.html │ ├── browserprompt.html │ ├── capture.html │ ├── captures.html │ ├── live.html │ ├── registration │ │ └── login.html │ ├── replay.html │ ├── testcase.html │ ├── testcase2.html │ ├── testcases.html │ ├── video.html │ └── xy.html └── vuserver │ ├── __init__.py │ ├── asgi.py │ ├── routing.py │ ├── settings │ ├── __init__.py │ ├── base.py │ ├── decc.py │ ├── local.py │ ├── staging.py │ └── test.py │ ├── urls.py │ └── wsgi.py └── workers └── parallel ├── .bash_profile ├── .dockerignore ├── .gitattributes ├── .gitignore ├── Dockerfile ├── build_image.sh └── src ├── common ├── install │ ├── no_vnc.sh │ └── set_user_permission.sh ├── scripts │ ├── chrome-init.sh │ ├── firefox-init.sh │ ├── generate_container_user │ └── vnc_startup.sh └── xfce │ ├── .config │ ├── bg_sakuli.png │ └── xfce4 │ │ └── xfconf │ │ └── xfce-perchannel-xml │ │ ├── xfce4-desktop.xml │ │ ├── xfce4-keyboard-shortcuts.xml │ │ ├── xfce4-panel.xml │ │ ├── xfwm4.xml │ │ └── xsettings.xml │ ├── Desktop │ ├── chromium-browser.desktop │ └── firefox.desktop │ └── wm_startup.sh ├── crt └── vtaas.pem ├── ext ├── _locales │ └── en │ │ └── messages.json ├── a.m4a ├── config │ └── default.json ├── css │ └── style.css ├── icons │ ├── icon128.png │ ├── icon16.png │ ├── icon19.png │ └── icon48.png ├── init.html ├── js │ ├── axios │ │ ├── axios.js │ │ └── axios.map │ ├── bootstrap │ │ ├── css │ │ │ ├── bootstrap-grid.css │ │ │ ├── bootstrap-grid.css.map │ │ │ ├── bootstrap-grid.min.css │ │ │ ├── bootstrap-grid.min.css.map │ │ │ ├── bootstrap-reboot.css │ │ │ ├── bootstrap-reboot.css.map │ │ │ ├── bootstrap-reboot.min.css │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ └── js │ │ │ ├── bootstrap.bundle.js │ │ │ ├── bootstrap.bundle.js.map │ │ │ ├── bootstrap.bundle.min.js │ │ │ ├── bootstrap.bundle.min.js.map │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.js.map │ │ │ ├── bootstrap.min.js │ │ │ └── bootstrap.min.js.map │ ├── channels │ │ ├── reconnecting-websocket.js │ │ └── websocketbridge.js │ ├── jquery-editable-select │ │ ├── jquery-editable-select.css │ │ └── jquery-editable-select.js │ ├── jquery-ui │ │ ├── AUTHORS.txt │ │ ├── LICENSE.txt │ │ ├── external │ │ │ └── jquery │ │ │ │ └── jquery.js │ │ ├── images │ │ │ ├── ui-icons_444444_256x240.png │ │ │ ├── ui-icons_555555_256x240.png │ │ │ ├── ui-icons_777620_256x240.png │ │ │ ├── ui-icons_777777_256x240.png │ │ │ ├── ui-icons_cc0000_256x240.png │ │ │ └── ui-icons_ffffff_256x240.png │ │ ├── index.html │ │ ├── jquery-ui.css │ │ ├── jquery-ui.js │ │ ├── jquery-ui.min.css │ │ ├── jquery-ui.min.js │ │ ├── jquery-ui.structure.css │ │ ├── jquery-ui.structure.min.css │ │ ├── jquery-ui.theme.css │ │ ├── jquery-ui.theme.min.css │ │ └── package.json │ ├── jquery │ │ ├── .gitignore │ │ ├── README.md │ │ ├── bower.json │ │ ├── component.json │ │ ├── composer.json │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ └── package.json │ ├── jquery3 │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ └── jquery.min.map │ ├── jsgrid │ │ ├── jsgrid-theme.css │ │ ├── jsgrid.css │ │ └── jsgrid.js │ └── urijs │ │ ├── URI.js │ │ └── URI.min.js ├── manifest.json └── src │ ├── bg │ └── background.js │ ├── control.html │ ├── control.js │ ├── cs │ ├── assertion │ │ ├── index.html │ │ ├── main.js │ │ └── style.css │ ├── configuration │ │ ├── index.html │ │ ├── main.js │ │ └── style.css │ ├── content-message.js │ ├── content-slave.js │ ├── content-utils.js │ ├── control-panel │ │ ├── image.js │ │ ├── index.html │ │ ├── main.js │ │ └── style.css │ ├── css │ │ └── style.css │ ├── element-select │ │ ├── path-index.html │ │ ├── path-main.js │ │ └── path-style.css │ ├── execution │ │ ├── index.html │ │ ├── main.js │ │ └── style.css │ ├── notification │ │ ├── index.html │ │ ├── main.js │ │ └── style.css │ ├── panel.js │ ├── replay-progress │ │ ├── index.html │ │ ├── main.js │ │ └── style.css │ ├── screenshot │ │ ├── index.html │ │ ├── main.js │ │ └── style.css │ └── text-resource │ │ ├── index.html │ │ ├── main.js │ │ └── style.css │ ├── product │ ├── airwatchconsole.js │ ├── default.js │ └── vrops.js │ ├── recorder.js │ └── share │ ├── common.js │ └── message.js └── ubuntu ├── .vnc └── xstartup ├── icewm ├── .icewm │ ├── menu │ ├── preferences │ ├── theme │ └── toolbar └── wm_startup.sh └── install ├── chrome.orig.sh ├── chrome.sh ├── conda.sh ├── firefox.sh ├── icewm_ui.sh ├── libnss_wrapper.sh ├── tigervnc.sh ├── tools.sh └── xfce_ui.sh /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.rdb 3 | *.sqlite3 4 | *.db 5 | *.DS_store 6 | .tox/ 7 | *.egg-info/ 8 | .eggs/ 9 | *.log 10 | .idea/ 11 | .pytest_cache 12 | node_modules/ 13 | init-env.sh -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | variables: 2 | NOSE_REDNOSE_COLOR: force 3 | GIT_DEPTH: 50 4 | GIT_STRATEGY: fetch 5 | APITESTS: "$CI_PROJECT_DIR/apitests" 6 | VUSEVER: "$CI_PROJECT_DIR/vuserver" 7 | VENV: "$CI_PROJECT_DIR/virtualenv" 8 | COVERAGE: "$CI_PROJECT_DIR/bin/coverage" 9 | ARTIFACTS: "$CI_PROJECT_DIR/artifacts" 10 | 11 | stages: 12 | - lint 13 | - flake 14 | - test 15 | - deploy 16 | 17 | .constants: 18 | - &limit_resources "/usr/bin/sudo /usr/local/bin/limit-gitlab-job-resources" 19 | 20 | before_script: 21 | - "echo Before Script:" 22 | 23 | 24 | django:lint: 25 | stage: lint 26 | # image: python/3.7.13-slim-bullseye 27 | # image: python:3.7.13-slim-bullseye 28 | tags: 29 | - cherry 30 | # only: 31 | # - master 32 | except: 33 | - master 34 | script: 35 | - pip install pylint 36 | - cd $CI_PROJECT_DIR 37 | - pylint $VUSEVER 38 | allow_failure: true 39 | 40 | 41 | django:flake8: 42 | stage: flake 43 | tags: 44 | - cherry 45 | # only: 46 | # - master 47 | except: 48 | - master 49 | script: 50 | # - figlet "Python FLAKE8" 51 | - pip install flake8 52 | - cd $CI_PROJECT_DIR 53 | - flake8 $VUSEVER 54 | allow_failure: true 55 | 56 | django:test: 57 | stage: test 58 | only: 59 | - master 60 | script: 61 | - cd $APITESTS 62 | - chmod +x coverage.sh 63 | - chmod +x getcoverage.sh 64 | # - figlet "Python PYTEST" 65 | # - *install_virtualenv 66 | - cd $CI_PROJECT_DIR/ 67 | - ./apitests/coverage.sh 68 | allow_failure: true 69 | artifacts: 70 | paths: 71 | - $CI_PROJECT_DIR/htmlcov.tar 72 | 73 | 74 | deploy_script: 75 | stage: deploy 76 | only: 77 | - master 78 | script: 79 | - figlet "Deploy Script" 80 | - cd $APITESTS 81 | - pwd 82 | - sshpass -p "passwd" ssh -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@host 'bash -s' < ./updateservice.sh 83 | when: manual 84 | 85 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to test-automation-for-web-applications 2 | 3 | The test-automation-for-web-applications project team welcomes contributions from the community. If you wish to contribute code and you have not signed our [contributor license agreement](https://cla.vmware.com/cla/1/preview), our bot will update the issue when you open a Pull Request. For any questions about the CLA process, please refer to our [FAQ](https://cla.vmware.com/faq). 4 | 5 | ## Contribution Flow 6 | 7 | This is a rough outline of what a contributor's workflow looks like: 8 | 9 | - Create a topic branch from where you want to base your work 10 | - Make commits of logical units 11 | - Make sure your commit messages are in the proper format (see below) 12 | - Push your changes to a topic branch in your fork of the repository 13 | - Submit a pull request 14 | 15 | Example: 16 | 17 | ``` shell 18 | git remote add upstream https://github.com/vmware/test-automation-for-web-applications.git 19 | git checkout -b my-new-feature main 20 | git commit -a 21 | git push origin my-new-feature 22 | ``` 23 | 24 | ### Staying In Sync With Upstream 25 | 26 | When your branch gets out of sync with the vmware/main branch, use the following to update: 27 | 28 | ``` shell 29 | git checkout my-new-feature 30 | git fetch -a 31 | git pull --rebase upstream main 32 | git push --force-with-lease origin my-new-feature 33 | ``` 34 | 35 | ### Updating pull requests 36 | 37 | If your PR fails to pass CI or needs changes based on code review, you'll most likely want to squash these changes into 38 | existing commits. 39 | 40 | If your pull request contains a single commit or your changes are related to the most recent commit, you can simply 41 | amend the commit. 42 | 43 | ``` shell 44 | git add . 45 | git commit --amend 46 | git push --force-with-lease origin my-new-feature 47 | ``` 48 | 49 | If you need to squash changes into an earlier commit, you can use: 50 | 51 | ``` shell 52 | git add . 53 | git commit --fixup 54 | git rebase -i --autosquash main 55 | git push --force-with-lease origin my-new-feature 56 | ``` 57 | 58 | Be sure to add a comment to the PR indicating your new changes are ready to review, as GitHub does not generate a 59 | notification when you git push. 60 | 61 | ### Code Style 62 | 63 | ### Formatting Commit Messages 64 | 65 | We follow the conventions on [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/). 66 | 67 | Be sure to include any related GitHub issue references in the commit message. See 68 | [GFM syntax](https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown) for referencing issues 69 | and commits. 70 | 71 | ## Reporting Bugs and Creating Issues 72 | 73 | When opening a new issue, try to roughly follow the commit message format conventions above. 74 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2022 VMware, Inc. 2 | 3 | This product is licensed to you under the Apache License, V2.0 (the "License"). You may not use this product except in compliance with the License. 4 | 5 | This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file. -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/setup.cfg -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # /usr/bin/env python 2 | from setuptools import setup, find_packages 3 | from pkg_resources import parse_requirements 4 | 5 | import openvus 6 | 7 | 8 | def get_requirements(source): 9 | with open(source) as f: 10 | return sorted({str(req) for req in parse_requirements(f.read())}) 11 | 12 | 13 | setup( 14 | name="tawa", 15 | version=openvus.__version__, 16 | description="Next generation tool for automated testing of web applications.", 17 | author="VMware vTaaS", 18 | author_email="etcp-dev@vmware.com", 19 | url="https://github.com/", 20 | packages=['tawa'], 21 | include_package_data=True, 22 | zip_safe=False, 23 | classifiers=['Development Status :: 5 - Production/Stable', 24 | 'Environment :: Web Environment', 25 | 'Framework :: Django', 26 | 'Intended Audience :: Developers', 27 | 'License :: OSI Approved :: BSD License', 28 | 'Operating System :: OS Independent', 29 | 'Programming Language :: Python', 30 | 'Programming Language :: Python :: 3', 31 | 'Programming Language :: Python :: 3.4', 32 | 'Programming Language :: Python :: 3.5', 33 | 'Programming Language :: Python :: 3.6', 34 | 'Topic :: Utilities'], 35 | install_requires=get_requirements('requirements.txt'), 36 | ) -------------------------------------------------------------------------------- /vuportal/.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | last 1 Chrome version 12 | last 1 Firefox version 13 | last 2 Edge major versions 14 | last 2 Safari major versions 15 | last 2 iOS major versions 16 | Firefox ESR 17 | not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. 18 | -------------------------------------------------------------------------------- /vuportal/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /vuportal/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | speed-measure-plugin*.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.sass-cache 36 | /connect.lock 37 | /coverage 38 | /libpeerconnection.log 39 | npm-debug.log 40 | yarn-error.log 41 | testem.log 42 | /typings 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | -------------------------------------------------------------------------------- /vuportal/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuportal/.gitkeep -------------------------------------------------------------------------------- /vuportal/README.md: -------------------------------------------------------------------------------- 1 | # Vuportal 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.2. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. 28 | -------------------------------------------------------------------------------- /vuportal/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Protractor configuration file, see link for more information 3 | // https://github.com/angular/protractor/blob/master/lib/config.ts 4 | 5 | const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter'); 6 | 7 | /** 8 | * @type { import("protractor").Config } 9 | */ 10 | exports.config = { 11 | allScriptsTimeout: 11000, 12 | specs: [ 13 | './src/**/*.e2e-spec.ts' 14 | ], 15 | capabilities: { 16 | browserName: 'chrome' 17 | }, 18 | directConnect: true, 19 | SELENIUM_PROMISE_MANAGER: false, 20 | baseUrl: 'http://localhost:4200/', 21 | framework: 'jasmine', 22 | jasmineNodeOpts: { 23 | showColors: true, 24 | defaultTimeoutInterval: 30000, 25 | print: function() {} 26 | }, 27 | onPrepare() { 28 | require('ts-node').register({ 29 | project: require('path').join(__dirname, './tsconfig.json') 30 | }); 31 | jasmine.getEnv().addReporter(new SpecReporter({ 32 | spec: { 33 | displayStacktrace: StacktraceOption.PRETTY 34 | } 35 | })); 36 | } 37 | }; -------------------------------------------------------------------------------- /vuportal/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { browser, logging } from 'protractor'; 2 | import { AppPage } from './app.po'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', async () => { 12 | await page.navigateTo(); 13 | expect(await page.getTitleText()).toEqual('vuportal app is running!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | } as logging.Entry)); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /vuportal/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | async navigateTo(): Promise { 5 | return browser.get(browser.baseUrl); 6 | } 7 | 8 | async getTitleText(): Promise { 9 | return element(by.css('vuportal-root .content span')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /vuportal/e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "../tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "../out-tsc/e2e", 6 | "module": "commonjs", 7 | "target": "es2018", 8 | "types": [ 9 | "jasmine", 10 | "node" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /vuportal/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | jasmine: { 17 | // you can add configuration options for Jasmine here 18 | // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html 19 | // for example, you can disable the random execution with `random: false` 20 | // or set a specific seed with `seed: 4321` 21 | }, 22 | clearContext: false // leave Jasmine Spec Runner output visible in browser 23 | }, 24 | jasmineHtmlReporter: { 25 | suppressAll: true // removes the duplicated traces 26 | }, 27 | coverageReporter: { 28 | dir: require('path').join(__dirname, './coverage/vuportal'), 29 | subdir: '.', 30 | reporters: [ 31 | { type: 'html' }, 32 | { type: 'text-summary' } 33 | ] 34 | }, 35 | reporters: ['progress', 'kjhtml'], 36 | port: 9876, 37 | colors: true, 38 | logLevel: config.LOG_INFO, 39 | autoWatch: true, 40 | browsers: ['Chrome'], 41 | singleRun: false, 42 | restartOnFileChange: true 43 | }); 44 | }; 45 | -------------------------------------------------------------------------------- /vuportal/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vuportal", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "bundle:stage": "ng build --configuration=stage", 9 | "bundle:prod": "ng build --configuration=production", 10 | "test": "ng test", 11 | "lint": "ng lint", 12 | "e2e": "ng e2e" 13 | }, 14 | "private": true, 15 | "dependencies": { 16 | "@angular/animations": "~11.2.3", 17 | "@angular/common": "~11.2.3", 18 | "@angular/compiler": "~11.2.3", 19 | "@angular/core": "~11.2.3", 20 | "@angular/forms": "~11.2.3", 21 | "@angular/platform-browser": "~11.2.3", 22 | "@angular/platform-browser-dynamic": "~11.2.3", 23 | "@angular/router": "~11.2.3", 24 | "@clr/angular": "5.5.2", 25 | "rxjs": "~6.6.0", 26 | "tslib": "^2.0.0", 27 | "zone.js": "~0.11.3", 28 | "@clr/ui": "5.5.2", 29 | "@cds/core": "^5.0.0" 30 | }, 31 | "devDependencies": { 32 | "@angular-devkit/build-angular": "~0.1102.2", 33 | "@angular/cli": "~11.2.2", 34 | "@angular/compiler-cli": "~11.2.3", 35 | "@types/jasmine": "~3.6.0", 36 | "@types/node": "^12.11.1", 37 | "@types/resize-observer-browser": "^0.1.6", 38 | "codelyzer": "^6.0.0", 39 | "jasmine-core": "~3.6.0", 40 | "jasmine-spec-reporter": "~5.0.0", 41 | "karma": "~6.3.16", 42 | "karma-chrome-launcher": "~3.1.0", 43 | "karma-coverage": "~2.0.3", 44 | "karma-jasmine": "~4.0.0", 45 | "karma-jasmine-html-reporter": "^1.5.0", 46 | "protractor": "~7.0.0", 47 | "ts-node": "~8.3.0", 48 | "tslint": "~6.1.0", 49 | "typescript": "~4.1.2" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /vuportal/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { NgModule } from '@angular/core'; 5 | import { RouterModule, Routes } from '@angular/router'; 6 | import { HomeComponent } from './components/home/home.component'; 7 | import { ManagementComponent } from './components/management/management.component'; 8 | 9 | const routes: Routes = [ 10 | 11 | {path: 'home', component: HomeComponent}, 12 | {path: 'recording', component: ManagementComponent}, 13 | {path: '', redirectTo: 'home', pathMatch: 'full'}, 14 | { path: '**', redirectTo: 'home' } 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forRoot(routes)], 19 | exports: [RouterModule] 20 | }) 21 | export class AppRoutingModule { } 22 | -------------------------------------------------------------------------------- /vuportal/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 14 | 15 |
16 | 17 | 21 | 22 | Log out 23 | 24 | 25 |
26 |
27 | 28 | 29 |
30 | 31 |
32 | 33 |
34 |
35 | 36 | 37 | 38 |
-------------------------------------------------------------------------------- /vuportal/src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | .header { 2 | background-color: #002538; 3 | z-index: 501; 4 | } -------------------------------------------------------------------------------- /vuportal/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { Component, OnInit } from '@angular/core'; 5 | import { environment } from 'src/environments/environment'; 6 | 7 | @Component({ 8 | selector: 'vuportal-root', 9 | templateUrl: './app.component.html', 10 | styleUrls: ['./app.component.scss'] 11 | }) 12 | export class AppComponent implements OnInit { 13 | title = 'vuportal'; 14 | public userName: string = null; 15 | ngOnInit(): void { 16 | this.userName = localStorage.getItem("user"); 17 | if(this.userName === null || this.userName === ""){ 18 | localStorage.setItem("user", environment.defaultUser); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /vuportal/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { NgModule } from '@angular/core'; 5 | import { BrowserModule } from '@angular/platform-browser'; 6 | import { AppRoutingModule } from './app-routing.module'; 7 | import { AppComponent } from './app.component'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 10 | import { ManagementComponent } from './components/management/management.component'; 11 | import { NavigationComponent } from './components/navigation/navigation.component'; 12 | import { FooterComponent } from './components/footer/footer.component'; 13 | import { HomeComponent } from './components/home/home.component'; 14 | import { TestAPIService } from './services/test-api.service'; 15 | import { HttpClientModule } from '@angular/common/http'; 16 | import { AddTestComponent } from './components/add-clone-test/add-clone-test.component'; 17 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; 18 | import { AlertComponent } from './components/alert/alert.component'; 19 | import { DeleteTestComponent } from './components/delete-test/delete-test.component'; 20 | import { StartTestComponent } from './components/start-test/start-test.component'; 21 | import { StopTestComponent } from './components/stop-test/stop-test.component'; 22 | import { CloneTestComponent } from './components/clone-test/clone-test.component'; 23 | import { ViewReportComponent } from './components/view-report/view-report.component'; 24 | 25 | @NgModule({ 26 | declarations: [ 27 | AppComponent, 28 | ManagementComponent, 29 | FooterComponent, 30 | HomeComponent, 31 | NavigationComponent, 32 | AddTestComponent, 33 | AlertComponent, 34 | DeleteTestComponent, 35 | StartTestComponent, 36 | StopTestComponent, 37 | CloneTestComponent, 38 | ViewReportComponent 39 | ], 40 | imports: [ 41 | BrowserModule, 42 | AppRoutingModule, 43 | FormsModule, 44 | ReactiveFormsModule, 45 | ClarityModule, 46 | BrowserAnimationsModule, 47 | HttpClientModule 48 | ], 49 | providers: [TestAPIService], 50 | bootstrap: [AppComponent] 51 | }) 52 | export class AppModule { } 53 | -------------------------------------------------------------------------------- /vuportal/src/app/components/add-clone-test/add-clone-test.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuportal/src/app/components/add-clone-test/add-clone-test.component.scss -------------------------------------------------------------------------------- /vuportal/src/app/components/add-clone-test/add-clone-test.component.spec.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 5 | 6 | import { AddTestComponent } from './add-clone-test.component'; 7 | 8 | describe('AddTestComponent', () => { 9 | let component: AddTestComponent; 10 | let fixture: ComponentFixture; 11 | 12 | beforeEach(async () => { 13 | await TestBed.configureTestingModule({ 14 | declarations: [ AddTestComponent ] 15 | }) 16 | .compileComponents(); 17 | }); 18 | 19 | beforeEach(() => { 20 | fixture = TestBed.createComponent(AddTestComponent); 21 | component = fixture.componentInstance; 22 | fixture.detectChanges(); 23 | }); 24 | 25 | it('should create', () => { 26 | expect(component).toBeTruthy(); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /vuportal/src/app/components/alert/alert.component.html: -------------------------------------------------------------------------------- 1 | 5 | 6 |
7 |
8 | 16 |
17 | 20 |
21 | 22 |
23 |
24 | 32 |
33 | 36 |
37 | 38 |
39 |
40 | 48 |
49 | 52 |
53 | 54 |
55 |
56 | 64 |
65 | 68 |
69 | -------------------------------------------------------------------------------- /vuportal/src/app/components/alert/alert.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuportal/src/app/components/alert/alert.component.scss -------------------------------------------------------------------------------- /vuportal/src/app/components/alert/alert.component.spec.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 5 | 6 | import { AlertComponent } from './alert.component'; 7 | 8 | describe('AlertComponent', () => { 9 | let component: AlertComponent; 10 | let fixture: ComponentFixture; 11 | 12 | beforeEach(async () => { 13 | await TestBed.configureTestingModule({ 14 | declarations: [ AlertComponent ] 15 | }) 16 | .compileComponents(); 17 | }); 18 | 19 | beforeEach(() => { 20 | fixture = TestBed.createComponent(AlertComponent); 21 | component = fixture.componentInstance; 22 | fixture.detectChanges(); 23 | }); 24 | 25 | it('should create', () => { 26 | expect(component).toBeTruthy(); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /vuportal/src/app/components/alert/alert.component.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { Component, OnInit } from '@angular/core'; 5 | 6 | @Component({ 7 | selector: 'vuportal-alert', 8 | templateUrl: './alert.component.html', 9 | styleUrls: ['./alert.component.scss'] 10 | }) 11 | export class AlertComponent implements OnInit { 12 | 13 | alertMessage; 14 | isDanger = false; 15 | isWarning = false; 16 | isInfo = false; 17 | isSuccess = false; 18 | 19 | constructor() { } 20 | 21 | /** 22 | * nitalize component and print some logs 23 | * @method ngOnInit 24 | * @public 25 | */ 26 | ngOnInit() { 27 | console.log("init alter component!") 28 | // this.resetActionStatus(); 29 | } 30 | 31 | /** 32 | * Set alert level 33 | * @method alertActions 34 | * @param message 35 | * @param alterActions 36 | * @public 37 | */ 38 | public alertActions(message: string, alterActions: string) { 39 | this.alertMessage = message; 40 | if (alterActions.indexOf("success") >= 0) { 41 | console.log( "alter component success!") 42 | this.resetActionStatus(); 43 | this.isSuccess = true; 44 | } else if (alterActions.indexOf("info") >= 0) { 45 | this.resetActionStatus(); 46 | this.isInfo = true; 47 | } else if (alterActions.indexOf("danger") >= 0) { 48 | this.resetActionStatus(); 49 | this.isDanger = true; 50 | } else if (alterActions.indexOf("warning") >= 0) { 51 | this.resetActionStatus(); 52 | this.isWarning = true; 53 | } else { 54 | console.log("Please make sure the alertAction belong to (danger , warning, success, info)"); 55 | this.resetActionStatus(); 56 | } 57 | } 58 | 59 | /** 60 | * reset action status 61 | * @method resetActionStatus 62 | * @public 63 | */ 64 | resetActionStatus() { 65 | this.isSuccess = false; 66 | this.isDanger = false; 67 | this.isInfo = false; 68 | this.isWarning = false; 69 | } 70 | 71 | 72 | } 73 | -------------------------------------------------------------------------------- /vuportal/src/app/components/clone-test/clone-test.component.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 35 | -------------------------------------------------------------------------------- /vuportal/src/app/components/clone-test/clone-test.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuportal/src/app/components/clone-test/clone-test.component.scss -------------------------------------------------------------------------------- /vuportal/src/app/components/clone-test/clone-test.component.spec.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 5 | 6 | import { CloneTestComponent } from './clone-test.component'; 7 | 8 | describe('CloneTestComponent', () => { 9 | let component: CloneTestComponent; 10 | let fixture: ComponentFixture; 11 | 12 | beforeEach(async () => { 13 | await TestBed.configureTestingModule({ 14 | declarations: [ CloneTestComponent ] 15 | }) 16 | .compileComponents(); 17 | }); 18 | 19 | beforeEach(() => { 20 | fixture = TestBed.createComponent(CloneTestComponent); 21 | component = fixture.componentInstance; 22 | fixture.detectChanges(); 23 | }); 24 | 25 | it('should create', () => { 26 | expect(component).toBeTruthy(); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /vuportal/src/app/components/delete-test/delete-test.component.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 16 | 17 | 23 | -------------------------------------------------------------------------------- /vuportal/src/app/components/delete-test/delete-test.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuportal/src/app/components/delete-test/delete-test.component.scss -------------------------------------------------------------------------------- /vuportal/src/app/components/delete-test/delete-test.component.spec.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 5 | 6 | import { DeleteTestComponent } from './delete-test.component'; 7 | 8 | describe('DeleteTestComponent', () => { 9 | let component: DeleteTestComponent; 10 | let fixture: ComponentFixture; 11 | 12 | beforeEach(async () => { 13 | await TestBed.configureTestingModule({ 14 | declarations: [ DeleteTestComponent ] 15 | }) 16 | .compileComponents(); 17 | }); 18 | 19 | beforeEach(() => { 20 | fixture = TestBed.createComponent(DeleteTestComponent); 21 | component = fixture.componentInstance; 22 | fixture.detectChanges(); 23 | }); 24 | 25 | it('should create', () => { 26 | expect(component).toBeTruthy(); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /vuportal/src/app/components/delete-test/delete-test.component.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { Component, EventEmitter, OnInit, Output } from '@angular/core'; 5 | import { Test } from 'src/app/model/test'; 6 | import { TestAPIService } from 'src/app/services/test-api.service'; 7 | 8 | @Component({ 9 | selector: 'vuportal-delete-test', 10 | templateUrl: './delete-test.component.html', 11 | styleUrls: ['./delete-test.component.scss'] 12 | }) 13 | export class DeleteTestComponent implements OnInit { 14 | @Output() delete_test_conditioned = new EventEmitter(); 15 | isDeleteTest = false; 16 | test: Test = { 17 | id: 0, 18 | name: '', 19 | apptype: '', 20 | softdeleted: false, 21 | uuid: '', 22 | product: '', 23 | browser: '', 24 | status: '', 25 | build: '', 26 | resolution: '', 27 | locales: '', 28 | leader_locale: '', 29 | start_url: '', 30 | add_host: '', 31 | glossary: '', 32 | run_id: 0, 33 | user: '', 34 | pool: '', 35 | max_event_retry: 0, 36 | accessibility_data: '', 37 | createtime: '', 38 | lastruntime: '', 39 | access_urllist: '' 40 | }; 41 | constructor(private testAPIService: TestAPIService) { } 42 | 43 | ngOnInit(): void { 44 | } 45 | 46 | transforInfo(obj) { 47 | this.test = obj.test; 48 | console.log("delete test uuid ", this.test) 49 | this.isDeleteTest = true; 50 | } 51 | 52 | cancel(){ 53 | this.reset(); 54 | } 55 | 56 | delete(){ 57 | this.isDeleteTest = false; 58 | this.testAPIService.deleteTest(this.test.uuid) 59 | .subscribe( 60 | (data) => { 61 | console.log("delete - data", data); 62 | let isSuccess = data["message"]; 63 | let emitObj = { 64 | } 65 | if(isSuccess == "success"){ 66 | emitObj = { 67 | isSuccess: true, 68 | result: this.test 69 | } 70 | } else { 71 | emitObj = { 72 | isSuccess: false, 73 | result: null 74 | } 75 | } 76 | this.reset(); 77 | this.delete_test_conditioned.emit(emitObj); 78 | }, 79 | (error) => { 80 | console.log("Failed to delete test", error); 81 | this.reset(); 82 | } 83 | ) 84 | } 85 | 86 | reset(){ 87 | this.isDeleteTest = false; 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /vuportal/src/app/components/footer/footer.component.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | -------------------------------------------------------------------------------- /vuportal/src/app/components/footer/footer.component.scss: -------------------------------------------------------------------------------- 1 | .footer { 2 | background-color: #002538; 3 | z-index: 501; 4 | } 5 | 6 | .vm-border { 7 | background: #aadb1e; 8 | background: -moz-linear-gradient(left,#aadb1e 0,#006a91 100%); 9 | background: -webkit-gradient(linear,left top,right top,color-stop(0,#aadb1e),color-stop(100%,#006a91)); 10 | background: -webkit-linear-gradient(left,#aadb1e 0,#006a91 100%); 11 | background: -o-linear-gradient(left,#aadb1e 0,#006a91 100%); 12 | background: -ms-linear-gradient(left,#aadb1e 0,#006a91 100%); 13 | background: linear-gradient(to right,#aadb1e 0,#006a91 100%); 14 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#aadb1e',endColorstr='#006a91',GradientType=1); 15 | width: 100%; 16 | height: 6px; 17 | float: left; 18 | } 19 | 20 | .footer img { 21 | margin: 10px 30px 10px 60px; 22 | } 23 | 24 | .footer table { 25 | width: 100%; 26 | } 27 | 28 | .footer table .feedback { 29 | padding-right: 30px; 30 | } 31 | 32 | .feedback-trigger { 33 | cursor: pointer; 34 | color: #ffffff; 35 | } 36 | .feedback-trigger:hover { 37 | text-decoration: underline!important; 38 | } -------------------------------------------------------------------------------- /vuportal/src/app/components/footer/footer.component.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { Component, OnInit } from '@angular/core'; 5 | 6 | @Component({ 7 | selector: 'vuportal-footer', 8 | templateUrl: './footer.component.html', 9 | styleUrls: ['./footer.component.scss'] 10 | }) 11 | export class FooterComponent implements OnInit { 12 | 13 | constructor() { } 14 | 15 | ngOnInit(): void { 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /vuportal/src/app/components/home/home.component.html: -------------------------------------------------------------------------------- 1 | 5 | 6 |
7 |
8 | 9 |
10 |
11 |
12 | 13 | 14 | 17 | 21 | 22 |
15 | 16 | 18 | Recording 20 |
23 | 24 |
25 |
26 |
    27 | TAWA recording service enables users: 1> Record web UI test cases and generate script; 2> Parallel screenshots taking from multiple languages web UI. 28 |
29 |
30 |
31 |
32 |
33 |
-------------------------------------------------------------------------------- /vuportal/src/app/components/home/home.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuportal/src/app/components/home/home.component.scss -------------------------------------------------------------------------------- /vuportal/src/app/components/home/home.component.spec.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 5 | 6 | import { HomeComponent } from './home.component'; 7 | 8 | describe('HomeComponent', () => { 9 | let component: HomeComponent; 10 | let fixture: ComponentFixture; 11 | 12 | beforeEach(async () => { 13 | await TestBed.configureTestingModule({ 14 | declarations: [ HomeComponent ] 15 | }) 16 | .compileComponents(); 17 | }); 18 | 19 | beforeEach(() => { 20 | fixture = TestBed.createComponent(HomeComponent); 21 | component = fixture.componentInstance; 22 | fixture.detectChanges(); 23 | }); 24 | 25 | it('should create', () => { 26 | expect(component).toBeTruthy(); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /vuportal/src/app/components/home/home.component.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { Component, OnInit } from '@angular/core'; 5 | 6 | @Component({ 7 | selector: 'vuportal-home', 8 | templateUrl: './home.component.html', 9 | styleUrls: ['./home.component.scss'] 10 | }) 11 | export class HomeComponent implements OnInit { 12 | 13 | constructor() { } 14 | 15 | ngOnInit(): void { 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /vuportal/src/app/components/management/management.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuportal/src/app/components/management/management.component.scss -------------------------------------------------------------------------------- /vuportal/src/app/components/management/management.component.spec.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 5 | 6 | import { ManagementComponent } from './management.component'; 7 | 8 | describe('ManagementComponent', () => { 9 | let component: ManagementComponent; 10 | let fixture: ComponentFixture; 11 | 12 | beforeEach(async () => { 13 | await TestBed.configureTestingModule({ 14 | declarations: [ ManagementComponent ] 15 | }) 16 | .compileComponents(); 17 | }); 18 | 19 | beforeEach(() => { 20 | fixture = TestBed.createComponent(ManagementComponent); 21 | component = fixture.componentInstance; 22 | fixture.detectChanges(); 23 | }); 24 | 25 | it('should create', () => { 26 | expect(component).toBeTruthy(); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /vuportal/src/app/components/navigation/navigation.component.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | Recording 10 | 11 | -------------------------------------------------------------------------------- /vuportal/src/app/components/navigation/navigation.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | background-color: #eeeeee !important; 3 | } -------------------------------------------------------------------------------- /vuportal/src/app/components/navigation/navigation.component.spec.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 5 | 6 | import { NavigationComponent } from './navigation.component'; 7 | 8 | describe('NavigationComponent', () => { 9 | let component: NavigationComponent; 10 | let fixture: ComponentFixture; 11 | 12 | beforeEach(async () => { 13 | await TestBed.configureTestingModule({ 14 | declarations: [ NavigationComponent ] 15 | }) 16 | .compileComponents(); 17 | }); 18 | 19 | beforeEach(() => { 20 | fixture = TestBed.createComponent(NavigationComponent); 21 | component = fixture.componentInstance; 22 | fixture.detectChanges(); 23 | }); 24 | 25 | it('should create', () => { 26 | expect(component).toBeTruthy(); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /vuportal/src/app/components/navigation/navigation.component.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { Component, OnInit } from '@angular/core'; 5 | 6 | @Component({ 7 | selector: 'vuportal-navigation', 8 | templateUrl: './navigation.component.html', 9 | styleUrls: ['./navigation.component.scss'] 10 | }) 11 | export class NavigationComponent implements OnInit { 12 | collapsed = true; 13 | constructor() { } 14 | 15 | ngOnInit(): void { 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /vuportal/src/app/components/start-test/start-test.component.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 15 | 16 | 22 | -------------------------------------------------------------------------------- /vuportal/src/app/components/start-test/start-test.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuportal/src/app/components/start-test/start-test.component.scss -------------------------------------------------------------------------------- /vuportal/src/app/components/start-test/start-test.component.spec.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 5 | 6 | import { StartTestComponent } from './start-test.component'; 7 | 8 | describe('StartTestComponent', () => { 9 | let component: StartTestComponent; 10 | let fixture: ComponentFixture; 11 | 12 | beforeEach(async () => { 13 | await TestBed.configureTestingModule({ 14 | declarations: [ StartTestComponent ] 15 | }) 16 | .compileComponents(); 17 | }); 18 | 19 | beforeEach(() => { 20 | fixture = TestBed.createComponent(StartTestComponent); 21 | component = fixture.componentInstance; 22 | fixture.detectChanges(); 23 | }); 24 | 25 | it('should create', () => { 26 | expect(component).toBeTruthy(); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /vuportal/src/app/components/start-test/start-test.component.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { Component, EventEmitter, OnInit, Output } from '@angular/core'; 5 | import { TestAPIService } from 'src/app/services/test-api.service'; 6 | import { environment } from 'src/environments/environment'; 7 | 8 | @Component({ 9 | selector: 'vuportal-start-test', 10 | templateUrl: './start-test.component.html', 11 | styleUrls: ['./start-test.component.scss'] 12 | }) 13 | export class StartTestComponent implements OnInit { 14 | @Output() start_test_conditioned = new EventEmitter(); 15 | isStartTest = false; 16 | testUUID = ""; 17 | baseUrl: string = environment.testApiUrl; 18 | constructor(private testAPIService: TestAPIService) { } 19 | 20 | ngOnInit(): void { 21 | } 22 | 23 | transforInfo(obj) { 24 | this.testUUID = obj.testUUID 25 | console.log("start test uuid ", this.testUUID) 26 | this.isStartTest = true; 27 | } 28 | 29 | cancel() { 30 | this.reset(); 31 | } 32 | 33 | start() { 34 | this.isStartTest = false; 35 | let emitObj = { 36 | }; 37 | this.testAPIService.startTest(this.testUUID) 38 | .subscribe( 39 | (data) => { 40 | console.log("start - data", data); 41 | let isSuccess = data["message"]; 42 | let testcase = data["testcase"]; 43 | let consoles = data["consoles"]; 44 | 45 | if(isSuccess == "success"){ 46 | emitObj = { 47 | isSuccess: true, 48 | result: testcase, 49 | consoles: consoles 50 | } 51 | 52 | } else { 53 | emitObj = { 54 | isSuccess: false, 55 | result: null, 56 | consoles: null 57 | } 58 | } 59 | this.reset(); 60 | this.start_test_conditioned.emit(emitObj); 61 | }, 62 | (error) => { 63 | console.log("Failed to start test", error); 64 | this.reset(); 65 | } 66 | ) 67 | this.reset(); 68 | } 69 | 70 | 71 | 72 | reset() { 73 | this.isStartTest = false; 74 | this.testUUID = ""; 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /vuportal/src/app/components/stop-test/stop-test.component.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 15 | 16 | 22 | -------------------------------------------------------------------------------- /vuportal/src/app/components/stop-test/stop-test.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuportal/src/app/components/stop-test/stop-test.component.scss -------------------------------------------------------------------------------- /vuportal/src/app/components/stop-test/stop-test.component.spec.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 5 | 6 | import { StopTestComponent } from './stop-test.component'; 7 | 8 | describe('StopTestComponent', () => { 9 | let component: StopTestComponent; 10 | let fixture: ComponentFixture; 11 | 12 | beforeEach(async () => { 13 | await TestBed.configureTestingModule({ 14 | declarations: [ StopTestComponent ] 15 | }) 16 | .compileComponents(); 17 | }); 18 | 19 | beforeEach(() => { 20 | fixture = TestBed.createComponent(StopTestComponent); 21 | component = fixture.componentInstance; 22 | fixture.detectChanges(); 23 | }); 24 | 25 | it('should create', () => { 26 | expect(component).toBeTruthy(); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /vuportal/src/app/components/stop-test/stop-test.component.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { Component, EventEmitter, OnInit, Output } from '@angular/core'; 5 | import { TestAPIService } from 'src/app/services/test-api.service'; 6 | 7 | @Component({ 8 | selector: 'vuportal-stop-test', 9 | templateUrl: './stop-test.component.html', 10 | styleUrls: ['./stop-test.component.scss'] 11 | }) 12 | export class StopTestComponent implements OnInit { 13 | @Output() stop_test_conditioned = new EventEmitter(); 14 | isStopTest = false; 15 | testUUID = ""; 16 | constructor(private testAPIService: TestAPIService) { } 17 | 18 | ngOnInit(): void { 19 | } 20 | 21 | transforInfo(obj) { 22 | this.testUUID = obj.testUUID 23 | console.log("stop test uuid ", this.testUUID) 24 | this.isStopTest = true; 25 | } 26 | 27 | stop(){ 28 | this.isStopTest = false; 29 | let emitObj = { 30 | }; 31 | this.testAPIService.stopTest(this.testUUID) 32 | .subscribe( 33 | (data) => { 34 | console.log("stop - data", data); 35 | let isSuccess = data["message"]; 36 | let testcase = data["testcase"]; 37 | 38 | if(isSuccess == "success"){ 39 | emitObj = { 40 | isSuccess: true, 41 | result: testcase 42 | } 43 | 44 | } else { 45 | emitObj = { 46 | isSuccess: false, 47 | result: null 48 | } 49 | } 50 | this.reset(); 51 | this.stop_test_conditioned.emit(emitObj); 52 | }, 53 | (error) => { 54 | console.log("Failed to stop test", error); 55 | this.reset(); 56 | } 57 | ) 58 | this.reset(); 59 | } 60 | 61 | cancel(){ 62 | this.reset(); 63 | } 64 | 65 | reset() { 66 | this.isStopTest = false; 67 | this.testUUID = "" 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /vuportal/src/app/components/view-report/view-report.component.scss: -------------------------------------------------------------------------------- 1 | .radio-label{ 2 | font-size: .95rem; 3 | font-weight: 100; 4 | } 5 | .clr-form-compact .clr-control-container.worker-start-urls{ 6 | display: inline-block!important; 7 | } 8 | ::ng-deep .testName{ 9 | padding-left: 0!important; 10 | } 11 | .report-cell{ 12 | overflow: hidden; 13 | text-overflow: ellipsis; 14 | white-space: nowrap; 15 | } 16 | .report-action-bar{ 17 | margin-top: 0; 18 | } 19 | .btn-group01{ 20 | vertical-align: middle; 21 | } -------------------------------------------------------------------------------- /vuportal/src/app/components/view-report/view-report.component.spec.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 5 | 6 | import { ViewReportComponent } from './view-report.component'; 7 | 8 | describe('ViewReportComponent', () => { 9 | let component: ViewReportComponent; 10 | let fixture: ComponentFixture; 11 | 12 | beforeEach(async () => { 13 | await TestBed.configureTestingModule({ 14 | declarations: [ ViewReportComponent ] 15 | }) 16 | .compileComponents(); 17 | }); 18 | 19 | beforeEach(() => { 20 | fixture = TestBed.createComponent(ViewReportComponent); 21 | component = fixture.componentInstance; 22 | fixture.detectChanges(); 23 | }); 24 | 25 | it('should create', () => { 26 | expect(component).toBeTruthy(); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /vuportal/src/app/model/test.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | export interface Test { 5 | id: number, 6 | name: string, 7 | apptype: string, 8 | softdeleted: boolean, 9 | uuid: string, 10 | product: string, 11 | browser: string, 12 | status: string, 13 | build: string, 14 | resolution: string, 15 | locales: string, 16 | leader_locale: string, 17 | start_url: string, 18 | add_host: string, 19 | glossary: string, 20 | run_id: number, 21 | user: string, 22 | pool: string, 23 | max_event_retry: number, 24 | accessibility_data: string, 25 | createtime: string, 26 | lastruntime: string, 27 | access_urllist: string 28 | } -------------------------------------------------------------------------------- /vuportal/src/app/services/test-api.service.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2022 VMware, Inc. 2 | // SPDX-License-Identifier: Apache License 2.0 3 | 4 | import { Injectable } from '@angular/core'; 5 | import { HttpClient} from '@angular/common/http'; 6 | import { environment } from '../../environments/environment'; 7 | import { Observable } from 'rxjs'; 8 | import { Test } from '../model/test'; 9 | 10 | @Injectable() 11 | export class TestAPIService { 12 | 13 | baseUrl: string = environment.testApiUrl; 14 | 15 | constructor(private http: HttpClient) { 16 | } 17 | 18 | public getTests(): Observable { 19 | return this.http.get(this.baseUrl + `/parallel/tests/`); 20 | } 21 | 22 | public addTest(test: Test): Observable { 23 | return this.http.post(this.baseUrl + `/parallel/tests/`, test); 24 | } 25 | 26 | public deleteTest(uuid: string):Observable { 27 | const url = `${this.baseUrl}/parallel/tests/${uuid}`; 28 | return this.http.delete(url) 29 | } 30 | 31 | public startTest(uuid: string):Observable { 32 | const url = `${this.baseUrl}/parallel/tests/${uuid}` + `/start`; 33 | return this.http.post(url, ''); 34 | } 35 | 36 | public stopTest(uuid: string):Observable { 37 | const url = `${this.baseUrl}/parallel/tests/${uuid}` + `/stop`; 38 | return this.http.post(url,''); 39 | } 40 | 41 | public getTest(uuid: string): Observable { 42 | return this.http.get(this.baseUrl + `/parallel/tests/` + uuid); 43 | } 44 | 45 | public getTestReport(id: string): Observable { 46 | return this.http.get(this.baseUrl + `/parallel/tests/` + id + `/report`); 47 | } 48 | 49 | public getResolutions(): Observable { 50 | return this.http.get(this.baseUrl + `/parallel/resolutions/` ); 51 | } 52 | 53 | public getLocales(): Observable { 54 | return this.http.get(this.baseUrl + `/parallel/locales/` ); 55 | } 56 | 57 | public getProducts(): Observable { 58 | return this.http.get(this.baseUrl + `/parallel/products/` ); 59 | } 60 | } 61 | 62 | 63 | -------------------------------------------------------------------------------- /vuportal/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuportal/src/assets/.gitkeep -------------------------------------------------------------------------------- /vuportal/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | testApiUrl : "https://vtaas-micro.eng.vmware.com", 4 | defaultUser: "tawa", 5 | consoleUrl: "https://vtaas-micro.eng.vmware.com", 6 | liveConsoleBase: "http://vtaas-micro.eng.vmware.com" 7 | }; 8 | -------------------------------------------------------------------------------- /vuportal/src/environments/environment.stage.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false, 7 | testApiUrl : "https://vtaas-micro-stage.eng.vmware.com", 8 | defaultUser: "tawa", 9 | consoleUrl: "https://vtaas-micro-stage.eng.vmware.com", 10 | liveConsoleBase: "http://10.153.249.21:9100" 11 | }; 12 | 13 | /* 14 | * For easier debugging in development mode, you can import the following file 15 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 16 | * 17 | * This import should be commented out in production mode because it will have a negative impact 18 | * on performance if an error is thrown. 19 | */ 20 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 21 | -------------------------------------------------------------------------------- /vuportal/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false, 7 | testApiUrl : "http://localhost:9100", 8 | defaultUser: "tawa", 9 | }; 10 | 11 | // testApiUrl : "http://10.153.249.33:9100", 12 | /* 13 | * For easier debugging in development mode, you can import the following file 14 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 15 | * 16 | * This import should be commented out in production mode because it will have a negative impact 17 | * on performance if an error is thrown. 18 | */ 19 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 20 | -------------------------------------------------------------------------------- /vuportal/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuportal/src/favicon.ico -------------------------------------------------------------------------------- /vuportal/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vuportal 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /vuportal/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /vuportal/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /vuportal/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: { 11 | context(path: string, deep?: boolean, filter?: RegExp): { 12 | keys(): string[]; 13 | (id: string): T; 14 | }; 15 | }; 16 | 17 | // First, initialize the Angular testing environment. 18 | getTestBed().initTestEnvironment( 19 | BrowserDynamicTestingModule, 20 | platformBrowserDynamicTesting() 21 | ); 22 | // Then we find all the tests. 23 | const context = require.context('./', true, /\.spec\.ts$/); 24 | // And load the modules. 25 | context.keys().map(context); 26 | -------------------------------------------------------------------------------- /vuportal/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": ["resize-observer-browser"] 7 | }, 8 | "files": [ 9 | "src/main.ts", 10 | "src/polyfills.ts" 11 | ], 12 | "include": [ 13 | "src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /vuportal/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "compileOnSave": false, 4 | "compilerOptions": { 5 | "baseUrl": "./", 6 | "outDir": "./dist/out-tsc", 7 | "sourceMap": true, 8 | "declaration": false, 9 | "downlevelIteration": true, 10 | "experimentalDecorators": true, 11 | "moduleResolution": "node", 12 | "importHelpers": true, 13 | "target": "es2015", 14 | "module": "es2020", 15 | "lib": [ 16 | "es2018", 17 | "dom" 18 | ] 19 | }, 20 | "angularCompilerOptions": { 21 | "enableI18nLegacyMessageIdFormat": false 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vuportal/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /vuserver/.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | branch = True 3 | source = vuserver 4 | omit = *migrations*, *venv*, .tox 5 | [report] 6 | show_missing = False 7 | skip_covered = False 8 | [paths] 9 | vuserver = vuserver -------------------------------------------------------------------------------- /vuserver/.dockerignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | .hypothesis/ 47 | 48 | # Translations 49 | *.mo 50 | *.pot 51 | 52 | # Django stuff: 53 | *.log 54 | local_settings.py 55 | 56 | # Flask stuff: 57 | instance/ 58 | .webassets-cache 59 | 60 | # Scrapy stuff: 61 | .scrapy 62 | 63 | # Sphinx documentation 64 | docs/_build/ 65 | 66 | # PyBuilder 67 | target/ 68 | 69 | # IPython Notebook 70 | .ipynb_checkpoints 71 | 72 | # pyenv 73 | .python-version 74 | 75 | # celery beat schedule file 76 | celerybeat-schedule 77 | 78 | # virtualenv 79 | venv/ 80 | ENV/ 81 | 82 | # Spyder project settings 83 | .spyderproject 84 | 85 | # Rope project settings 86 | .ropeproject 87 | 88 | tags 89 | .pytest_cache 90 | 91 | .bumpversion.cfg 92 | dist 93 | docker 94 | docs 95 | .eggs 96 | example 97 | .git 98 | .gitignore 99 | LICENSE 100 | # MANIFEST.in 101 | .pylintrc 102 | README.rst 103 | # setup.cfg 104 | # setup.py 105 | # tavern 106 | tavern.egg-info 107 | apitests 108 | .tox 109 | tox.ini 110 | tox-integration.ini 111 | .travis.yml 112 | 113 | venv 114 | .idea 115 | -------------------------------------------------------------------------------- /vuserver/.env/local: -------------------------------------------------------------------------------- 1 | DJANGO_SETTINGS_MODULE=vuserver.settings.local 2 | DEBUG=True -------------------------------------------------------------------------------- /vuserver/.env/staging: -------------------------------------------------------------------------------- 1 | DJANGO_SETTINGS_MODULE=vuserver.settings.staging 2 | DEBUG=True 3 | REDIS_HOST=staging.tawa.vmware.com 4 | REDIS_PORT=16379 -------------------------------------------------------------------------------- /vuserver/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | extend-ignore = W292,W391,E126,W291,N805,E203,E231,E501,F405,F403,C901,E128,F401 3 | exclude = *migrations*,*.pyc,.git,__pycache__,*.conf,*.md,.idea, venv,vuportal, workers, virtualenv 4 | max-line-length=90 5 | max-complexity=14 6 | format=pylint 7 | show_source = True 8 | statistics = True 9 | count = True 10 | 11 | -------------------------------------------------------------------------------- /vuserver/Dockerfile: -------------------------------------------------------------------------------- 1 | # Python Base Image 2 | #FROM python:3.7 3 | FROM tomshin/envbase 4 | RUN echo 'Base image setup completed' 5 | 6 | # Environment Variable 7 | ENV PYTHONUNBUFFERED 1 8 | ENV WORKDIR /app 9 | # Make and set working directory 10 | RUN echo 'Making the working directory "/app"' 11 | RUN mkdir ${WORKDIR} 12 | 13 | # Set Work Directory 14 | WORKDIR ${WORKDIR} 15 | 16 | # Copy the requirement file to working directory 17 | RUN echo 'Copying the requirement file to working directory' 18 | COPY requirements.txt $WORKDIR 19 | 20 | # Install dependecies with pip 21 | RUN echo 'Installing the dependencies' 22 | RUN pip install -r requirements.txt 23 | 24 | 25 | RUN apt-get update -y 26 | RUN apt-get install -y ffmpeg libsm6 libxext6 x264 libx264-dev python3-opencv 27 | 28 | RUN echo 'Copying the project code to working directory' 29 | COPY . $WORKDIR 30 | 31 | EXPOSE 9100 32 | RUN python manage.py collectstatic --no-input && python manage.py migrate --settings=vuserver.settings.staging 33 | # Python execute command 34 | CMD ["gunicorn", "--bind", ":9100", "vuserver.wsgi:application"] -------------------------------------------------------------------------------- /vuserver/Dockerfile-server: -------------------------------------------------------------------------------- 1 | FROM python:3.10-alpine 2 | RUN pip3 install pyjwt~=2.4.0 flask~=2.0.3 3 | 4 | ENV FLASK_DEBUG=1 5 | ENV PYTHONUNBUFFERED=0 6 | 7 | 8 | COPY server.py / 9 | 10 | ENV FLASK_APP=/server.py 11 | 12 | CMD ["flask", "run", "--host=0.0.0.0", "--port=5000"] -------------------------------------------------------------------------------- /vuserver/Dockerfile-test: -------------------------------------------------------------------------------- 1 | # Python Base Image 2 | FROM python:3.7 3 | RUN echo 'Base image setup completed' 4 | 5 | # Environment Variable 6 | ENV PYTHONUNBUFFERED 1 7 | ENV WORKDIR /app 8 | # Make and set working directory 9 | RUN echo 'Making the working directory "/app"' 10 | RUN mkdir ${WORKDIR} 11 | 12 | # Set Work Directory 13 | WORKDIR ${WORKDIR} 14 | 15 | # Copy the requirement file to working directory 16 | RUN echo 'Copying the requirement file to working directory' 17 | COPY requirements-test.txt $WORKDIR 18 | 19 | # Install dependecies with pip 20 | RUN echo 'Installing the dependencies' 21 | RUN pip install -r requirements-test.txt 22 | 23 | RUN echo 'Copying the project code to working directory' 24 | COPY gotests $WORKDIR 25 | 26 | EXPOSE 9100 27 | RUN #python manage.py migrate --settings=vuserver.settings.test 28 | # Python execute command 29 | CMD ["bash", "apitests/get-coverage.sh"] 30 | -------------------------------------------------------------------------------- /vuserver/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = '2022.8' 2 | -------------------------------------------------------------------------------- /vuserver/apitests/.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | branch = True 3 | source = . 4 | omit = *migrations*, *venv*, .tox, manage.py, *settings*, server.py 5 | [report] 6 | show_missing = True 7 | skip_covered = True 8 | [paths] 9 | vuserver = vuserver -------------------------------------------------------------------------------- /vuserver/apitests/conftest.py: -------------------------------------------------------------------------------- 1 | import logging.config 2 | import os 3 | 4 | import pytest 5 | import stevedore 6 | import yaml 7 | 8 | import tavern 9 | import tavern._plugins.mqtt.tavernhook as mqtt_plugin 10 | from tavern._plugins.rest.tavernhook import TavernRestPlugin as rest_plugin 11 | 12 | 13 | @pytest.fixture(scope="function", autouse=True) 14 | def run_all(): 15 | current_dir = os.path.dirname(os.path.abspath(__file__)) 16 | with open(os.path.join(current_dir, "logging.yaml"), "r") as spec_file: 17 | settings = yaml.load(spec_file, Loader=yaml.SafeLoader) 18 | logging.config.dictConfig(settings) 19 | 20 | 21 | @pytest.fixture(scope="session", autouse=True) 22 | def set_plugins(): 23 | def extension(name, point): 24 | return stevedore.extension.Extension(name, point, point, point) 25 | 26 | tavern.plugins.load_plugins.plugins = [ 27 | extension( 28 | "requests", 29 | rest_plugin, 30 | ), 31 | extension( 32 | "paho-mqtt", 33 | mqtt_plugin, 34 | ), 35 | ] 36 | -------------------------------------------------------------------------------- /vuserver/apitests/coverage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -ex 4 | pwd 5 | if [ -d "gotests" ];then 6 | rm -rf gotests 7 | fi 8 | if [ -f "htmlcov.tar" ];then 9 | rm -f htmlcov.tar 10 | fi 11 | mkdir gotests 12 | 13 | cp -r apitests gotests/tests 14 | 15 | cd vuserver 16 | if [ -d "decc" ];then 17 | rm -rf decc 18 | fi 19 | if [ -d "assets" ];then 20 | rm -rf assets 21 | fi 22 | if [ -d "coverage-data" ];then 23 | rm -rf coverage-data 24 | fi 25 | if [ -d "static" ];then 26 | rm -rf static 27 | fi 28 | #if [ -d "templates" ];then 29 | # rm -rf templates 30 | #fi 31 | if [ -d "log" ];then 32 | rm -rf log 33 | fi 34 | if [ -f "db.sqlite3" ];then 35 | rm -f "db.sqlite3" 36 | fi 37 | 38 | if [ -f ".coveragedata" ];then 39 | rm -f ".coveragedata" 40 | fi 41 | 42 | cp -f docker-compose-test.yaml ../. 43 | cp -f Dockerfile-test ../. 44 | cp -f Dockerfile-server ../. 45 | #cp -f server.py ../. 46 | mv -f ../gotests/tests/server.py ../. 47 | cp -f requirements-test.txt ../. 48 | 49 | cd .. 50 | cp -r vuserver gotests/. 51 | #docker-compose -f docker-compose-test.yaml up --build 52 | docker-compose -f docker-compose-test.yaml up --build -d 53 | 54 | sleep 5 55 | 56 | bash gotests/tests/getcoverage.sh 57 | 58 | docker-compose -f docker-compose-test.yaml stop 59 | 60 | #docker-compose -f docker-compose-test.yaml stop 61 | 62 | -------------------------------------------------------------------------------- /vuserver/apitests/getcoverage.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #set -xv 3 | 4 | basepath=$(cd `dirname $0` || exit; pwd) 5 | echo "$basepath" 6 | cd "$basepath" || exit 7 | pwd 8 | cd ../.. 9 | if [ -d "venv" ]; then 10 | source ./venv/bin/activate 11 | if (( $? != 0 )) ;then 12 | rm -rf venv 13 | python37 -m virtualenv venv 14 | source ./venv/bin/activate 15 | fi 16 | else 17 | python37 -m virtualenv venv 18 | source ./venv/bin/activate 19 | fi 20 | cd ./gotests/vuserver 21 | pwd 22 | if [ -f "db.sqlite3" ];then 23 | rm -f "db.sqlite3" 24 | fi 25 | 26 | if [ -f ".coveragedata" ];then 27 | rm -f ".coveragedata" 28 | fi 29 | 30 | 31 | #pip3 install -r requirements.txt >> /dev/null 32 | pip install --upgrade pip 33 | echo "pip install -r requirements-test.txt" 34 | pip install -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com -r ../../requirements-test.txt >> /dev/null 35 | python manage.py migrate --settings=vuserver.settings.test 36 | ipaddr=$(ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:" | grep "10.") 37 | echo "$ipaddr" 38 | coverage erase 39 | REDIS_HOST=127.0.0.1 LOCALHOST_IP=$ipaddr coverage run --source=../vuserver --rcfile=.coveragerc --data-file=.coveragedata manage.py runserver --noreload 0.0.0.0:9100 --settings=vuserver.settings.test & 40 | sleep 5 41 | cd .. 42 | pytest -vv tests --html=./tests/all.html 43 | sleep 5 44 | kill $( ps aux | grep '0.0.0.0:9100' |grep 'Sl' | awk '{print $2}') 45 | #kill $( ps aux | grep '0.0.0.0:9000' |grep 'Sl+' | awk '{print $2}') 46 | curl -s "http://127.0.0.1:9100/parallel/shutdownforcodecoverage/" 47 | pwd 48 | cd ./vuserver 49 | coverage report --data-file=.coveragedata 50 | sleep 5 51 | coverage html --data-file=.coveragedata --directory=../../htmlcov 52 | 53 | sleep 5 54 | kill -9 $(pgrep -f 9100) 55 | deactivate 56 | docker-compose -f ../../docker-compose-test.yaml stop 57 | cd ../../. 58 | pwd 59 | tar -cvf htmlcov.tar htmlcov 60 | sleep 5 61 | rm -rf htmlcov 62 | #kill -9 $(pgrep -f 9100) 63 | -------------------------------------------------------------------------------- /vuserver/apitests/integration/OK.txt: -------------------------------------------------------------------------------- 1 | OK -------------------------------------------------------------------------------- /vuserver/apitests/integration/includes.yaml: -------------------------------------------------------------------------------- 1 | # includes.yaml 2 | --- 3 | 4 | name: Common test information 5 | description: Login information for test server 6 | 7 | variables: 8 | SERVER_ROOT: http://127.0.0.1:9100 9 | TESTCASE_ID: '5087' # cov-01 10 | SCRIPT_ID: '5863' 11 | PARALLEL_TEST_UUID: '7cd9f75a-b218-4c79-be31-0b018cfe6d38' # vc-sanity-check 12 | TESTCASE_UUID: 'ebb8c359-480f-4ec2-a883-d3f63cc621bc' # cov-01 13 | TESTCASE_UUID2: '89b26523-7bab-48f0-8ea5-1e6591d7ae07' # cov-05 14 | ACCESSIBILITY_TEST_UUID: 'e1e59c6a-9dd3-4bd3-8f6d-e9e4308815c5' # apitest01 15 | RUN_ID: '1' 16 | CAPTURE_ID: '1de7a6ab-6644-4742-973f-1824cbf1f35f' 17 | USER_NAME: 'zzhuo' 18 | SUITE_UUID: 'fec7062a-403a-4933-aa4c-20b2e23ff8de' # db-test3 19 | CLONED_TEST_ID: '5777' 20 | CLONED_RUN_ID: '0' 21 | CAPTURE_EVENT_ID: '974701' 22 | CLIENT_UUID: !uuid -------------------------------------------------------------------------------- /vuserver/apitests/integration/log_spec.yaml: -------------------------------------------------------------------------------- 1 | # log_spec.yaml 2 | --- 3 | version: 1 4 | formatters: 5 | default: 6 | # colorlog is really useful 7 | (): colorlog.ColoredFormatter 8 | format: "%(asctime)s [%(bold)s%(log_color)s%(levelname)s%(reset)s]: (%(bold)s%(name)s:%(lineno)d%(reset)s) %(message)s" 9 | style: "%" 10 | datefmt: "%X" 11 | log_colors: 12 | DEBUG: cyan 13 | INFO: green 14 | WARNING: yellow 15 | ERROR: red 16 | CRITICAL: red,bg_white 17 | 18 | handlers: 19 | stderr: 20 | class: colorlog.StreamHandler 21 | formatter: default 22 | 23 | loggers: 24 | tavern: 25 | handlers: 26 | - stderr 27 | level: DEBUG -------------------------------------------------------------------------------- /vuserver/apitests/integration/test_01_init_gets.tavern.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | test_name: Get products 3 | 4 | includes: 5 | - !include includes.yaml 6 | 7 | stages: 8 | - name: Verify products API 9 | request: 10 | url: "{SERVER_ROOT:s}/parallel/products/" 11 | method: GET 12 | response: 13 | strict: 14 | - json:off 15 | status_code: 200 16 | json: 17 | message: 'success' 18 | 19 | --- 20 | test_name: POST products 21 | 22 | includes: 23 | - !include includes.yaml 24 | 25 | stages: 26 | - name: Verify products API 27 | request: 28 | url: "{SERVER_ROOT:s}/parallel/products/" 29 | method: POST 30 | json: 31 | name: "APITEST_Product_delete" 32 | bu_name: "CPBU" 33 | bug_product_name: "vTaaS" 34 | response: 35 | strict: 36 | - json:off 37 | status_code: 200 38 | 39 | --- 40 | test_name: Get locales 41 | 42 | includes: 43 | - !include includes.yaml 44 | 45 | stages: 46 | - name: Verify locales API 47 | request: 48 | url: "{SERVER_ROOT:s}/parallel/locales/" 49 | method: GET 50 | response: 51 | strict: 52 | - json:off 53 | status_code: 200 54 | json: 55 | message: 'success' 56 | 57 | --- 58 | test_name: Get resolutions 59 | 60 | includes: 61 | - !include includes.yaml 62 | 63 | stages: 64 | - name: Verify resolutions API 65 | request: 66 | url: "{SERVER_ROOT:s}/parallel/resolutions/" 67 | method: GET 68 | response: 69 | strict: 70 | - json:off 71 | status_code: 200 72 | json: 73 | message: 'success' -------------------------------------------------------------------------------- /vuserver/apitests/integration/test_03_config_search.tavern.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | test_name: Post searchtext 3 | 4 | includes: 5 | - !include includes.yaml 6 | 7 | stages: 8 | - name: Verify searchtext API 9 | request: 10 | url: "{SERVER_ROOT:s}/parallel/searchtext/" 11 | method: POST 12 | json: 13 | scripts: '{SCRIPT_ID}' 14 | key: 'i' 15 | response: 16 | strict: 17 | - json:off 18 | status_code: 200 19 | 20 | --- 21 | test_name: Post searchinput 22 | 23 | includes: 24 | - !include includes.yaml 25 | 26 | stages: 27 | - name: Verify searchinput API 28 | request: 29 | url: "{SERVER_ROOT:s}/parallel/searchinput/" 30 | method: POST 31 | json: 32 | scripts: '{SCRIPT_ID}' 33 | key: 'i' 34 | response: 35 | strict: 36 | - json:off 37 | status_code: 200 38 | 39 | --- 40 | test_name: Post searchassert 41 | 42 | includes: 43 | - !include includes.yaml 44 | 45 | stages: 46 | - name: Verify searchassert API 47 | request: 48 | url: "{SERVER_ROOT:s}/parallel/searchassert/" 49 | method: POST 50 | json: 51 | scripts: '{SCRIPT_ID}' 52 | key: 'i' 53 | response: 54 | strict: 55 | - json:off 56 | status_code: 200 57 | 58 | --- 59 | test_name: Post searchsshcommand 60 | 61 | includes: 62 | - !include includes.yaml 63 | 64 | stages: 65 | - name: Verify searchsshcommand API 66 | request: 67 | url: "{SERVER_ROOT:s}/parallel/searchsshcommand/" 68 | method: POST 69 | json: 70 | scripts: '{SCRIPT_ID}' 71 | response: 72 | strict: 73 | - json:off 74 | status_code: 200 75 | 76 | --- 77 | test_name: Get config_events 78 | 79 | includes: 80 | - !include includes.yaml 81 | 82 | stages: 83 | - name: Verify config_events API 84 | request: 85 | url: "{SERVER_ROOT:s}/parallel/config_events/{SCRIPT_ID:s}" 86 | method: GET 87 | response: 88 | strict: 89 | - json:off 90 | status_code: 200 -------------------------------------------------------------------------------- /vuserver/apitests/integration/test_08_parallel_capture.tavern.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | test_name: Test Capture API 3 | 4 | includes: 5 | - !include includes.yaml 6 | 7 | stages: 8 | - name: Verify capture API 9 | request: 10 | url: "{SERVER_ROOT:s}/parallel/capture/" 11 | method: POST 12 | json: 13 | captureid: "" 14 | consoleid: "28225" 15 | img: "" 16 | response: 17 | strict: 18 | - json:off 19 | status_code: 200 20 | json: 21 | message: 'not valid' 22 | 23 | - name: Verify capture API 24 | request: 25 | url: "{SERVER_ROOT:s}/parallel/capture/" 26 | method: POST 27 | json: 28 | captureid: !uuid 29 | consoleid: "28225" 30 | img: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAAPFBMVEX///8AAAD9/f2CgoKAgIAAAAAAAAAAAABLS0sAAAAAAACqqqqqqqq6urpKSkpISEgAAAC7u7u5ubn////zbsMcAAAAE3RSTlMASv6rqwAWS5YMC7/AyZWVFcrJCYaKfAAAAHhJREFUeF590kkOgCAQRFEaFVGc+/53FYmbz6JqBbyQMFSYuoQuV+iTflnstI7ssLXRvMWRaEMs84e2uVckuZe6knL0hiSPObXhj6ChzoEkIolIIpKIO4joICAIeDd7QGIfCCjOKe9HEk8mnxpIAup/F31RPZP9fAG3IAyBSJe0igAAAABJRU5ErkJggg==" 31 | response: 32 | strict: 33 | - json:off 34 | status_code: 200 35 | json: 36 | message: 'success' 37 | 38 | 39 | --- 40 | test_name: textresource search 41 | 42 | includes: 43 | - !include includes.yaml 44 | 45 | stages: 46 | - name: Verify textresource search API 47 | request: 48 | url: "{SERVER_ROOT:s}/parallel/textresources/search/" 49 | method: POST 50 | json: 51 | product: "vTaaS" 52 | locale: ["zh_CN", "en_US"] 53 | resultStyle: "locale-row" 54 | response: 55 | strict: 56 | - json:off 57 | status_code: 200 -------------------------------------------------------------------------------- /vuserver/apitests/integration/testfile.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuserver/apitests/integration/testfile.txt -------------------------------------------------------------------------------- /vuserver/apitests/integration/utils.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | import time 5 | from datetime import datetime 6 | 7 | from box import Box 8 | 9 | 10 | def generate_dict_data(): 11 | test_dict = {"events": { 12 | "a": 1 13 | }} 14 | return Box(test_dict) 15 | 16 | 17 | def return_name(): 18 | return {"name": time.strftime("test%Y%m%d%H%M%S")} 19 | 20 | 21 | # a = time.strftime("%Y%m%d") 22 | a = time.strftime("%Y%m%d%H%M%S") 23 | print(a) 24 | print(len(a)) 25 | b = datetime.strptime(str(a), "%Y%m%d%H%M%S") 26 | # b = datetime.strptime(str(a), "%Y%m%d") 27 | print(b) 28 | # print(len(b)) -------------------------------------------------------------------------------- /vuserver/apitests/logging.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 1 3 | formatters: 4 | default: 5 | # colorlog is really useful 6 | (): colorlog.ColoredFormatter 7 | format: "%(asctime)s [%(bold)s%(log_color)s%(levelname)s%(reset)s]: (%(bold)s%(name)s:%(lineno)d%(reset)s) %(message)s" 8 | style: "%" 9 | datefmt: "%X" 10 | log_colors: 11 | DEBUG: cyan 12 | INFO: green 13 | WARNING: yellow 14 | ERROR: red 15 | CRITICAL: red,bg_white 16 | 17 | handlers: 18 | # print to stderr in tests. This will only show up if the test fails 19 | stderr: 20 | class: colorlog.StreamHandler 21 | formatter: default 22 | 23 | loggers: 24 | paho: 25 | handlers: 26 | - stderr 27 | level: DEBUG 28 | tavern: 29 | handlers: 30 | - stderr 31 | level: DEBUG 32 | -------------------------------------------------------------------------------- /vuserver/apitests/server.py: -------------------------------------------------------------------------------- 1 | import time 2 | 3 | from flask import Flask, Response, jsonify, redirect, request 4 | 5 | app = Flask(__name__) 6 | 7 | 8 | @app.route("/hello/", methods=["GET"]) 9 | def hello_test(): 10 | time.sleep(0.25) 11 | 12 | response = {"status": "OK", "message": "hello world"} 13 | return jsonify(response), 200 14 | 15 | 16 | @app.route("/screenshot/create_screenshot_product_test/", methods=["POST"]) 17 | def screen_shot_test(): 18 | time.sleep(0.25) 19 | 20 | response = {"status": "OK"} 21 | return jsonify(response), 200 22 | 23 | 24 | @app.route("/screenshot/take_screenshot/", methods=["POST"]) 25 | def take_screenshot(): 26 | time.sleep(0.25) 27 | return_data="iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAAPFBMVEX///8AAAD9/" \ 28 | "f2CgoKAgIAAAAAAAAAAAABLS0sAAAAAAACqqqqqqqq6urpKSkpISEgAAAC7u7u5ubn////" \ 29 | "zbsMcAAAAE3RSTlMASv6rqwAWS5YMC7/AyZWVFcrJCYaKfAAAAHhJREFUeF590kkOgCAQRF" \ 30 | "EaFVGc+/53FYmbz6JqBbyQMFSYuoQuV+iTflnstI7ssLXRvMWRaEMs84e2uVckuZe6knL0h" \ 31 | "iSPObXhj6ChzoEkIolIIpKIO4joICAIeDd7QGIfCCjOKe9HEk8mnxpIAup/F31RPZP9fAG3IA" \ 32 | "yBSJe0igAAAABJRU5ErkJggg==" 33 | response = {"status": "OK", "screenshot_raw_file_name": return_data} 34 | return jsonify(response), 200 35 | 36 | 37 | # if __name__ == "__main__": 38 | # app.run(host="0.0.0.0", port=9002) 39 | -------------------------------------------------------------------------------- /vuserver/apitests/updateservice.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd /opt/vmprojects/tawa/vuserver || exit 4 | git pull 5 | docker-compose -f docker-compose-staging.yaml up -d --build app -------------------------------------------------------------------------------- /vuserver/build_vuserver.sh: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | docker build -t vuserver:tawa . 5 | docker tag vuserver:tawa harbor-repo.vmware.com/vtaas_workers/vuserver:tawa 6 | docker push harbor-repo.vmware.com/vtaas_workers/vuserver:tawa 7 | 8 | -------------------------------------------------------------------------------- /vuserver/container_pool/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuserver/container_pool/__init__.py -------------------------------------------------------------------------------- /vuserver/container_pool/_trial_temp/_trial_marker: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuserver/container_pool/_trial_temp/_trial_marker -------------------------------------------------------------------------------- /vuserver/container_pool/admin.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | from django.contrib import admin 5 | from .models import Host, Deployment 6 | 7 | 8 | class HostAdmin(admin.ModelAdmin): 9 | list_display = [ 10 | 'uuid', 'ipaddr', 'sshport', 'username', 'password', 'deployroot', 'status', 11 | 'capacity', 'current_num', 'deployment', 'startport' 12 | ] 13 | # readonly_fields = ('current_num', 'deployment') 14 | 15 | 16 | admin.site.register(Host, HostAdmin) 17 | 18 | 19 | class DeploymentAdmin(admin.ModelAdmin): 20 | list_display = [f.name for f in Deployment._meta.get_fields()] 21 | readonly_fields = [f.name for f in Deployment._meta.get_fields()] 22 | 23 | 24 | admin.site.register(Deployment, DeploymentAdmin) 25 | -------------------------------------------------------------------------------- /vuserver/container_pool/apps.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | from django.apps import AppConfig 5 | 6 | 7 | class ContainerPoolConfig(AppConfig): 8 | name = 'container_pool' 9 | -------------------------------------------------------------------------------- /vuserver/container_pool/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuserver/container_pool/migrations/__init__.py -------------------------------------------------------------------------------- /vuserver/container_pool/serializers.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | from rest_framework import serializers 5 | 6 | from .models import Deployment 7 | 8 | 9 | class DeploymentSerializer(serializers.ModelSerializer): 10 | class Meta: 11 | model = Deployment 12 | fields = [f.name for f in Deployment._meta.get_fields()] -------------------------------------------------------------------------------- /vuserver/container_pool/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | # encoding: utf-8 5 | from __future__ import unicode_literals 6 | 7 | from django.conf.urls import url 8 | from .views import Pools, DeployStart, DeployStop 9 | 10 | app_name = 'pool' 11 | 12 | pool_patterns = [ 13 | url(r'^pools$', Pools.as_view(), name='v1_api_pools'), 14 | url(r'^start$', DeployStart.as_view(), name='v1_api_deploy_start'), 15 | url(r'^stop$', DeployStop.as_view(), name='v1_api_deploy_stop') 16 | ] 17 | -------------------------------------------------------------------------------- /vuserver/container_pool/views.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | import logging 5 | 6 | from django.conf import settings 7 | from rest_framework.response import Response 8 | from rest_framework.views import APIView 9 | from rest_framework_tracking.mixins import LoggingMixin 10 | 11 | from .deploy import start_consoles, stop_consoles 12 | 13 | logger = logging.getLogger('pool') 14 | 15 | 16 | class Pools(APIView): 17 | swagger_schema = None 18 | """ 19 | List all pools. 20 | """ 21 | 22 | def get(self, request, **kwargs): 23 | pool_hosts = settings.CONSOLE_POOLS if settings.CONSOLE_POOLS else '{}' 24 | return Response({'message': 'success', 'data': pool_hosts}) 25 | 26 | 27 | class DeployStart(LoggingMixin, APIView): 28 | swagger_schema = None 29 | """ 30 | Start an deploy. 31 | """ 32 | logging_methods = [ 33 | 'POST', 34 | ] 35 | 36 | def post(self, request): 37 | pool = request.data.get('pool', settings.DEFAULT_POOL) # * 38 | consoles = request.data.get('consoles', []) # * 39 | message = start_consoles(consoles, pool) 40 | return Response(message) 41 | 42 | 43 | class DeployStop(LoggingMixin, APIView): 44 | swagger_schema = None 45 | """ 46 | Stop deployments. 47 | """ 48 | logging_methods = [ 49 | 'POST', 50 | ] 51 | 52 | def post(self, request): 53 | deployments = request.data.get('deployments', []) # * 54 | message = stop_consoles(deployments) 55 | return Response(message) 56 | -------------------------------------------------------------------------------- /vuserver/decc/vuserver-app.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: tawa-vuserver-app 6 | labels: 7 | app: tawa-vuserver-app 8 | spec: 9 | replicas: 3 10 | selector: 11 | matchLabels: 12 | app: tawa-vuserver-app 13 | template: 14 | metadata: 15 | labels: 16 | app: tawa-vuserver-app 17 | spec: 18 | containers: 19 | - name: tawa-vuserver-app 20 | image: harbor-repo.vmware.com/vtaas_workers/vuserver:tawa 21 | env: 22 | - name: DJANGO_SETTINGS_MODULE 23 | value: "vuserver.settings.decc" 24 | - name: DEBUG 25 | value: "True" 26 | - name: REDIS_HOST 27 | value: "vuserver-redis.ara.decc.vmware.com" 28 | - name: POD_IP 29 | valueFrom: 30 | fieldRef: 31 | fieldPath: status.podIP 32 | command: ["/bin/sh"] 33 | args: ["-c", "python manage.py collectstatic --no-input && python manage.py migrate && gunicorn vuserver.wsgi -b 0.0.0.0:9100"] 34 | ports: 35 | - containerPort: 9100 36 | resources: 37 | requests: 38 | memory: "1024Mi" 39 | cpu: "1024m" 40 | limits: 41 | memory: "2048Mi" 42 | cpu: "1024m" 43 | --- 44 | kind: Service 45 | apiVersion: v1 46 | metadata: 47 | name: tawa-vuserver-app 48 | # Optional: Avi supports Kubernetes' hostname annotaion that you could use if 49 | # the default DNS name (appname-nsname) doesn't suite your business need 50 | # The domain part of the host name should match the DECC cluster 51 | annotations: 52 | external-dns.alpha.kubernetes.io/hostname: vuserver.ara.decc.vmware.com 53 | spec: 54 | type: LoadBalancer 55 | selector: 56 | app: tawa-vuserver-app 57 | ports: 58 | - port: 9100 59 | targetPort: 9100 60 | -------------------------------------------------------------------------------- /vuserver/decc/vuserver-redis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: tawa-vuserver-redis 6 | labels: 7 | app: tawa-vuserver-redis 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: tawa-vuserver-redis 13 | template: 14 | metadata: 15 | labels: 16 | app: tawa-vuserver-redis 17 | spec: 18 | containers: 19 | - name: tawa-vuserver-redis 20 | image: harbor-repo.vmware.com/vtaas_workers/redis:6 21 | env: 22 | - name: POD_IP 23 | valueFrom: 24 | fieldRef: 25 | fieldPath: status.podIP 26 | ports: 27 | - containerPort: 6379 28 | resources: 29 | requests: 30 | memory: "512Mi" 31 | cpu: "512m" 32 | limits: 33 | memory: "1024Mi" 34 | cpu: "512m" 35 | --- 36 | kind: Service 37 | apiVersion: v1 38 | metadata: 39 | name: tawa-vuserver-redis 40 | # Optional: Avi supports Kubernetes' hostname annotaion that you could use if 41 | # the default DNS name (appname-nsname) doesn't suite your business need 42 | # The domain part of the host name should match the DECC cluster 43 | annotations: 44 | external-dns.alpha.kubernetes.io/hostname: vuserver-redis.ara.decc.vmware.com 45 | spec: 46 | type: LoadBalancer 47 | selector: 48 | app: tawa-vuserver-redis 49 | ports: 50 | - port: 6379 51 | targetPort: 6379 52 | -------------------------------------------------------------------------------- /vuserver/docker-compose-staging.yaml: -------------------------------------------------------------------------------- 1 | version: '2.2' 2 | 3 | services: 4 | redis: 5 | image: 'redis:6' 6 | # command: redis-server --requirepass yourpassword 7 | ports: 8 | - '16379:6379' 9 | networks: 10 | - main 11 | container_name: vuserver-redis 12 | 13 | channels: 14 | image: harbor-repo.vmware.com/vtaas_workers/vuserver:tawa 15 | command: daphne -b 0.0.0.0 -p 9101 vuserver.asgi:application 16 | env_file: 17 | - .env/staging 18 | ports: 19 | - "9101:9101" 20 | networks: 21 | - main 22 | links: 23 | - redis 24 | app: 25 | build: 26 | context: . 27 | dockerfile: Dockerfile 28 | command: sh -c "python manage.py collectstatic --no-input && python manage.py migrate --settings=vuserver.settings.staging && gunicorn vuserver.wsgi -b 0.0.0.0:9100" 29 | container_name: vuserver-app 30 | env_file: 31 | - .env/staging 32 | depends_on: 33 | - redis 34 | expose: 35 | - "9100" 36 | ports: 37 | - "9100:9100" 38 | volumes: 39 | - /var/vms_files/tawa:/tawa 40 | networks: 41 | - main 42 | restart: on-failure 43 | networks: 44 | main: -------------------------------------------------------------------------------- /vuserver/docker-compose-test.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: '2' 3 | 4 | services: 5 | redis: 6 | image: 'redis:6' 7 | # command: redis-server --requirepass yourpassword 8 | ports: 9 | - '6379:6379' 10 | networks: 11 | - main 12 | container_name: vuserver-redis 13 | 14 | channels: 15 | image: harbor-repo.vmware.com/vtaas_workers/vuserver:tawa 16 | command: daphne -b 0.0.0.0 -p 9101 vuserver.asgi:application 17 | ports: 18 | - "9101:9101" 19 | networks: 20 | - main 21 | links: 22 | - redis 23 | 24 | server: 25 | build: 26 | context: . 27 | dockerfile: Dockerfile-server 28 | # container_name: fserver 29 | ports: 30 | - "5000:5000" 31 | networks: 32 | main: -------------------------------------------------------------------------------- /vuserver/log/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuserver/log/README.md -------------------------------------------------------------------------------- /vuserver/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "vuserver.settings.local") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError: 10 | # The above import may fail for some other reason. Ensure that the 11 | # issue is really that Django is missing to avoid masking other 12 | # exceptions on Python 2. 13 | try: 14 | import django 15 | except ImportError: 16 | raise ImportError( 17 | "Couldn't import Django. Are you sure it's installed and " 18 | "available on your PYTHONPATH environment variable? Did you " 19 | "forget to activate a virtual environment?" 20 | ) 21 | raise 22 | execute_from_command_line(sys.argv) 23 | 24 | -------------------------------------------------------------------------------- /vuserver/parallel/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuserver/parallel/__init__.py -------------------------------------------------------------------------------- /vuserver/parallel/admin.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | from django.contrib import admin 5 | from .models import Product, TestCase, UIEvent, Client, Capture, Console 6 | 7 | 8 | class ProductAdmin(admin.ModelAdmin): 9 | list_display = ('name', 'bu_name', 'reported_issue_target', 10 | 'bug_product_name', 'supported_browsers', 11 | 'supported_features', 'hpqc_domain', 'hpqc_project') 12 | 13 | 14 | admin.site.register(Product, ProductAdmin) 15 | 16 | 17 | class TestCaseAdmin(admin.ModelAdmin): 18 | list_display = ('id', 'name', 'apptype', 'product', 'uuid', 'status', 19 | 'resolution', 'locales', 'start_url', 'run_id') 20 | 21 | 22 | admin.site.register(TestCase, TestCaseAdmin) 23 | 24 | 25 | class UIEventAdmin(admin.ModelAdmin): 26 | list_display = ('id', 'testcase', 'run_id', 'verify_value', 'event', 27 | 'action', 'obj_text', 'obj_x', 'obj_y', 'obj_xpath', 28 | 'obj_value', 'recordtime') 29 | list_filter = ('testcase', ) 30 | 31 | 32 | admin.site.register(UIEvent, UIEventAdmin) 33 | 34 | 35 | class ClientAdmin(admin.ModelAdmin): 36 | list_display = [f.name for f in Client._meta.get_fields()] 37 | 38 | 39 | admin.site.register(Client, ClientAdmin) 40 | 41 | 42 | class CaptureAdmin(admin.ModelAdmin): 43 | list_display = ('id', 'captureid', 'screenshot', 'capturetime') 44 | 45 | 46 | admin.site.register(Capture, CaptureAdmin) 47 | 48 | 49 | class ConsoleAdmin(admin.ModelAdmin): 50 | list_display = [f.name for f in Console._meta.get_fields()] 51 | 52 | 53 | admin.site.register(Console, ConsoleAdmin) -------------------------------------------------------------------------------- /vuserver/parallel/migrations/0002_auto_20220412_0214.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.26 on 2022-04-12 02:14 2 | 3 | import datetime 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('parallel', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='console', 16 | name='expiretime', 17 | field=models.DateTimeField(blank=True, default=datetime.datetime(2022, 7, 11, 2, 14, 10, 881673), verbose_name='Expire Time'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /vuserver/parallel/migrations/0003_auto_20220412_0224.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.26 on 2022-04-12 02:24 2 | 3 | import datetime 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('parallel', '0002_auto_20220412_0214'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='console', 16 | name='expiretime', 17 | field=models.DateTimeField(blank=True, default=datetime.datetime(2022, 7, 11, 2, 24, 46, 475261), verbose_name='Expire Time'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /vuserver/parallel/migrations/0004_auto_20220412_0937.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.26 on 2022-04-12 09:37 2 | 3 | import datetime 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('parallel', '0003_auto_20220412_0224'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='console', 16 | name='expiretime', 17 | field=models.DateTimeField(blank=True, default=datetime.datetime(2022, 7, 11, 9, 37, 26, 261171), verbose_name='Expire Time'), 18 | ), 19 | migrations.AlterField( 20 | model_name='testcase', 21 | name='apptype', 22 | field=models.CharField(choices=[('recording', 'recording'), ('parallel', 'parallel'), ('accessibility', 'accessibility')], default='parallel', max_length=64, verbose_name='Application Type'), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /vuserver/parallel/migrations/0005_auto_20220616_1122.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.26 on 2022-06-16 11:22 2 | 3 | import datetime 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('parallel', '0004_auto_20220412_0937'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='console', 16 | name='expiretime', 17 | field=models.DateTimeField(blank=True, default=datetime.datetime(2022, 9, 14, 11, 22, 38, 696300), verbose_name='Expire Time'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /vuserver/parallel/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuserver/parallel/migrations/__init__.py -------------------------------------------------------------------------------- /vuserver/parallel/template.yml: -------------------------------------------------------------------------------- 1 | version: '2.2' 2 | services: 3 | parallel: 4 | image: {image} 5 | network_mode: bridge 6 | container_name: {container_name} 7 | environment: 8 | VNC_RESOLUTION: {VNC_RESOLUTION} 9 | BROWSER_LOCALE: {BROWSER_LOCALE} 10 | VNC_NAME: {VNC_NAME} 11 | BROWSER_TYPE: {BROWSER_TYPE} 12 | {proxy_tag} 13 | ports: 14 | - {port_tag}:6901 15 | volumes: 16 | - ./config:/ext/config 17 | {add_hosts} 18 | cap_add: 19 | - SYS_ADMIN 20 | shm_size: 1G 21 | -------------------------------------------------------------------------------- /vuserver/pytest.ini: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | omit = 3 | tests/* 4 | .eggs/* 5 | setup.py 6 | venv/* 7 | build/* 8 | dist/* 9 | 10 | source = 11 | vuserver 12 | 13 | [pytest] 14 | testpaths=vuserver tests/integration 15 | addopts = 16 | --doctest-modules 17 | -r xs 18 | -vv 19 | --strict-markers 20 | -p no:logging 21 | --tb=short 22 | norecursedirs = 23 | .git 24 | .tox 25 | .pytest_cache -------------------------------------------------------------------------------- /vuserver/requirements-test.txt: -------------------------------------------------------------------------------- 1 | channels==2.2.0 2 | channels-redis==2.4.0 3 | daphne==2.3.0 4 | Django==4.2.10 5 | django-cors-headers==2.4.0 6 | django-debug-toolbar==1.11.1 7 | djangorestframework==3.11.2 8 | djangorestframework-simplejwt==3.3 9 | drf-tracking==1.5.0 10 | fabric==2.4.0 11 | gunicorn==19.9.0 12 | redis==4.5.4 13 | requests>=2.31.0 14 | drf-yasg==1.20.0 15 | pykwalify==1.8.0 16 | opencv-python~=4.6.0.66 17 | pytest==7.1.2 18 | tavern==1.23.1 19 | pytest-html==2.1.1 20 | coverage==6.4.1 21 | colorlog==6.5.0 22 | -------------------------------------------------------------------------------- /vuserver/requirements.txt: -------------------------------------------------------------------------------- 1 | channels==2.2.0 2 | channels-redis==2.4.0 3 | daphne==2.3.0 4 | Django==2.2.28 5 | django-cors-headers==2.4.0 6 | django-debug-toolbar==1.11.1 7 | djangorestframework==3.11.2 8 | djangorestframework-simplejwt==3.3 9 | drf-tracking==1.5.0 10 | fabric==2.4.0 11 | gunicorn==19.9.0 12 | mysqlclient==2.1.0 13 | redis==4.5.4 14 | requests>=2.31.0 15 | drf-yasg==1.20.0 16 | opencv-python~=4.6.0.66 -------------------------------------------------------------------------------- /vuserver/script/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuserver/script/__init__.py -------------------------------------------------------------------------------- /vuserver/script/admin.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | from django.contrib import admin 5 | from .models import Script 6 | 7 | 8 | class ScriptAdmin(admin.ModelAdmin): 9 | list_display = [f.name for f in Script._meta.get_fields()] 10 | list_filter = ('product', ) 11 | 12 | 13 | admin.site.register(Script, ScriptAdmin) -------------------------------------------------------------------------------- /vuserver/script/apps.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | from django.apps import AppConfig 5 | 6 | 7 | class ScriptConfig(AppConfig): 8 | name = 'script' 9 | -------------------------------------------------------------------------------- /vuserver/script/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.16 on 2022-01-20 05:58 2 | 3 | import datetime 4 | from django.db import migrations, models 5 | import uuid 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='Script', 18 | fields=[ 19 | ('uuid', models.UUIDField(default=uuid.uuid4, editable=False)), 20 | ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID')), 21 | ('test_id', models.IntegerField(default=0, verbose_name='Test ID')), 22 | ('run_id', models.IntegerField(default=0, verbose_name='Run ID')), 23 | ('user', models.CharField(default='', max_length=64, verbose_name='User')), 24 | ('product', models.CharField(default='', max_length=255, verbose_name='Product')), 25 | ('name', models.CharField(default='', max_length=255, verbose_name='Name')), 26 | ('template', models.CharField(default='', max_length=255, verbose_name='Template')), 27 | ('path', models.CharField(default='', max_length=255, verbose_name='Script Path')), 28 | ('events', models.TextField(blank=True, default='', null=True, verbose_name='User Events')), 29 | ('description', models.TextField(blank=True, default='', null=True, verbose_name='Description')), 30 | ('createtime', models.DateTimeField(blank=True, default=datetime.datetime.now, verbose_name='Create Time')), 31 | ('lastupdate', models.DateTimeField(blank=True, default=datetime.datetime.now, verbose_name='Last Update')), 32 | ], 33 | options={ 34 | 'verbose_name': 'Script', 35 | 'verbose_name_plural': 'Scripts', 36 | 'db_table': 'script_script', 37 | }, 38 | ), 39 | ] 40 | -------------------------------------------------------------------------------- /vuserver/script/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuserver/script/migrations/__init__.py -------------------------------------------------------------------------------- /vuserver/script/models.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | import uuid 5 | from datetime import datetime 6 | 7 | from django.db import models 8 | 9 | 10 | class Script(models.Model): 11 | uuid = models.UUIDField(default=uuid.uuid4, editable=False) 12 | id = models.AutoField(u'ID', primary_key=True) 13 | test_id = models.IntegerField(u'Test ID', default=0) 14 | run_id = models.IntegerField(u'Run ID', default=0) 15 | user = models.CharField(u'User', max_length=64, default='') 16 | product = models.CharField(u'Product', max_length=255, default='') 17 | name = models.CharField(u'Name', max_length=255, default='') 18 | template = models.CharField(u'Template', max_length=255, default='') 19 | path = models.CharField(u'Script Path', max_length=255, default='') 20 | events = models.TextField(u'User Events',blank=True,null=True,default='') 21 | description = models.TextField(u'Description', blank=True, null=True, default='') 22 | createtime = models.DateTimeField(u'Create Time', blank=True, default=datetime.now) 23 | lastupdate = models.DateTimeField(u'Last Update', blank=True, default=datetime.now) 24 | 25 | def save(self, *args, **kwargs): 26 | super(Script, self).save(*args, **kwargs) 27 | 28 | def __str__(self): 29 | return str(self.id) 30 | 31 | class Meta: 32 | db_table = 'script_script' 33 | verbose_name = u'Script' 34 | verbose_name_plural = u'Scripts' 35 | -------------------------------------------------------------------------------- /vuserver/script/nodejs/vtaas-v2default/README.md: -------------------------------------------------------------------------------- 1 | # How to run this script 2 | ### Install nodejs and npm from: 3 | * https://nodejs.dev/learn/how-to-install-nodejs 4 | 5 | ### Install node_modules 6 | * cd . ; npm install 7 | * [**optional**]User other registry if npm install is slow 8 | - npm install cnpm --registry=https://registry.npm.taobao.org 9 | - Add node_modules/.bin to PATH 10 | - cnpm install 11 | 12 | ### Install Drivers 13 | * npm run installdriver 14 | 15 | ### Start Selenium Server 16 | * npm run server 17 | 18 | ### Run script 19 | * [Linux|Mac] source run.sh script/test.spec.js 20 | * [Windows] run.bat script/test.spec.js 21 | -------------------------------------------------------------------------------- /vuserver/script/nodejs/vtaas-v2default/actions/readme.md: -------------------------------------------------------------------------------- 1 | User action files saved here. -------------------------------------------------------------------------------- /vuserver/script/nodejs/vtaas-v2default/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "webdriver": { 3 | "host": "127.0.0.1", 4 | "port": "4444", 5 | "browsers": "chrome" 6 | }, 7 | "vars": { 8 | "v1": "123" 9 | }, 10 | "recorder": { 11 | "pathAttrs": "data-id,data-name,type,data-type,role,data-role,data-value", 12 | "attrValueBlack": "", 13 | "classValueBlack": "", 14 | "hideBeforeExpect": "" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vuserver/script/nodejs/vtaas-v2default/install.sh: -------------------------------------------------------------------------------- 1 | ls ~/nvm || git clone https://github.com/creationix/nvm.git ~/nvm 2 | source ~/nvm/nvm.sh 3 | nvm install v7.10.0 4 | npm install 5 | -------------------------------------------------------------------------------- /vuserver/script/nodejs/vtaas-v2default/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "replay", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "", 6 | "dependencies": { 7 | "chai": "3.5.0", 8 | "jimp": "0.16.1", 9 | "jsdom": "16.4.x", 10 | "jwebdriver": "2.3.x", 11 | "mocha": "6.x.x", 12 | "mocha-parallel-tests": "2.3.0", 13 | "mochawesome-uirecorder": "1.5.22", 14 | "resemblejs-node": "1.0.0", 15 | "selenium-standalone": "6.15.x", 16 | "chrome-remote-interface": "0.28.2", 17 | "log-timestamp": "0.3.0" 18 | }, 19 | "devDependencies": {}, 20 | "scripts": { 21 | "installdriver": "selenium-standalone install --drivers.firefox.baseURL=http://npm.taobao.org/mirrors/geckodriver --baseURL=http://npm.taobao.org/mirrors/selenium --drivers.chrome.baseURL=http://npm.taobao.org/mirrors/chromedriver --drivers.ie.baseURL=http://npm.taobao.org/mirrors/selenium", 22 | "server": "selenium-standalone start", 23 | "test": "mocha \"!(node_modules)/**/*.spec.js\" --reporter mochawesome-uirecorder --bail", 24 | "singletest": "mocha --reporter mochawesome-uirecorder --bail", 25 | "paralleltest": "mocha-parallel-tests \"!(node_modules)/**/*.spec.js\" --reporter mochawesome-uirecorder --max-parallel 5 --bail" 26 | }, 27 | "author": "" 28 | } 29 | -------------------------------------------------------------------------------- /vuserver/script/nodejs/vtaas-v2default/run.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | if "%1" neq "" ( 4 | npm run singletest %1 %2 5 | ) else ( 6 | npm run paralleltest 7 | ) 8 | -------------------------------------------------------------------------------- /vuserver/script/nodejs/vtaas-v2default/run.sh: -------------------------------------------------------------------------------- 1 | if [ "$1" = "" ]; then 2 | npm run paralleltest 3 | else 4 | npm run singletest $1 $2 5 | fi 6 | -------------------------------------------------------------------------------- /vuserver/script/nodejs/vtaas-v2default/screenshots/readme.md: -------------------------------------------------------------------------------- 1 | Test screenshots saved here. -------------------------------------------------------------------------------- /vuserver/script/nodejs/vtaas-v2default/uploadfiles/readme.md: -------------------------------------------------------------------------------- 1 | Please save upload files here. 2 | -------------------------------------------------------------------------------- /vuserver/script/serializers.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | from rest_framework import serializers 5 | 6 | from .models import Script 7 | 8 | 9 | class ScriptSerializer(serializers.ModelSerializer): 10 | class Meta: 11 | model = Script 12 | fields = ('id', 'name', 'user', 'test_id', 'run_id', 'product', 13 | 'template', 'path', 'createtime', 'lastupdate') 14 | -------------------------------------------------------------------------------- /vuserver/script/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | from django.conf.urls import url 5 | from .views import Templates, ScriptDetail, GenerateScript, Download 6 | 7 | app_name = 'script' 8 | 9 | script_patterns = [ 10 | # generate 11 | url(r'^templates$', Templates.as_view(), name='api_templates'), 12 | url(r'^generate$', GenerateScript.as_view(), name='api_generate_script'), 13 | url(r'^scripts/(?P[\w\-]+)$', ScriptDetail.as_view(), name='api_script_detail'), 14 | url(r'^download/(?P[\w\-]+)$', Download.as_view(), name='api_download'), 15 | # configuration 16 | # url(r'^scriptsbyids/$', ScriptsByIds.as_view(), name='api_scripts_by_ids'), 17 | # url(r'^scriptevents/$', ScriptEvents.as_view(), name='api_script_events'), 18 | # url(r'^scriptsteps/$', ScriptSteps.as_view(), name='api_script_steps') 19 | ] 20 | -------------------------------------------------------------------------------- /vuserver/start_local.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | docker run --name vuserver_redis -d -p 6379:6379 redis:6 3 | source ~/dj22/bin/activate 4 | python manage.py makemigrations --settings=vuserver.settings.local 5 | python manage.py migrate --settings=vuserver.settings.local 6 | python manage.py runserver 0.0.0.0:9100 --settings=vuserver.settings.local -------------------------------------------------------------------------------- /vuserver/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuserver/static/favicon.ico -------------------------------------------------------------------------------- /vuserver/templates/404.html: -------------------------------------------------------------------------------- 1 | 5 | {% extends "base.html" %} 6 | 7 | {% block title %}Not Found{% endblock %} 8 | {% block header_text %}Not Found{% endblock %} 9 | 10 | {% block content %} 11 | 12 |

13 | Sorry, but we can't find that page. 14 |

15 | 16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /vuserver/templates/500.html: -------------------------------------------------------------------------------- 1 | 5 | {% extends "base.html" %} 6 | 7 | {% block title %}Server Error{% endblock %} 8 | {% block header_text %}Server Error{% endblock %} 9 | 10 | {% block content %} 11 | 12 |

13 | The server has encountered an internal error. Please try again later. 14 |

15 | 16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /vuserver/templates/base.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | {% load staticfiles %} 8 | {% csrf_token %} 9 | 10 | 11 | 12 | {% block title %}{% endblock %} 13 | 14 | 15 | 16 | 17 | 18 | {% block extra_head %}{% endblock %} 19 | 20 | 21 | {% block header %} 22 | {% endblock %} 23 |
24 | {% block content %} 25 | {% endblock %} 26 |
27 | {% block extra_body %} 28 | {% endblock %} 29 | 30 | 31 | -------------------------------------------------------------------------------- /vuserver/templates/browserprompt.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /vuserver/templates/capture.html: -------------------------------------------------------------------------------- 1 | 5 | {% extends "base.html" %} 6 | 7 | {% block title %}Capture-{{ cappure.captureid }}{% endblock %} 8 | {% block header %} 9 |
10 |

{{ capture.capturetime }}

11 |
12 | {% endblock %} 13 | {% block extra_body %} 14 | 15 | {% endblock %} -------------------------------------------------------------------------------- /vuserver/templates/captures.html: -------------------------------------------------------------------------------- 1 | 5 | {% extends "base.html" %} 6 | 7 | {% block title %}Capture-{{ cappure.captureid }}{% endblock %} 8 | {% block header %} 9 | {% endblock %} 10 | {% block extra_body %} 11 | {% for c in captures %} 12 |
13 |

{{ c.event }}@{{ c.capturetime }}

14 | 15 |
16 | {% endfor %} 17 | {% endblock %} -------------------------------------------------------------------------------- /vuserver/templates/live.html: -------------------------------------------------------------------------------- 1 | 5 | {% extends "base.html" %} 6 | 7 | {% block title %}{{ testcase.name }}{% endblock %} 8 | {% block header %} 9 |
10 |

{{ testcase.name }}

11 | 14 |
15 | {% endblock %} 16 | 17 | {% block extra_body %} 18 |
19 | {% for console in worker_consoles %} 20 | {% if forloop.counter0|divisibleby:3 %} 21 |
22 | {% endif %} 23 |
24 |
{{ console.locale }}
25 | 26 |
27 | {% if forloop.counter0|add:-2|divisibleby:3 %} 28 |
29 | {% endif %} 30 | {% endfor %} 31 | 32 | {% if not worker_consoles|length|divisibleby:3 %} 33 |
34 | {% endif %} 35 | 36 | 37 | {% endblock %} 38 | -------------------------------------------------------------------------------- /vuserver/templates/registration/login.html: -------------------------------------------------------------------------------- 1 | 5 | {% extends "base.html" %} 6 | 7 | {% block title %}Login{% endblock %} 8 | {% block header_text %}Login{% endblock %} 9 | 10 | {% block content %} 11 |
12 | {% csrf_token %} 13 | {{ form }} 14 | 15 |
16 | 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /vuserver/templates/testcases.html: -------------------------------------------------------------------------------- 1 | 5 | {% extends "base.html" %} 6 | 7 | {% block title %}G11n Test Service{% endblock %} 8 | {% block header %} 9 |
10 |

G11n Test Service

11 | 14 |
15 | {% endblock %} 16 | {% block content %} 17 | 18 | 33 | 34 | 35 | {% endblock %} -------------------------------------------------------------------------------- /vuserver/templates/xy.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 10 | 11 | 12 | 22 | 23 |
24 |
25 |
26 | 27 | 28 |
29 |
30 | 31 | 32 |
33 |
34 | 35 | 36 |
37 |
38 |
39 | 40 | 41 | -------------------------------------------------------------------------------- /vuserver/vuserver/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/vuserver/vuserver/__init__.py -------------------------------------------------------------------------------- /vuserver/vuserver/asgi.py: -------------------------------------------------------------------------------- 1 | import os 2 | import django 3 | from channels.routing import get_default_application 4 | 5 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "vuserver.settings.local") 6 | django.setup() 7 | application = get_default_application() -------------------------------------------------------------------------------- /vuserver/vuserver/routing.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | from channels.auth import AuthMiddlewareStack 5 | from channels.routing import ProtocolTypeRouter, URLRouter 6 | from django.conf.urls import url 7 | 8 | from parallel import consumers 9 | 10 | application = ProtocolTypeRouter({ 11 | # Channels will do this for you automatically. It's included here as an example. 12 | # "http": AsgiHandler, 13 | 14 | # Route all WebSocket requests to our custom chat handler. 15 | # We actually don't need the URLRouter here, but we've put it in for 16 | # illustration. Also note the inclusion of the AuthMiddlewareStack to 17 | # add users and sessions - see http://channels.readthedocs.io/en/latest/topics/authentication.html 18 | "websocket": AuthMiddlewareStack( 19 | URLRouter([ 20 | # URLRouter just takes standard Django path() or url() entries. 21 | url(r'subscribe/$', consumers.WSConsumer), 22 | url(r'status/(?P[^/]+)/$', consumers.StatusConsumer), 23 | ]), 24 | ), 25 | }) -------------------------------------------------------------------------------- /vuserver/vuserver/settings/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | settings_module = os.environ.get("DJANGO_SETTINGS_MODULE", "") 3 | if settings_module.find('local') > 0: 4 | from .local import * 5 | elif settings_module.find('staging') > 0: 6 | from .staging import * 7 | elif settings_module.find('decc') > 0: 8 | from .staging import * 9 | -------------------------------------------------------------------------------- /vuserver/vuserver/settings/decc.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | from .base import * 5 | 6 | ALLOWED_HOSTS = ['*'] 7 | 8 | MYSQL_HOST = 'staging.tawa.vmware.com' 9 | MYSQL_PORT = '3306' 10 | MYSQL_USER = 'vmware' 11 | MYSQL_PASS = 'vmware' 12 | MYSQL_DB = 'tawa' 13 | 14 | DATABASES = { 15 | 'default': { 16 | 'ENGINE': 'django.db.backends.mysql', 17 | 'NAME': MYSQL_DB, 18 | 'USER': MYSQL_USER, 19 | 'PASSWORD': MYSQL_PASS, 20 | 'HOST': MYSQL_HOST, 21 | 'PORT': MYSQL_PORT, 22 | 'CHARSET': 'utf8' 23 | } 24 | } 25 | 26 | CONSOLE_POOLS = { 27 | "public": { 28 | 'type': 'remote', 29 | 'upload_console_files': 'true', 30 | 'hosts': { 31 | "staging.tawa.vmware.com": {'user': 'root', 'pass': 'tawa', 'port': 22} 32 | } 33 | } 34 | } 35 | 36 | WORKER_IMAGE = 'harbor-repo.vmware.com/vtaas_workers/parallel:tawa' 37 | LOCALHOST_IP = 'vuserver.ara.decc.vmware.com' 38 | PARALLEL_SERVER = LOCALHOST_IP + ':9100' 39 | VNC_MAPPING = {} 40 | 41 | USE_TZ = False 42 | WEBSOCKET_SERVER = 'ws://' + LOCALHOST_IP + ':9100' 43 | SCRIPT_TEMPLATES = { 44 | 'nodejs/vtaas-v2default': { 45 | "packages": { 46 | 'common': os.path.join(BASE_DIR, 'script/nodejs/vtaas-v2default', 47 | 'common'), 48 | }, 49 | "actions_mappings": { 50 | } 51 | } 52 | } 53 | 54 | STORAGE_ROOT = '/var/tawa_files/' 55 | os.makedirs(STORAGE_ROOT, exist_ok=True) 56 | SCRIPTS_ROOT = os.path.join(STORAGE_ROOT, 'scripts') 57 | os.makedirs(SCRIPTS_ROOT, exist_ok=True) 58 | CONSOLES_ROOT = os.path.join(STORAGE_ROOT, 'consoles') 59 | os.makedirs(CONSOLES_ROOT, exist_ok=True) 60 | DOWNLOADS_ROOT = os.path.join(STORAGE_ROOT, 'downloads') 61 | os.makedirs(DOWNLOADS_ROOT, exist_ok=True) 62 | VIDEOS_ROOT = os.path.join(STORAGE_ROOT, 'videos') 63 | os.makedirs(VIDEOS_ROOT, exist_ok=True) 64 | # HTTP_PROXY = "http://proxy.vmware.com:3128" 65 | # HTTPS_PROXY = "https://proxy.vmware.com:3128" 66 | -------------------------------------------------------------------------------- /vuserver/vuserver/settings/local.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | import socket 4 | 5 | from .base import * 6 | # from ssserver.settings import * 7 | 8 | ALLOWED_HOSTS = ['*'] 9 | CORS_ALLOW_CREDENTIALS = True 10 | CORS_ORIGIN_ALLOW_ALL = True 11 | 12 | CONSOLE_POOLS = { 13 | "default": { 14 | 'type': 'localhost' 15 | } 16 | } 17 | DEFAULT_POOL = 'default' 18 | WORKER_IMAGE = 'localhost:5000/parallel:master' 19 | 20 | LOCALHOST_IP = '192.168.0.6' 21 | PARALLEL_SERVER = LOCALHOST_IP + ':9100' 22 | VNC_MAPPING = {} 23 | 24 | USE_TZ = False 25 | WEBSOCKET_SERVER = 'ws://' + LOCALHOST_IP + ':9100' 26 | SCRIPT_TEMPLATES = { 27 | 'nodejs/vtaas-v2default': { 28 | "packages": { 29 | 'common': os.path.join(BASE_DIR, 'script/nodejs/vtaas-v2default', 'common'), 30 | }, 31 | "actions_mappings": { 32 | } 33 | } 34 | } 35 | 36 | STORAGE_ROOT = os.path.join(BASE_DIR, "log") 37 | os.makedirs(STORAGE_ROOT, exist_ok=True) 38 | SCRIPTS_ROOT = os.path.join(STORAGE_ROOT, 'scripts') 39 | os.makedirs(SCRIPTS_ROOT, exist_ok=True) 40 | CONSOLES_ROOT = os.path.join(STORAGE_ROOT, 'consoles') 41 | os.makedirs(CONSOLES_ROOT, exist_ok=True) 42 | DOWNLOADS_ROOT = os.path.join(STORAGE_ROOT, 'downloads') 43 | os.makedirs(DOWNLOADS_ROOT, exist_ok=True) 44 | VIDEOS_ROOT = os.path.join(STORAGE_ROOT, 'videos') 45 | os.makedirs(VIDEOS_ROOT, exist_ok=True) 46 | # HTTP_PROXY = "http://proxy.vmware.com:3128" 47 | # HTTPS_PROXY = "https://proxy.vmware.com:3128" -------------------------------------------------------------------------------- /vuserver/vuserver/settings/staging.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | import socket 4 | 5 | from .base import * 6 | 7 | ALLOWED_HOSTS = ['*'] 8 | CORS_ALLOW_CREDENTIALS = True 9 | CORS_ORIGIN_ALLOW_ALL = True 10 | 11 | MYSQL_HOST = 'staging.tawa.vmware.com' 12 | MYSQL_PORT = '3306' 13 | MYSQL_USER = 'vmware' 14 | MYSQL_PASS = 'vmware' 15 | MYSQL_DB = 'app_tawa' 16 | 17 | DATABASES = { 18 | 'default': { 19 | 'ENGINE': 'django.db.backends.mysql', 20 | 'NAME': MYSQL_DB, 21 | 'USER': MYSQL_USER, 22 | 'PASSWORD': MYSQL_PASS, 23 | 'HOST': MYSQL_HOST, 24 | 'PORT': MYSQL_PORT, 25 | 'CHARSET': 'utf8' 26 | } 27 | } 28 | 29 | CONSOLE_POOLS = { 30 | "public": { 31 | 'type': 'remote', 32 | 'upload_console_files': 'true', 33 | 'hosts': { 34 | "staging.tawa.vmware.com": {'user':'root', 'pass':'tawa', 'port':22} 35 | } 36 | } 37 | } 38 | DEFAULT_POOL = 'public' 39 | WORKER_IMAGE = 'harbor-repo.vmware.com/vtaas_workers/parallel:tawa' 40 | 41 | LOCALHOST_IP = 'vuserver.ara.decc.vmware.com' 42 | PARALLEL_SERVER = LOCALHOST_IP + ':9100' 43 | VNC_MAPPING = {} 44 | 45 | USE_TZ = False 46 | WEBSOCKET_SERVER = 'ws://' + LOCALHOST_IP + ':9101' 47 | SCRIPT_TEMPLATES = { 48 | 'nodejs/vtaas-v2default': { 49 | "packages": { 50 | 'common': os.path.join(BASE_DIR, 'script/nodejs/vtaas-v2default', 'common'), 51 | }, 52 | "actions_mappings": { 53 | } 54 | } 55 | } 56 | 57 | HTTP_ACCESSIBILITY_SERVER = 'http://vms.eng.vmware.com:9004' 58 | EXT_ACCESSIBILITY_ENABLE = 'true' 59 | 60 | STORAGE_ROOT = '/tawa/' 61 | os.makedirs(STORAGE_ROOT, exist_ok=True) 62 | SCRIPTS_ROOT = os.path.join(STORAGE_ROOT, 'scripts') 63 | os.makedirs(SCRIPTS_ROOT, exist_ok=True) 64 | CONSOLES_ROOT = os.path.join(STORAGE_ROOT, 'consoles') 65 | os.makedirs(CONSOLES_ROOT, exist_ok=True) 66 | DOWNLOADS_ROOT = os.path.join(STORAGE_ROOT, 'downloads') 67 | os.makedirs(DOWNLOADS_ROOT, exist_ok=True) 68 | VIDEOS_ROOT = os.path.join(STORAGE_ROOT, 'videos') 69 | os.makedirs(VIDEOS_ROOT, exist_ok=True) 70 | # HTTP_PROXY = "http://proxy.vmware.com:3128" 71 | # HTTPS_PROXY = "https://proxy.vmware.com:3128" -------------------------------------------------------------------------------- /vuserver/vuserver/settings/test.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | import socket 4 | 5 | from .base import * 6 | 7 | ALLOWED_HOSTS = ['*'] 8 | CORS_ALLOW_CREDENTIALS = True 9 | CORS_ORIGIN_ALLOW_ALL = True 10 | HTTP_SCREENSHOT_SERVER = "http://127.0.0.1:5000" 11 | 12 | CONSOLE_POOLS = { 13 | "public": { 14 | 'type': 'remote', 15 | 'upload_console_files': 'true', 16 | 'hosts': { 17 | "staging.tawa.vmware.com": {'user':'root', 'pass':'tawa', 'port':22} 18 | } 19 | } 20 | } 21 | DEFAULT_POOL = 'public' 22 | WORKER_IMAGE = 'harbor-repo.vmware.com/vtaas_workers/parallel:tawa' 23 | 24 | LOCALHOST_IP = '192.168.0.6' 25 | PARALLEL_SERVER = LOCALHOST_IP + ':9100' 26 | VNC_MAPPING = {} 27 | 28 | USE_TZ = False 29 | WEBSOCKET_SERVER = 'ws://' + LOCALHOST_IP + ':9100' 30 | SCRIPT_TEMPLATES = { 31 | 'nodejs/vtaas-v2default': { 32 | "packages": { 33 | 'common': os.path.join(BASE_DIR, 'script/nodejs/vtaas-v2default', 'common'), 34 | }, 35 | "actions_mappings": { 36 | } 37 | } 38 | } 39 | 40 | HTTP_ACCESSIBILITY_SERVER = 'http://vms.eng.vmware.com:9004' 41 | EXT_ACCESSIBILITY_ENABLE = 'true' 42 | 43 | STORAGE_ROOT = os.path.join(BASE_DIR, "log") 44 | os.makedirs(STORAGE_ROOT, exist_ok=True) 45 | SCRIPTS_ROOT = os.path.join(STORAGE_ROOT, 'scripts') 46 | os.makedirs(SCRIPTS_ROOT, exist_ok=True) 47 | CONSOLES_ROOT = os.path.join(STORAGE_ROOT, 'consoles') 48 | os.makedirs(CONSOLES_ROOT, exist_ok=True) 49 | DOWNLOADS_ROOT = os.path.join(STORAGE_ROOT, 'downloads') 50 | os.makedirs(DOWNLOADS_ROOT, exist_ok=True) 51 | VIDEOS_ROOT = os.path.join(STORAGE_ROOT, 'videos') 52 | os.makedirs(VIDEOS_ROOT, exist_ok=True) 53 | # HTTP_PROXY = "http://proxy.vmware.com:3128" 54 | # HTTPS_PROXY = "https://proxy.vmware.com:3128" 55 | -------------------------------------------------------------------------------- /vuserver/vuserver/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | from django.conf.urls import include, url 5 | from django.contrib import admin 6 | from parallel.urls import parallel_patterns 7 | from script.urls import script_patterns 8 | from container_pool.urls import pool_patterns 9 | from django.conf import settings 10 | from django.contrib.auth.views import LoginView, LogoutView 11 | from django.views.generic.base import RedirectView 12 | from django.conf.urls.static import static 13 | from django.http import HttpResponse 14 | from rest_framework import permissions 15 | from drf_yasg.views import get_schema_view 16 | from drf_yasg import openapi 17 | 18 | schema_view = get_schema_view( 19 | openapi.Info( 20 | title="Test Automation for Web Applications(TAWA) APIs", 21 | default_version='v1', 22 | description="TAWA is a next generation tool for automated testing of web applications.", 23 | contact=openapi.Contact(email="etcp-dev@vmware.com"), 24 | license=openapi.License(name="Apache 2.0"), 25 | ), 26 | public=True, 27 | permission_classes=(permissions.AllowAny,) 28 | ) 29 | 30 | admin.site.site_header = u'VUServer Management' 31 | favicon_view = RedirectView.as_view(url='/static/favicon.ico', permanent=True) 32 | 33 | 34 | def index(request): 35 | return HttpResponse("success") 36 | 37 | 38 | urlpatterns = [ 39 | url(r'^$', index, name='success'), 40 | url(r'^favicon\.ico$', favicon_view), 41 | url(r'^accounts/login/$', LoginView.as_view(), name='login'), 42 | url(r'^accounts/logout/$', LogoutView.as_view(), name='logout'), 43 | url(r'^parallel/', include(parallel_patterns), name='parallel'), 44 | url(r'^script/', include(script_patterns), name='script'), 45 | url(r'^pool/', include(pool_patterns), name='pool'), 46 | url(r'^admin/', admin.site.urls, name='admin'), 47 | # url(r'', index), 48 | url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), 49 | 50 | url(r'^swagger(?P\.json|\.yaml)$', schema_view.without_ui(cache_timeout=0), name='schema-json'), 51 | url(r'^swagger/$', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'), 52 | url(r'^redoc/$', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'), 53 | ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) 54 | -------------------------------------------------------------------------------- /vuserver/vuserver/wsgi.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | 5 | import os 6 | 7 | from django.core.wsgi import get_wsgi_application 8 | 9 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "vuserver.settings.local") 10 | 11 | application = get_wsgi_application() 12 | -------------------------------------------------------------------------------- /workers/parallel/.bash_profile: -------------------------------------------------------------------------------- 1 | # export http_proxy="http://proxy.com:3128" 2 | # export https_proxy="https://proxy.com:3128" 3 | -------------------------------------------------------------------------------- /workers/parallel/.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !src 3 | -------------------------------------------------------------------------------- /workers/parallel/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Explicitly declare text files we want to always be normalized and converted 5 | # to native line endings on checkout. 6 | *.c text 7 | *.h text 8 | *.sah text 9 | *.suite text 10 | *.inc text 11 | *.js text 12 | *.json text 13 | 14 | # Declare files that will always have CRLF line endings on checkout. 15 | *.sln text eol=crlf 16 | 17 | # Denote all files that are truly binary and should not be modified. 18 | *.png binary 19 | *.jpg binary 20 | -------------------------------------------------------------------------------- /workers/parallel/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .idea 3 | *.iml 4 | *.log -------------------------------------------------------------------------------- /workers/parallel/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | FROM ubuntu:16.04 5 | 6 | MAINTAINER vTaaS "etcp-dev@vmware.com" 7 | ENV REFRESHED_AT 2022-01-07 8 | 9 | ## Connection ports for controlling the UI: 10 | # VNC port:5901 11 | # noVNC webport, connect via http://IP:6901/?password=vncpassword 12 | ENV DISPLAY :1 13 | ENV VNC_PORT 5901 14 | ENV NO_VNC_PORT 6901 15 | EXPOSE $VNC_PORT $NO_VNC_PORT 16 | 17 | ENV HOME /headless 18 | ENV STARTUPDIR /dockerstartup 19 | WORKDIR $HOME 20 | 21 | ### Envrionment config 22 | ENV DEBIAN_FRONTEND noninteractive 23 | ENV NO_VNC_HOME $HOME/noVNC 24 | ENV VNC_COL_DEPTH 24 25 | ENV VNC_RESOLUTION 1280x1024 26 | ENV VNC_PW vncpassword 27 | 28 | ### Add all install scripts for further steps 29 | ENV INST_SCRIPTS $HOME/install 30 | ADD ./src/common/install/ $INST_SCRIPTS/ 31 | ADD ./src/ubuntu/install/ $INST_SCRIPTS/ 32 | RUN find $INST_SCRIPTS -name '*.py' -exec chmod a+x {} + 33 | RUN find $INST_SCRIPTS -name '*.sh' -exec chmod a+x {} + 34 | 35 | ### Install some common tools 36 | RUN $INST_SCRIPTS/tools.sh 37 | 38 | ### Install xvnc-server & noVNC - HTML5 based VNC viewer 39 | RUN $INST_SCRIPTS/tigervnc.sh 40 | RUN $INST_SCRIPTS/no_vnc.sh 41 | 42 | ### Install firfox and chrome browser 43 | RUN pwd 44 | RUN $INST_SCRIPTS/firefox.sh 45 | RUN $INST_SCRIPTS/chrome.sh 46 | 47 | ### Install xfce UI 48 | RUN $INST_SCRIPTS/xfce_ui.sh 49 | ADD ./src/common/xfce/ $HOME/ 50 | 51 | ### xstartup 52 | ADD ./src/ubuntu/.vnc/xstartup $HOME/.vnc/ 53 | 54 | ### configure startup 55 | RUN $INST_SCRIPTS/libnss_wrapper.sh 56 | ADD ./src/common/scripts $STARTUPDIR 57 | RUN $INST_SCRIPTS/set_user_permission.sh $STARTUPDIR $HOME 58 | 59 | 60 | ### Install java 61 | RUN wget https://d3pxv6yz143wms.cloudfront.net/8.212.04.2/java-1.8.0-amazon-corretto-jdk_8.212.04-2_amd64.deb && \ 62 | apt-get update && apt-get install java-common && apt-get install -y --no-install-recommends apt-utils && \ 63 | dpkg --install java-1.8.0-amazon-corretto-jdk_8.212.04-2_amd64.deb && rm java-1.8.0-amazon-corretto-jdk_8.212.04-2_amd64.deb 64 | 65 | RUN apt-get update && apt-get install -y --fix-missing \ 66 | gstreamer1.0-plugins-good \ 67 | gstreamer1.0-pulseaudio \ 68 | gstreamer1.0-tools \ 69 | libglu1-mesa \ 70 | libgtk2.0-0 \ 71 | libncursesw5 \ 72 | libopenal1 \ 73 | libsdl-image1.2 \ 74 | libsdl-ttf2.0-0 \ 75 | libsdl1.2debian \ 76 | libsndfile1 \ 77 | pulseaudio \ 78 | supervisor \ 79 | ucspi-tcp && \ 80 | apt-get clean 81 | 82 | 83 | ### chrome startup 84 | RUN pwd 85 | ENV EXT_DIR /ext 86 | ENV BROWSER_LOCALE zh_CN 87 | ADD ./src/ext $EXT_DIR 88 | RUN $INST_SCRIPTS/set_user_permission.sh $EXT_DIR 89 | 90 | RUN pwd 91 | 92 | ### add crt 93 | ENV CRT_DIR /crt 94 | ADD ./src/crt $CRT_DIR 95 | 96 | USER 1984 97 | 98 | ENTRYPOINT ["/dockerstartup/vnc_startup.sh"] 99 | CMD ["--tail-log"] 100 | -------------------------------------------------------------------------------- /workers/parallel/build_image.sh: -------------------------------------------------------------------------------- 1 | # Copyright 2022 VMware, Inc. 2 | # SPDX-License-Identifier: Apache License 2.0 3 | 4 | docker build -t localhost:5000/parallel:latest . 5 | # docker build -t vtaas-nfs-stage.eng.vmware.com:5000/parallel:latest . 6 | # docker push vtaas-nfs-stage.eng.vmware.com:5000/parallel:latest 7 | -------------------------------------------------------------------------------- /workers/parallel/src/common/install/no_vnc.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### every exit != 0 fails the script 3 | set -e 4 | 5 | echo "Install noVNC - HTML5 based VNC viewer" 6 | 7 | mkdir -p $NO_VNC_HOME/utils/websockify 8 | # wget -qO- https://github.com/kanaka/noVNC/archive/v0.6.1.tar.gz | tar xz --strip 1 -C $NO_VNC_HOME 9 | # wget -qO- https://github.com/novnc/noVNC/archive/v1.0.0.tar.gz | tar xz --strip 1 -C $NO_VNC_HOME 10 | wget -qO- https://github.com/elgalu/noVNC/archive/9223e8f2d1c207fb74cb4b8cc243e59d84f9e2f6.tar.gz | tar xz --strip 1 -C $NO_VNC_HOME 11 | wget -qO- https://github.com/novnc/websockify/archive/v0.8.0.tar.gz | tar xz --strip 1 -C $NO_VNC_HOME/utils/websockify 12 | chmod +x -v $NO_VNC_HOME/utils/*.sh 13 | ## create index.html to forward automatically to `vnc_auto.html` 14 | # ln -s $NO_VNC_HOME/vnc_lite.html $NO_VNC_HOME/index.html -------------------------------------------------------------------------------- /workers/parallel/src/common/install/set_user_permission.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### every exit != 0 fails the script 3 | set -e 4 | 5 | for var in "$@" 6 | do 7 | echo "fix permissions for: $var" 8 | find "$var"/ -name '*.sh' -exec chmod -v a+x {} + 9 | find "$var"/ -name '*.desktop' -exec chmod -v a+x {} + 10 | chgrp -R 0 "$var" && chmod -R -v a+rw "$var" && find "$var" -type d -exec chmod -v a+x {} + 11 | done -------------------------------------------------------------------------------- /workers/parallel/src/common/scripts/chrome-init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### every exit != 0 fails the script 3 | set -e 4 | 5 | VNC_RES_W=${VNC_RESOLUTION%x*} 6 | VNC_RES_H=${VNC_RESOLUTION#*x} 7 | 8 | echo -e "\n------------------ update chromium-browser.init ------------------" 9 | echo -e "\n... set window size $VNC_RES_W x $VNC_RES_H as chrome window size!\n" 10 | 11 | echo "CHROMIUM_FLAGS='--no-sandbox --user-data-dir --window-size=$VNC_RES_W,$VNC_RES_H --window-position=0,0'" > $HOME/.chromium-browser.init -------------------------------------------------------------------------------- /workers/parallel/src/common/scripts/firefox-init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### every exit != 0 fails the script 3 | set -e 4 | 5 | VNC_RES_W=${VNC_RESOLUTION%x*} 6 | VNC_RES_H=${VNC_RESOLUTION#*x} 7 | 8 | echo -e "\n------------------ update firefox.init ------------------" 9 | echo -e "\n... set window size $VNC_RES_W x $VNC_RES_H as firefox window size!\n" 10 | 11 | echo "FIREFOX_FLAGS='--no-sandbox --user-data-dir --window-size=$VNC_RES_W,$VNC_RES_H --window-position=0,0'" > $HOME/.firefox.init 12 | -------------------------------------------------------------------------------- /workers/parallel/src/common/scripts/generate_container_user: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Set current user in nss_wrapper 4 | USER_ID=$(id -u) 5 | GROUP_ID=$(id -g) 6 | echo "USER_ID: $USER_ID, GROUP_ID: $GROUP_ID" 7 | 8 | if [ x"$USER_ID" != x"0" ]; then 9 | 10 | NSS_WRAPPER_PASSWD=/tmp/passwd 11 | NSS_WRAPPER_GROUP=/etc/group 12 | 13 | cat /etc/passwd > $NSS_WRAPPER_PASSWD 14 | 15 | echo "default:x:${USER_ID}:${GROUP_ID}:Default Application User:${HOME}:/bin/bash" >> $NSS_WRAPPER_PASSWD 16 | 17 | export NSS_WRAPPER_PASSWD 18 | export NSS_WRAPPER_GROUP 19 | 20 | if [ -r /usr/lib/libnss_wrapper.so ]; then 21 | LD_PRELOAD=/usr/lib/libnss_wrapper.so 22 | elif [ -r /usr/lib64/libnss_wrapper.so ]; then 23 | LD_PRELOAD=/usr/lib64/libnss_wrapper.so 24 | else 25 | echo "no libnss_wrapper.so installed!" 26 | exit 1 27 | fi 28 | echo "nss_wrapper location: $LD_PRELOAD" 29 | export LD_PRELOAD 30 | fi 31 | -------------------------------------------------------------------------------- /workers/parallel/src/common/xfce/.config/bg_sakuli.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/workers/parallel/src/common/xfce/.config/bg_sakuli.png -------------------------------------------------------------------------------- /workers/parallel/src/common/xfce/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /workers/parallel/src/common/xfce/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /workers/parallel/src/common/xfce/wm_startup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### every exit != 0 fails the script 3 | set -e 4 | 5 | echo -e "\n------------------ startup of Xfce4 window manager ------------------" 6 | 7 | ### disable screensaver and power management 8 | xset -dpms & 9 | xset s noblank & 10 | xset s off & 11 | 12 | /usr/bin/startxfce4 --replace > $HOME/wm.log & 13 | sleep 1 14 | cat $HOME/wm.log -------------------------------------------------------------------------------- /workers/parallel/src/ext/a.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/workers/parallel/src/ext/a.m4a -------------------------------------------------------------------------------- /workers/parallel/src/ext/config/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "server": "localhost:9000", 3 | "testcase": "289c84eb-7138-4c8e-bc72-9a536f2991f1", 4 | "role": "leader", 5 | "autostart": "false", 6 | "replay": "false", 7 | "sendverify": "false", 8 | "prodjs": "default.js", 9 | "accessibility": "false", 10 | "description": "this is a description" 11 | } -------------------------------------------------------------------------------- /workers/parallel/src/ext/css/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: verdana; 3 | font-size: 80%; 4 | text-decoration: none; 5 | color: #555753; 6 | background: #ffffff; 7 | margin: 0px; 8 | } 9 | 10 | 11 | form { 12 | background-color: #FFF; 13 | height: 260px; 14 | width: 680px; 15 | margin-right: auto; 16 | margin-left: auto; 17 | margin-top: 0px; 18 | border-top-left-radius: 10px; 19 | border-top-right-radius: 10px; 20 | padding: 0px; 21 | text-align:left; 22 | margin-top: 12px; 23 | } 24 | 25 | label { 26 | font-family: Georgia, "Times New Roman", Times, serif; 27 | font-size: 18px; 28 | color: #333; 29 | height: 26px; 30 | width: 180px; 31 | margin-left: 10px; 32 | margin-top: 12px; 33 | text-align: right; 34 | vertical-align: bottom; 35 | margin-right:15px; 36 | display: inline-block; 37 | } 38 | 39 | input { 40 | font-size: 16px; 41 | height: 25px; 42 | width: 400px; 43 | border: 1px solid #000; 44 | margin-top: 10px; 45 | } 46 | 47 | button { 48 | font-size: 16px; 49 | height: 25px; 50 | width: 75px; 51 | border: 1px solid #000; 52 | margin-top: 10px; 53 | } 54 | 55 | select { 56 | font-size: 16px; 57 | height: 25px; 58 | width: 320px; 59 | border: 1px solid #000; 60 | margin-top: 10px; 61 | } 62 | 63 | form input[type='submit'] { 64 | font-family: Georgia, "Times New Roman", Times, serif; 65 | font-size: 18px; 66 | color: #333; 67 | height: 30px; 68 | width: 120px; 69 | margin-top: 30px; 70 | margin-left: 30px; 71 | text-align: center; 72 | margin-right:15px; 73 | float:left; 74 | } 75 | 76 | label.control-panel { 77 | font-size: 16px; 78 | color: #000; 79 | height: 26px; 80 | width: 375px; 81 | margin: 12px 0 0 3px; 82 | text-align: left; 83 | vertical-align: middle; 84 | display: inline-block; 85 | } 86 | 87 | input#control-panel { 88 | width:25px; 89 | margin: 0; 90 | vertical-align: middle; 91 | } -------------------------------------------------------------------------------- /workers/parallel/src/ext/icons/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/workers/parallel/src/ext/icons/icon128.png -------------------------------------------------------------------------------- /workers/parallel/src/ext/icons/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/workers/parallel/src/ext/icons/icon16.png -------------------------------------------------------------------------------- /workers/parallel/src/ext/icons/icon19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/workers/parallel/src/ext/icons/icon19.png -------------------------------------------------------------------------------- /workers/parallel/src/ext/icons/icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/workers/parallel/src/ext/icons/icon48.png -------------------------------------------------------------------------------- /workers/parallel/src/ext/init.html: -------------------------------------------------------------------------------- 1 | TAWA plugin is initializing... -------------------------------------------------------------------------------- /workers/parallel/src/ext/js/jquery-editable-select/jquery-editable-select.css: -------------------------------------------------------------------------------- 1 | /** 2 | * jQuery Editable Select 3 | * Indri Muska 4 | * 5 | * Source on GitHub @ https://github.com/indrimuska/jquery-editable-select 6 | */ 7 | 8 | input.es-input { padding-right: 20px !important; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAICAYAAADJEc7MAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAG2YAABzjgAA4DIAAIM2AAB5CAAAxgwAADT6AAAgbL5TJ5gAAABGSURBVHjaYvz//z8DOYCJgUzA0tnZidPK8vJyRpw24pLEpwnuVHRFhDQxMDAwMPz//x+OOzo6/iPz8WFGuocqAAAA//8DAD/sORHYg7kaAAAAAElFTkSuQmCC) right center no-repeat; } 9 | input.es-input.open { 10 | -webkit-border-bottom-left-radius: 0; -moz-border-radius-bottomleft: 0; border-bottom-left-radius: 0; 11 | -webkit-border-bottom-right-radius: 0; -moz-border-radius-bottomright: 0; border-bottom-right-radius: 0; } 12 | .es-list { position: absolute; padding: 0; margin: 0; border: 1px solid #d1d1d1; display: none; z-index: 1000; background: #fff; max-height: 160px; overflow-y: auto; 13 | -moz-box-shadow: 0 2px 3px #ccc; -webkit-box-shadow: 0 2px 3px #ccc; box-shadow: 0 2px 3px #ccc; } 14 | .es-list li { display: block; padding: 5px 10px; margin: 0; } 15 | .es-list li.selected { background: #f3f3f3; } 16 | .es-list li[disabled] { opacity: .5; } -------------------------------------------------------------------------------- /workers/parallel/src/ext/js/jquery-ui/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright jQuery Foundation and other contributors, https://jquery.org/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/jquery/jquery-ui 6 | 7 | The following license applies to all parts of this software except as 8 | documented below: 9 | 10 | ==== 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be 21 | included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | ==== 32 | 33 | Copyright and related rights for sample code are waived via CC0. Sample 34 | code is defined as all source code contained within the demos directory. 35 | 36 | CC0: http://creativecommons.org/publicdomain/zero/1.0/ 37 | 38 | ==== 39 | 40 | All files located in the node_modules and external directories are 41 | externally maintained libraries used by this software which have their 42 | own licenses; we recommend you read them, as their terms may differ from 43 | the terms above. 44 | -------------------------------------------------------------------------------- /workers/parallel/src/ext/js/jquery-ui/images/ui-icons_444444_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/workers/parallel/src/ext/js/jquery-ui/images/ui-icons_444444_256x240.png -------------------------------------------------------------------------------- /workers/parallel/src/ext/js/jquery-ui/images/ui-icons_555555_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/workers/parallel/src/ext/js/jquery-ui/images/ui-icons_555555_256x240.png -------------------------------------------------------------------------------- /workers/parallel/src/ext/js/jquery-ui/images/ui-icons_777620_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/workers/parallel/src/ext/js/jquery-ui/images/ui-icons_777620_256x240.png -------------------------------------------------------------------------------- /workers/parallel/src/ext/js/jquery-ui/images/ui-icons_777777_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/workers/parallel/src/ext/js/jquery-ui/images/ui-icons_777777_256x240.png -------------------------------------------------------------------------------- /workers/parallel/src/ext/js/jquery-ui/images/ui-icons_cc0000_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/workers/parallel/src/ext/js/jquery-ui/images/ui-icons_cc0000_256x240.png -------------------------------------------------------------------------------- /workers/parallel/src/ext/js/jquery-ui/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/test-automation-for-web-applications/3344dd41b965f303ed2defd6d7e0ccb4a1849197/workers/parallel/src/ext/js/jquery-ui/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /workers/parallel/src/ext/js/jquery-ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-ui", 3 | "title": "jQuery UI", 4 | "description": "A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.", 5 | "version": "1.13.1", 6 | "homepage": "http://jqueryui.com", 7 | "author": { 8 | "name": "jQuery Foundation and other contributors", 9 | "url": "https://github.com/jquery/jquery-ui/blob/1.13.1/AUTHORS.txt" 10 | }, 11 | "main": "ui/widget.js", 12 | "maintainers": [ 13 | { 14 | "name": "Jörn Zaefferer", 15 | "email": "joern.zaefferer@gmail.com", 16 | "url": "http://bassistance.de" 17 | }, 18 | { 19 | "name": "Mike Sherov", 20 | "email": "mike.sherov@gmail.com", 21 | "url": "http://mike.sherov.com" 22 | }, 23 | { 24 | "name": "TJ VanToll", 25 | "email": "tj.vantoll@gmail.com", 26 | "url": "http://tjvantoll.com" 27 | }, 28 | { 29 | "name": "Felix Nagel", 30 | "email": "info@felixnagel.com", 31 | "url": "http://www.felixnagel.com" 32 | }, 33 | { 34 | "name": "Alex Schmitz", 35 | "email": "arschmitz@gmail.com", 36 | "url": "https://github.com/arschmitz" 37 | } 38 | ], 39 | "repository": { 40 | "type": "git", 41 | "url": "git://github.com/jquery/jquery-ui.git" 42 | }, 43 | "bugs": { 44 | "url": "https://github.com/jquery/jquery-ui/issues" 45 | }, 46 | "license": "MIT", 47 | "scripts": { 48 | "test": "grunt" 49 | }, 50 | "dependencies": { 51 | "jquery": ">=1.8.0 <4.0.0" 52 | }, 53 | "devDependencies": { 54 | "commitplease": "3.2.0", 55 | "eslint-config-jquery": "3.0.0", 56 | "glob": "7.2.0", 57 | "grunt": "1.5.3", 58 | "grunt-bowercopy": "1.2.5", 59 | "grunt-cli": "1.4.3", 60 | "grunt-compare-size": "0.4.2", 61 | "grunt-contrib-concat": "1.0.1", 62 | "grunt-contrib-csslint": "2.0.0", 63 | "grunt-contrib-qunit": "5.1.1", 64 | "grunt-contrib-requirejs": "1.0.0", 65 | "grunt-contrib-uglify": "5.0.1", 66 | "grunt-eslint": "23.0.0", 67 | "grunt-git-authors": "3.2.0", 68 | "grunt-html": "14.5.0", 69 | "load-grunt-tasks": "5.1.0", 70 | "rimraf": "3.0.2", 71 | "testswarm": "1.1.2" 72 | }, 73 | "keywords": [] 74 | } 75 | -------------------------------------------------------------------------------- /workers/parallel/src/ext/js/jquery/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | jquery-migrate.js 3 | jquery-migrate.min.js 4 | -------------------------------------------------------------------------------- /workers/parallel/src/ext/js/jquery/README.md: -------------------------------------------------------------------------------- 1 | jQuery Component 2 | ================ 3 | 4 | Shim repository for jQuery. 5 | -------------------------------------------------------------------------------- /workers/parallel/src/ext/js/jquery/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "version": "2.0.0", 4 | "description": "jQuery component", 5 | "keywords": [ 6 | "jquery", 7 | "component" 8 | ], 9 | "scripts": [ 10 | "jquery.js" 11 | ], 12 | "license": "MIT" 13 | } 14 | -------------------------------------------------------------------------------- /workers/parallel/src/ext/js/jquery/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "version": "2.0.0", 4 | "description": "jQuery component", 5 | "keywords": [ 6 | "jquery", 7 | "component" 8 | ], 9 | "scripts": [ 10 | "jquery.js" 11 | ], 12 | "license": "MIT", 13 | "gitHead": "46f8412bd1bb9b1b30b5b0eb88560e2d4196509c", 14 | "readme": "jQuery Component\n================\n\nShim repository for jQuery.\n", 15 | "readmeFilename": "README.md", 16 | "_id": "jquery@2.0.0", 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/components/jquery.git" 20 | } 21 | } -------------------------------------------------------------------------------- /workers/parallel/src/ext/js/jquery/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "components/jquery", 3 | "description": "jQuery JavaScript Library", 4 | "type": "component", 5 | "homepage": "http://jquery.com", 6 | "license": "MIT", 7 | "support": { 8 | "irc": "irc://irc.freenode.org/jquery", 9 | "issues": "http://bugs.jquery.com", 10 | "forum": "http://forum.jquery.com", 11 | "wiki": "http://docs.jquery.com/", 12 | "source": "https://github.com/jquery/jquery" 13 | }, 14 | "authors": [ 15 | { 16 | "name": "John Resig", 17 | "email": "jeresig@gmail.com" 18 | } 19 | ], 20 | "require": { 21 | "robloach/component-installer": "*" 22 | }, 23 | "extra": { 24 | "component": { 25 | "scripts": [ 26 | "jquery.js" 27 | ] 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /workers/parallel/src/ext/js/jquery/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "components-jquery", 3 | "version": "2.0.0", 4 | "description": "jQuery component", 5 | "keywords": ["jquery"], 6 | "main": "./jquery.js" 7 | } 8 | -------------------------------------------------------------------------------- /workers/parallel/src/ext/js/jsgrid/jsgrid.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jsGrid v1.5.3 (http://js-grid.com) 3 | * (c) 2016 Artem Tabalin 4 | * Licensed under MIT (https://github.com/tabalinas/jsgrid/blob/master/LICENSE) 5 | */ 6 | 7 | .jsgrid { 8 | position: relative; 9 | overflow: hidden; 10 | font-size: 1em; 11 | } 12 | 13 | .jsgrid, .jsgrid *, .jsgrid *:before, .jsgrid *:after { 14 | box-sizing: border-box; 15 | } 16 | 17 | .jsgrid input, 18 | .jsgrid textarea, 19 | .jsgrid select { 20 | font-size: 1em; 21 | } 22 | 23 | .jsgrid-grid-header { 24 | overflow-x: hidden; 25 | overflow-y: scroll; 26 | -webkit-user-select: none; 27 | -khtml-user-select: none; 28 | -moz-user-select: none; 29 | -ms-user-select: none; 30 | -o-user-select: none; 31 | user-select: none; 32 | } 33 | 34 | .jsgrid-grid-body { 35 | overflow-x: auto; 36 | overflow-y: scroll; 37 | -webkit-overflow-scrolling: touch; 38 | } 39 | 40 | .jsgrid-table { 41 | width: 100%; 42 | table-layout: fixed; 43 | border-collapse: collapse; 44 | border-spacing: 0; 45 | } 46 | 47 | .jsgrid-cell { 48 | padding: 0.5em 0.5em; 49 | } 50 | 51 | .jsgrid-сell, 52 | .jsgrid-header-cell { 53 | box-sizing: border-box; 54 | } 55 | 56 | .jsgrid-align-left { 57 | text-align: left; 58 | } 59 | 60 | .jsgrid-align-center, 61 | .jsgrid-align-center input, 62 | .jsgrid-align-center textarea, 63 | .jsgrid-align-center select { 64 | text-align: center; 65 | } 66 | 67 | .jsgrid-align-right, 68 | .jsgrid-align-right input, 69 | .jsgrid-align-right textarea, 70 | .jsgrid-align-right select { 71 | text-align: right; 72 | } 73 | 74 | .jsgrid-header-cell { 75 | padding: .5em .5em; 76 | } 77 | 78 | .jsgrid-filter-row input, 79 | .jsgrid-filter-row textarea, 80 | .jsgrid-filter-row select, 81 | .jsgrid-edit-row input, 82 | .jsgrid-edit-row textarea, 83 | .jsgrid-edit-row select, 84 | .jsgrid-insert-row input, 85 | .jsgrid-insert-row textarea, 86 | .jsgrid-insert-row select { 87 | width: 100%; 88 | padding: .3em .5em; 89 | } 90 | 91 | .jsgrid-filter-row input[type='checkbox'], 92 | .jsgrid-edit-row input[type='checkbox'], 93 | .jsgrid-insert-row input[type='checkbox'] { 94 | width: auto; 95 | } 96 | 97 | 98 | .jsgrid-selected-row .jsgrid-cell { 99 | cursor: pointer; 100 | } 101 | 102 | .jsgrid-nodata-row .jsgrid-cell { 103 | padding: .5em 0; 104 | text-align: center; 105 | } 106 | 107 | .jsgrid-header-sort { 108 | cursor: pointer; 109 | } 110 | 111 | .jsgrid-pager { 112 | padding: .5em 0; 113 | } 114 | 115 | .jsgrid-pager-nav-button { 116 | padding: .2em .6em; 117 | } 118 | 119 | .jsgrid-pager-nav-inactive-button { 120 | display: none; 121 | pointer-events: none; 122 | } 123 | 124 | .jsgrid-pager-page { 125 | padding: .2em .6em; 126 | } 127 | -------------------------------------------------------------------------------- /workers/parallel/src/ext/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Parallel Extension", 3 | "version": "0.1", 4 | "manifest_version": 2, 5 | "description": "Parallel Extension", 6 | "homepage_url": "http://www.github.com/", 7 | "chrome_url_overrides": { 8 | "newtab": "init.html" 9 | }, 10 | "icons": { 11 | "16": "icons/icon16.png", 12 | "48": "icons/icon48.png", 13 | "128": "icons/icon128.png" 14 | }, 15 | "browser_action": { 16 | "default_icon": "icons/icon48.png", 17 | "default_title": "Parallel Extension" 18 | }, 19 | "default_locale": "en", 20 | "background": { 21 | "scripts": [ 22 | "js/channels/reconnecting-websocket.js", 23 | "js/channels/websocketbridge.js", 24 | "js/jquery3/jquery.js", 25 | "js/axios/axios.js", 26 | "js/urijs/URI.min.js", 27 | "src/share/common.js", 28 | "src/bg/background.js" 29 | ], 30 | "persistent": true 31 | }, 32 | "incognito": "split", 33 | "content_scripts": [{ 34 | "matches": [""], 35 | "js": ["js/jquery/jquery.min.js", "src/share/common.js", "src/recorder.js", "src/cs/panel.js"], 36 | "css": ["src/cs/css/style.css"], 37 | "all_frames": true, 38 | "run_at": "document_start", 39 | "match_about_blank": true 40 | }], 41 | "permissions": [ 42 | "privacy", 43 | "debugger", 44 | "activeTab", 45 | "contextMenus", 46 | "cookies", 47 | "tabs", 48 | "background", 49 | "storage", 50 | "" 51 | ], 52 | "web_accessible_resources": [ 53 | "src/cs/*", 54 | "src/cs/screenshot/*", 55 | "src/product/*", 56 | "config/*.json" 57 | ], 58 | "offline_enabled": true, 59 | "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'" 60 | } 61 | -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/control.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | Parallel Extension 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 | 18 | 19 | 20 | 21 |
25 | 26 | 32 | 33 | 34 | 45 | 46 |
47 | 48 | 49 |
50 | 51 | 52 | 53 | 54 |
55 |
56 | 57 | 58 | -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/assertion/style.css: -------------------------------------------------------------------------------- 1 | .modal-dialog { 2 | position: fixed; 3 | top: 0; 4 | left: 0; 5 | width: 100vw; 6 | height: 100vh; 7 | max-width: 100vw; 8 | margin: 0; 9 | } 10 | 11 | .modal-container { 12 | margin: 15px; 13 | } -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/configuration/main.js: -------------------------------------------------------------------------------- 1 | import {vtaasMessage} from '/src/cs/content-message.js'; 2 | import {contentUtils, FrameDialog, RuntimeState} from '/src/cs/content-utils.js'; 3 | 4 | const ID_DIALOG = 'vtaas-dialog-configuration'; 5 | const ID_MODAL = '#configurationModal'; 6 | 7 | const ID_SERVER_INPUT = '#serverInput'; 8 | const ID_PORT_INPUT = '#portInput'; 9 | const ID_TESTCASE_INPUT = '#testcaseInput'; 10 | const ID_ROLE_SELECT = '#roleSelect'; 11 | const ID_NON_ASCII_SELECT = '#nonAsciiSelect'; 12 | const ID_MOUSEOVER_INPUT = '#mouseoverInput'; 13 | const ID_REPLAY_STATUS_INPUT = '#replayStatusInput'; 14 | 15 | $(ID_MODAL).on('hide.bs.modal', function(event) { 16 | FrameDialog.destroy(ID_DIALOG); 17 | }); 18 | 19 | $(ID_MODAL).on('shown.bs.modal', function (event) { 20 | chrome.runtime.sendMessage({action: "get_status"}, function(response) { 21 | $(ID_SERVER_INPUT).val(response.state.server); 22 | $(ID_PORT_INPUT).val(response.state.port); 23 | $(ID_TESTCASE_INPUT).val(response.state.testcaseUuid); 24 | $(ID_ROLE_SELECT).val(response.state.role); 25 | }); 26 | 27 | RuntimeState.getMouseOverWaitTime().then((waitTime) => { 28 | $(ID_MOUSEOVER_INPUT).val(waitTime.toString()); 29 | }); 30 | 31 | chrome.storage.local.get({'vtaasDefaultNonAsciiString': "表ポあA中Œ鷗停B逍"}, (result) => { 32 | $(ID_NON_ASCII_SELECT).val(result.vtaasDefaultNonAsciiString); 33 | }); 34 | 35 | chrome.storage.local.get({'vtaasReplayStatusVisible': true}, (result) => { 36 | $(ID_REPLAY_STATUS_INPUT).prop("checked", result.vtaasReplayStatusVisible); 37 | }); 38 | }); 39 | 40 | $('button#ok').on('click', function() { 41 | vtaasMessage.broadcast(vtaasMessage.CONFIG_CHANGED, { 42 | server: $(ID_SERVER_INPUT).val(), 43 | port: $(ID_PORT_INPUT).val(), 44 | testcaseUuid: $(ID_TESTCASE_INPUT).val(), 45 | role: $(ID_ROLE_SELECT).val() 46 | }); 47 | 48 | let mouseOverWait = parseInt($(ID_MOUSEOVER_INPUT).val(), 10); 49 | RuntimeState.setMouseOverWaitTime(mouseOverWait).then((result) => { 50 | console.debug("Successfully update mouseover waiting time: )" + result); 51 | }); 52 | 53 | chrome.storage.local.set({vtaasDefaultNonAsciiString: $(ID_NON_ASCII_SELECT).val()}); 54 | 55 | let replayStatusVisible = $(ID_REPLAY_STATUS_INPUT).prop("checked"); 56 | chrome.storage.local.set({vtaasReplayStatusVisible: replayStatusVisible}); 57 | const REPLAY_PROGRESS_DIALOG_ID = 'vtaas-dialog-replay-progress'; 58 | if (replayStatusVisible) { 59 | FrameDialog.show(REPLAY_PROGRESS_DIALOG_ID); 60 | } else { 61 | FrameDialog.hide(REPLAY_PROGRESS_DIALOG_ID); 62 | } 63 | 64 | $(ID_MODAL).modal('hide'); 65 | }); 66 | 67 | $(ID_MODAL).modal({backdrop: false}); 68 | contentUtils.resizeDialogByContentSize(ID_DIALOG, '.modal-dialog .modal-content'); -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/configuration/style.css: -------------------------------------------------------------------------------- 1 | .modal-dialog { 2 | position: fixed; 3 | top: 0; 4 | left: 0; 5 | width: 100vw; 6 | height: 100vh; 7 | max-width: 100vw; 8 | margin: 0; 9 | } 10 | 11 | .modal-container { 12 | margin: 15px; 13 | } 14 | 15 | #replayStatusInput { 16 | margin-left: 0; 17 | position: static; 18 | } -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/content-message.js: -------------------------------------------------------------------------------- 1 | import {vtaasMessage} from '/src/share/message.js'; 2 | 3 | vtaasMessage.init(false); 4 | 5 | export {vtaasMessage}; -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/content-slave.js: -------------------------------------------------------------------------------- 1 | if (vtaas.utils.isWorker()) { 2 | document.addEventListener("contextmenu", function(event) { 3 | event.preventDefault(); 4 | }, true); 5 | } 6 | 7 | export function sendReplayFinishedMessage(id, sn, result='success', errorMessage='') { 8 | let msg = { 9 | action: "replay-step-finished", 10 | data: { 11 | id: id, 12 | sn: sn, 13 | result: result, 14 | errorMessage: errorMessage 15 | } 16 | } 17 | chrome.runtime.sendMessage(msg); 18 | } -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/control-panel/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Parallel Extension 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 | 18 |
19 |
20 | 21 | -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/control-panel/style.css: -------------------------------------------------------------------------------- 1 | 2 | *, *::before, *::after { 3 | box-sizing: inherit; 4 | } 5 | 6 | body { 7 | background-color: transparent; 8 | margin: 0; 9 | } 10 | 11 | /* Control panel */ 12 | .vtaas-control-panel { 13 | padding: 0; 14 | border: 0; 15 | min-width: 0; 16 | background-color: transparent; 17 | box-sizing: border-box; 18 | color:black; 19 | font-size: 24px; 20 | font-family: Metropolis,"Avenir Next","Helvetica Neue",Arial,sans-serif; 21 | } 22 | 23 | .vtaas-control-panel .vtaas-panel-container { 24 | display: inline-flex; 25 | height: auto; 26 | justify-content: center; 27 | padding: 0; 28 | border: 0; 29 | background-color: transparent; 30 | } 31 | 32 | .vtaas-control-panel .vtaas-panel-button { 33 | padding: 8px 8px; 34 | background-color: rgba(17, 17, 17, 0.15); 35 | border: 0; 36 | outline: 0; 37 | } 38 | 39 | .vtaas-control-panel.vtaas-hover .vtaas-panel-button { 40 | background-color: rgba(17, 17, 17); 41 | } 42 | 43 | .vtaas-control-panel .vtaas-panel-button.vtaas-panel-padder { 44 | width: 10px; 45 | padding-left: 0; 46 | padding-right: 0; 47 | cursor: move; 48 | } 49 | 50 | .vtaas-control-panel .vtaas-panel-button.vtaas-panel-padder:hover, 51 | .vtaas-control-panel .vtaas-panel-button.vtaas-button-on, 52 | .vtaas-control-panel.vtaas-hover .vtaas-panel-button.vtaas-panel-padder:hover { 53 | background-color: rgba(17, 17, 17); 54 | } 55 | 56 | .vtaas-control-panel .vtaas-panel-button:hover, 57 | .vtaas-control-panel.vtaas-hover .vtaas-panel-button:hover { 58 | background-color: rgb(74, 74, 74); 59 | } 60 | 61 | .vtaas-control-panel .vtaas-panel-button:active, 62 | .vtaas-control-panel.vtaas-hover .vtaas-panel-button:active { 63 | background-color: rgb(112, 112, 112); 64 | } 65 | 66 | .vtaas-control-panel .vtaas-button-inner { 67 | align-items: center; 68 | display: flex; 69 | flex-flow: column nowrap; 70 | height: 100%; 71 | position: relative; 72 | width: 100%; 73 | } 74 | 75 | .vtaas-control-panel .vtaas-button-icon { 76 | margin-bottom: 4px; 77 | } 78 | 79 | .vtaas-control-panel .vtaas-button-icon svg { 80 | height: 24px; 81 | width: 24px; 82 | fill: white; 83 | } 84 | 85 | .vtaas-control-panel .vtaas-button-title { 86 | font-family: arial, sans-serif; 87 | font-size: 14px; 88 | color: white; 89 | font-weight: normal; 90 | height: 14px; 91 | line-height: 14px; 92 | text-align: center; 93 | user-select: none; 94 | white-space: nowrap; 95 | } 96 | 97 | /* Settings Dialog */ 98 | .vtaas-settings-dialog { 99 | width: 600px; 100 | } -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/element-select/path-index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Parallel Extension 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | Element: 17 | 18 |
19 |
20 | 21 | -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/element-select/path-main.js: -------------------------------------------------------------------------------- 1 | import {vtaasMessage} from '/src/cs/content-message.js'; 2 | import {contentUtils, FrameDialog, RuntimeState} from '/src/cs/content-utils.js'; 3 | 4 | const ID_DIALOG = 'vtaas-dialog-elementselectorpath'; 5 | const ID_PATH_VALUE = '#pathValue'; 6 | 7 | vtaasMessage.on(vtaasMessage.ELEMENT_SELECT_END, (event) => { 8 | FrameDialog.destroy(ID_DIALOG); 9 | }); 10 | 11 | vtaasMessage.on(vtaasMessage.ELEMENT_SELECT_CHANGED, (event) => { 12 | $(ID_PATH_VALUE).text(event.xpath); 13 | contentUtils.resizeDialogByContentSize(ID_DIALOG, '.path-container'); 14 | }); -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/element-select/path-style.css: -------------------------------------------------------------------------------- 1 | .path-container { 2 | display: inline-block; 3 | white-space: nowrap; 4 | overflow: visible; 5 | } -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/execution/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Parallel Extension 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 46 | 47 | -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/execution/main.js: -------------------------------------------------------------------------------- 1 | import {vtaasMessage} from '/src/cs/content-message.js'; 2 | import {contentUtils, FrameDialog, RuntimeState, postServerData} from '/src/cs/content-utils.js'; 3 | 4 | const ID_DIALOG = 'vtaas-dialog-execution'; 5 | const ID_MODAL = '#executionModal'; 6 | 7 | const ID_ALERT = '.alert'; 8 | const ID_COMMAND_DROPDOWN = '#sshCommand'; 9 | let product = null; 10 | 11 | function showAlert(msg) { 12 | $('#alertPlaceholder').html(` 13 | 19 | `) 20 | $('#alertMessage').html(msg); 21 | $(ID_ALERT).alert(); 22 | contentUtils.resizeDialogByContentSize(ID_DIALOG, '.modal-dialog .modal-content'); 23 | 24 | $(ID_ALERT).on('closed.bs.alert', function () { 25 | contentUtils.resizeDialogByContentSize(ID_DIALOG, '.modal-dialog .modal-content'); 26 | }); 27 | } 28 | 29 | function findId(searchList, text) { 30 | let item = searchList.find(function(e) { 31 | return e.name === text; 32 | }); 33 | if (item) { 34 | return item.id; 35 | } 36 | return -1; 37 | } 38 | 39 | async function init() { 40 | product = await RuntimeState.getProduct(); 41 | //$(ID_ALERT).alert('dispose'); 42 | 43 | contentUtils.resizeDialogByContentSize(ID_DIALOG, '.modal-dialog .modal-content'); 44 | } 45 | 46 | $(ID_MODAL).modal({backdrop: false}); 47 | $(ID_MODAL).on('hide.bs.modal', function(event) { 48 | FrameDialog.destroy(ID_DIALOG); 49 | }); 50 | 51 | let esOptions = { 52 | filter: false 53 | } 54 | $(ID_COMMAND_DROPDOWN).editableSelect(esOptions); 55 | 56 | $('button#ok').on('click', async function() { 57 | let commandName = $(ID_COMMAND_DROPDOWN).val().trim(); 58 | 59 | if (commandName.length === 0) { 60 | showAlert('Command Name is required.'); 61 | return; 62 | } 63 | 64 | let eventData = { 65 | commandName: commandName.trim() 66 | }; 67 | contentUtils.recordEvent('execute', eventData); 68 | 69 | $('#executionModal').modal('hide'); 70 | }); 71 | 72 | init(); -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/execution/style.css: -------------------------------------------------------------------------------- 1 | .modal-dialog { 2 | position: fixed; 3 | top: 0; 4 | left: 0; 5 | width: 100vw; 6 | height: 100vh; 7 | max-width: 100vw; 8 | margin: 0; 9 | } 10 | 11 | .modal-container { 12 | padding: 25px 0; 13 | margin: 15px; 14 | } 15 | 16 | .es-list { 17 | max-height: 100px !important; 18 | } 19 | 20 | #alertMessage { 21 | display: inline; 22 | } -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/notification/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Parallel Extension 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/replay-progress/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Parallel Extension 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 |
16 | 17 | 18 | 19 |
20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/replay-progress/main.js: -------------------------------------------------------------------------------- 1 | const DIALOG_ID = 'vtaas-dialog-replay-progress'; 2 | 3 | let clients = new Map(); 4 | 5 | function makeSelector(index) { 6 | return `#progressTable tbody tr:nth-child(${index})`; 7 | } 8 | 9 | function getSnCellElement(index) { 10 | return $(`#progressTable tr:nth-child(${index}) td.sn-column`); 11 | } 12 | 13 | function updateSnCell(index, sn) { 14 | getSnCellElement(index).text(sn.toString(10)); 15 | } 16 | 17 | function addTableRow(clientId) { 18 | let title; 19 | if (clientId === 'leader') { 20 | title = 'Leader'; 21 | } else { 22 | title = `Worker ${clients.size}`; 23 | } 24 | clients.set(clientId, { 25 | title: title, 26 | sn: 0, 27 | index: clients.size + 1 28 | }); 29 | 30 | const rowHtml = ` 31 | 32 | ${title}: 33 | 0 34 | `; 35 | $('#progressTable tbody').append(rowHtml); 36 | increaseDialog(0, 25); 37 | } 38 | 39 | function increaseDialog(distanceX, distanceY) { 40 | let width = $('.progress-container').outerWidth(true) + distanceX; 41 | let height = $('.progress-container').outerHeight(true) + 4 + distanceY; 42 | 43 | $('.progress-container').height($('.progress-container').height() + distanceY); 44 | 45 | let msgData = { 46 | type: 'DIALOG_RESIZE', 47 | dialogId: DIALOG_ID, 48 | height: height + 'px', 49 | width: width + 'px' 50 | }; 51 | window.top.postMessage(msgData, '*'); 52 | } 53 | 54 | addTableRow('leader'); 55 | 56 | // port connection 57 | let progressPort = chrome.runtime.connect({name: 'replay-progress'}); 58 | progressPort.onMessage.addListener(msg => { 59 | // console.log('Progress dialog: Received progress message.', msg); 60 | if (!clients.has(msg.clientUuid)) { 61 | addTableRow(msg.clientUuid); 62 | } 63 | 64 | let clientIndex = clients.get(msg.clientUuid).index; 65 | updateSnCell(clientIndex, msg.sn); 66 | }); -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/replay-progress/style.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | background: #f2f2f2; 4 | margin: 0px; 5 | } 6 | 7 | .progress-container { 8 | display:flex; 9 | flex-direction: row; 10 | margin: 2px 0; 11 | width: 180px; 12 | height:0; 13 | } 14 | 15 | .drag-bar { 16 | border-left: 1px solid #d2cdcd; 17 | border-right: 1px solid #d2cdcd; 18 | margin: 4px 5px 4px 5px; 19 | flex: 0 0 5px; 20 | cursor: move; 21 | } 22 | 23 | #progressTable { 24 | border-spacing: 0; 25 | width: 100%; 26 | border-collapse: collapse; 27 | margin: 0; 28 | line-height: normal; 29 | } 30 | 31 | tr:first-child td, tr:first-child th { 32 | border-top: none; 33 | } 34 | 35 | th { 36 | width: 80px; 37 | } 38 | 39 | td.sn-column { 40 | text-align: center; 41 | } -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/screenshot/style.css: -------------------------------------------------------------------------------- 1 | .modal-dialog { 2 | position: fixed; 3 | top: 0; 4 | left: 0; 5 | width: 100vw; 6 | height: 100vh; 7 | max-width: 100vw; 8 | margin: 0; 9 | } 10 | 11 | .modal-container { 12 | margin: 15px; 13 | } 14 | 15 | .vtaas-screenshot-screen { 16 | margin-left: 10px; 17 | } 18 | 19 | #elementButton { 20 | margin-left: -40px; 21 | } -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/text-resource/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Parallel Extension 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 35 | 36 | -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/text-resource/main.js: -------------------------------------------------------------------------------- 1 | import {vtaasMessage} from '/src/cs/content-message.js'; 2 | import {contentUtils, FrameDialog, RuntimeState} from '/src/cs/content-utils.js'; 3 | 4 | const ID_DIALOG = 'vtaas-dialog-text-resource'; 5 | const ID_MODAL = '#modal'; 6 | const ID_GRID = '#textResourcesGrid'; 7 | 8 | let currentRow = null; 9 | 10 | $(ID_MODAL).modal({backdrop: false}); 11 | 12 | async function getTextResources() { 13 | let textResources = await RuntimeState.getTextResources(); 14 | return textResources; 15 | } 16 | 17 | async function init() { 18 | let textResources = await getTextResources(); 19 | let locale = await RuntimeState.getLocale(); 20 | let localeTitle = locale.replace('_', '-'); 21 | 22 | let columns = [ 23 | { title: "Key", name: "key", type: "text", width: 150 }, 24 | { title: localeTitle, name: locale, type: "text", width: 150 }, 25 | ]; 26 | 27 | $(ID_GRID).jsGrid({ 28 | width: "100%", 29 | height: "400px", 30 | 31 | inserting: false, 32 | editing: false, 33 | sorting: true, 34 | paging: true, 35 | 36 | data: textResources, 37 | 38 | fields: columns, 39 | 40 | rowClick: function(args) { 41 | let selectedRow = $(ID_GRID).find('table tr.highlight'); 42 | if (selectedRow.length) { 43 | selectedRow.toggleClass('highlight'); 44 | }; 45 | 46 | let $row = $(ID_GRID).jsGrid("rowByItem", args.item); 47 | $row.toggleClass("highlight"); 48 | 49 | currentRow = args.item; 50 | }, 51 | }); 52 | 53 | contentUtils.resizeDialogByContentSize(ID_DIALOG, '.modal-dialog .modal-content'); 54 | } 55 | 56 | 57 | $(ID_MODAL).on('hide.bs.modal', function(event) { 58 | FrameDialog.destroy(ID_DIALOG); 59 | }); 60 | 61 | $('button#ok').on('click', function() { 62 | if (currentRow === null) { 63 | alert("No text resource is selected."); 64 | return; 65 | } 66 | let msg = {key: currentRow.key}; 67 | vtaasMessage.broadcast(vtaasMessage.TEXT_RESOURCE_SELECTION, msg); 68 | $(ID_MODAL).modal('hide'); 69 | }); 70 | 71 | $('button#cancel').on('click', function() { 72 | let msg = {key: null}; 73 | vtaasMessage.broadcast(vtaasMessage.TEXT_RESOURCE_SELECTION, msg); 74 | $(ID_MODAL).modal('hide'); 75 | }); 76 | 77 | init(); -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/cs/text-resource/style.css: -------------------------------------------------------------------------------- 1 | .modal-dialog { 2 | position: fixed; 3 | top: 0; 4 | left: 0; 5 | width: 100vw; 6 | height: 100vh; 7 | max-width: 100vw; 8 | margin: 0; 9 | } 10 | 11 | .modal-container { 12 | margin: 15px; 13 | } 14 | 15 | tr.highlight td.jsgrid-cell { 16 | background-color: green; 17 | } -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/product/airwatchconsole.js: -------------------------------------------------------------------------------- 1 | export const prodConfig = { 2 | ENABLE_RECORDING_SELECTION: 1, 3 | 4 | print: function() { 5 | console.log("vrops: prodConfig.print"); 6 | }, 7 | 8 | removeFocusOnSelect: function(element, request){ 9 | let element_tagName = element.tagName; 10 | if(element_tagName.indexOf("SELECT") >=0){ 11 | if(request.action == "20"){ 12 | $(element).blur(); 13 | } 14 | } 15 | } 16 | 17 | }; -------------------------------------------------------------------------------- /workers/parallel/src/ext/src/product/default.js: -------------------------------------------------------------------------------- 1 | 2 | export const prodConfig = { 3 | ENABLE_RECORDING_PBC: 0, 4 | CHANGE_RECORDING_TARGET: 0, 5 | 6 | print: function() { 7 | console.log("default: prodConfig.print"); 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /workers/parallel/src/ubuntu/.vnc/xstartup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | unset SESSION_MANAGER 4 | unset DBUS_SESSION_BUS_ADDRESS 5 | OS=`uname -s` 6 | if [ $OS = 'Linux' ]; then 7 | case "$WINDOWMANAGER" in 8 | *gnome*) 9 | if [ -e /etc/SuSE-release ]; then 10 | PATH=$PATH:/opt/gnome/bin 11 | export PATH 12 | fi 13 | ;; 14 | esac 15 | fi 16 | 17 | if [ -x /etc/X11/xinit/xinitrc ]; then 18 | exec /etc/X11/xinit/xinitrc 19 | fi 20 | if [ -f /etc/X11/xinit/xinitrc ]; then 21 | exec sh /etc/X11/xinit/xinitrc 22 | fi 23 | [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources 24 | xsetroot -solid grey 25 | xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & 26 | twm & 27 | vncconfig -iconic & 28 | autocutsel & -------------------------------------------------------------------------------- /workers/parallel/src/ubuntu/icewm/.icewm/menu: -------------------------------------------------------------------------------- 1 | prog xterm xterm xterm 2 | separator 3 | prog Firefox /usr/share/pixmaps/firefox.png firefox 4 | prog Chromium /usr/share/pixmaps/chromium-browser.png /usr/bin/chromium-browser 5 | -------------------------------------------------------------------------------- /workers/parallel/src/ubuntu/icewm/.icewm/preferences: -------------------------------------------------------------------------------- 1 | WorkspaceNames=" 1 " 2 | TaskBarShowMailboxStatus = 0 3 | TaskBarShowWorkspaces = 0 4 | -------------------------------------------------------------------------------- /workers/parallel/src/ubuntu/icewm/.icewm/theme: -------------------------------------------------------------------------------- 1 | Theme=win95/default.theme 2 | -------------------------------------------------------------------------------- /workers/parallel/src/ubuntu/icewm/.icewm/toolbar: -------------------------------------------------------------------------------- 1 | prog xterm xterm xterm 2 | separator 3 | prog Firefox /usr/share/pixmaps/firefox.png firefox 4 | prog "Google Chrome" /usr/share/pixmaps/chromium-browser.png /usr/bin/chromium-browser 5 | -------------------------------------------------------------------------------- /workers/parallel/src/ubuntu/icewm/wm_startup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### every exit != 0 fails the script 3 | set -e 4 | 5 | echo -e "\n------------------ startup of IceWM window manager ------------------" 6 | 7 | ### disable screensaver and power management 8 | xset -dpms & 9 | xset s noblank & 10 | xset s off & 11 | 12 | /usr/bin/icewm-session > $HOME/wm.log & 13 | sleep 1 14 | cat $HOME/wm.log -------------------------------------------------------------------------------- /workers/parallel/src/ubuntu/install/chrome.orig.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### every exit != 0 fails the script 3 | set -e 4 | 5 | echo "Install Chromium Browser" 6 | apt-get update 7 | 8 | #================ 9 | # Font libraries 10 | #================ 11 | # libfontconfig ~1 MB 12 | # libfreetype6 ~1 MB 13 | # xfonts-cyrillic ~2 MB 14 | # xfonts-scalable ~2 MB 15 | # fonts-liberation ~3 MB 16 | # fonts-ipafont-gothic ~13 MB 17 | # fonts-wqy-zenhei ~17 MB 18 | # ttf-ubuntu-font-family ~5 MB 19 | # Ubuntu Font Family, sans-serif typeface hinted for clarity 20 | # Removed packages: 21 | # xfonts-100dpi ~6 MB 22 | # xfonts-75dpi ~6 MB 23 | # Regarding fonts-liberation see: 24 | # https://github.com/SeleniumHQ/docker-selenium/issues/383#issuecomment-278367069 25 | # Layer size: small: 36.28 MB (with --no-install-recommends) 26 | # Layer size: small: 36.28 MB 27 | apt-get -qqy update \ 28 | && apt-get -qqy --no-install-recommends install \ 29 | libfontconfig \ 30 | libfreetype6 \ 31 | xfonts-cyrillic \ 32 | xfonts-scalable \ 33 | fonts-liberation \ 34 | fonts-ipafont-gothic \ 35 | fonts-wqy-zenhei \ 36 | ttf-ubuntu-font-family 37 | # && rm -rf /var/lib/apt/lists/* \ 38 | # && apt-get -qyy clean 39 | 40 | apt-get install -y chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg 41 | apt-get clean -y 42 | ln -s /usr/bin/chromium-browser /usr/bin/google-chrome 43 | ### fix to start chromium in a Docker container, see https://github.com/ConSol/docker-headless-vnc-container/issues/2 44 | echo "CHROMIUM_FLAGS='--no-sandbox --start-maximized --user-data-dir'" > $HOME/.chromium-browser.init 45 | -------------------------------------------------------------------------------- /workers/parallel/src/ubuntu/install/chrome.sh: -------------------------------------------------------------------------------- 1 | #=============== 2 | # Google Chrome 3 | #=============== 4 | # TODO: Use Google fingerprint to verify downloads 5 | # https://www.google.de/linuxrepositories/ 6 | apt-get -qqy update \ 7 | && apt-get -qqy --no-install-recommends install \ 8 | libfontconfig \ 9 | libfreetype6 \ 10 | xfonts-cyrillic \ 11 | xfonts-scalable \ 12 | fonts-liberation \ 13 | fonts-ipafont-gothic \ 14 | fonts-wqy-zenhei \ 15 | ttf-ubuntu-font-family 16 | 17 | # Layer size: huge: 196.3 MB 18 | # && wget -nv "https://dl.google.com/linux/direct/google-chrome-beta_current_amd64.deb" \ 19 | # && wget -nv "https://www.slimjet.com/chrome/download-chrome.php?file=lnx%2Fchrome64_66.0.3359.181.deb" \ 20 | # https://www.slimjet.com/chrome/download-chrome.php?file=files%2F71.0.3578.80%2Fgoogle-chrome-stable_current_amd64.deb 21 | apt-get -qqy update \ 22 | && mkdir -p chrome-deb \ 23 | && wget -nv "https://www.slimjetbrowser.com/chrome/files/90.0.4430.72/google-chrome-stable_current_amd64.deb" \ 24 | -O "./chrome-deb/google-chrome-stable_current_amd64.deb" \ 25 | && apt-get -qyy --no-install-recommends install \ 26 | "./chrome-deb/google-chrome-stable_current_amd64.deb" \ 27 | && rm "./chrome-deb/google-chrome-stable_current_amd64.deb" \ 28 | && rm -rf ./chrome-deb \ 29 | && apt-get -qyy autoremove \ 30 | && rm -rf /var/lib/apt/lists/* \ 31 | && apt-get -qyy clean 32 | 33 | 34 | # ln -s /opt/google/chrome/google-chrome /usr/bin/google-chrome 35 | ### fix to start chromium in a Docker container, see https://github.com/ConSol/docker-headless-vnc-container/issues/2 36 | # echo "CHROMIUM_FLAGS='--no-sandbox --start-maximized --user-data-dir'" > $HOME/.chromium-browser.init 37 | -------------------------------------------------------------------------------- /workers/parallel/src/ubuntu/install/conda.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### every exit != 0 fails the script 3 | set -e 4 | 5 | echo "Install conda" 6 | 7 | apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates \ 8 | libglib2.0-0 libxext6 libsm6 libxrender1 \ 9 | git mercurial subversion 10 | 11 | 12 | echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && \ 13 | wget --quiet https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \ 14 | /bin/bash ~/miniconda.sh -b -p /opt/conda && \ 15 | rm ~/miniconda.sh 16 | 17 | apt-get install -y curl grep sed dpkg && \ 18 | TINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o "/v.*\"" | sed 's:^..\(.*\).$:\1:'` && \ 19 | curl -L "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb" > tini.deb && \ 20 | dpkg -i tini.deb && \ 21 | rm tini.deb && \ 22 | apt-get clean 23 | 24 | -------------------------------------------------------------------------------- /workers/parallel/src/ubuntu/install/firefox.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | echo "Install Firefox" 5 | 6 | # function disableUpdate(){ 7 | # ff_def="$1/browser/defaults/profile" 8 | # mkdir -p $ff_def 9 | # echo < $ff_def/user.js 19 | # } 20 | 21 | #copy from org/sakuli/common/bin/installer_scripts/linux/install_firefox_portable.sh 22 | function instFF() { 23 | if [ ! "${1:0:1}" == "" ]; then 24 | FF_VERS=$1 25 | if [ ! "${2:0:1}" == "" ]; then 26 | FF_INST=$2 27 | echo "download Firefox $FF_VERS and install it to '$FF_INST'." 28 | mkdir -p "$FF_INST" 29 | FF_URL=http://releases.mozilla.org/pub/firefox/releases/$FF_VERS/linux-x86_64/en-US/firefox-$FF_VERS.tar.bz2 30 | echo "FF_URL: $FF_URL" 31 | wget -qO- $FF_URL | tar xvj --strip 1 -C $FF_INST/ 32 | ln -s "$FF_INST/firefox" /usr/bin/firefox 33 | exit $? 34 | fi 35 | fi 36 | echo "function parameter are not set correctly please call it like 'instFF [version] [install path]'" 37 | exit -1 38 | } 39 | 40 | instFF '60.1.0esr' '/usr/lib/firefox' -------------------------------------------------------------------------------- /workers/parallel/src/ubuntu/install/icewm_ui.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### every exit != 0 fails the script 3 | set -e 4 | 5 | echo "Install IceWM UI components" 6 | apt-get update 7 | apt-get install -y supervisor icewm xterm xfonts-base xauth xinit 8 | apt-get purge -y pm-utils xscreensaver* 9 | apt-get clean -y -------------------------------------------------------------------------------- /workers/parallel/src/ubuntu/install/libnss_wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### every exit != 0 fails the script 3 | set -e 4 | 5 | echo "Install nss-wrapper to be able to execute image as non-root user" 6 | # apt-get update 7 | apt-get install -y libnss-wrapper gettext 8 | apt-get clean -y 9 | 10 | echo "add 'souce generate_container_user' to .bashrc" 11 | 12 | # have to be added to hold all env vars correctly 13 | echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc -------------------------------------------------------------------------------- /workers/parallel/src/ubuntu/install/tigervnc.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Install TigerVNC server" 4 | wget -qO- https://github.com/accetto/tigervnc/releases/download/v1.8.0-mirror/tigervnc-1.8.0.x86_64.tar.gz | tar xz --strip 1 -C / 5 | # install 6 | # apt-get install -y autocutsel 7 | # apt-get install -y autocutsel -------------------------------------------------------------------------------- /workers/parallel/src/ubuntu/install/tools.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### every exit != 0 fails the script 3 | set -e 4 | 5 | echo "Install some common tools for further installation" 6 | apt-get update 7 | apt-get install -y vim wget net-tools bzip2 iputils-ping traceroute audacious 8 | apt-get clean -y 9 | 10 | -------------------------------------------------------------------------------- /workers/parallel/src/ubuntu/install/xfce_ui.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### every exit != 0 fails the script 3 | set -e 4 | 5 | echo "Install Xfce4 UI components" 6 | apt-get update 7 | apt-get install -y supervisor xfce4 xterm 8 | apt-get purge -y pm-utils xscreensaver* 9 | apt-get clean -y --------------------------------------------------------------------------------