{"id":19879980,"url":"https://github.com/passbolt/passbolt_selenium","last_synced_at":"2025-05-02T13:31:54.318Z","repository":{"id":4932174,"uuid":"42225781","full_name":"passbolt/passbolt_selenium","owner":"passbolt","description":"Passbolt Selenium Tests","archived":false,"fork":false,"pushed_at":"2024-08-22T12:03:12.000Z","size":12875,"stargazers_count":9,"open_issues_count":5,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-08-22T13:35:28.657Z","etag":null,"topics":["passbolt","php-webdriver","phpunit","selenium"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/passbolt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-10T06:10:27.000Z","updated_at":"2024-08-22T13:35:32.978Z","dependencies_parsed_at":"2024-08-22T13:50:19.018Z","dependency_job_id":null,"html_url":"https://github.com/passbolt/passbolt_selenium","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passbolt%2Fpassbolt_selenium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passbolt%2Fpassbolt_selenium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passbolt%2Fpassbolt_selenium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passbolt%2Fpassbolt_selenium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/passbolt","download_url":"https://codeload.github.com/passbolt/passbolt_selenium/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224315249,"owners_count":17290992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["passbolt","php-webdriver","phpunit","selenium"],"created_at":"2024-11-12T17:09:54.301Z","updated_at":"2024-11-12T17:09:54.366Z","avatar_url":"https://github.com/passbolt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\t      ____                  __          ____\n\t     / __ \\____  _____ ____/ /_  ____  / / /_\n\t    / /_/ / __ `/ ___/ ___/ __ \\/ __ \\/ / __/\n\t   / ____/ /_/ (__  |__  ) /_/ / /_/ / / /_\n\t  /_/    \\__,_/____/____/_.___/\\____/_/\\__/\n\n\tThe open source password manager for teams\n\t(c) 2022 Passbolt SA\n\n\nLicense\n==============\n\nPassbolt is distributed under [Affero General Public License v3](http://www.gnu.org/licenses/agpl-3.0.html)\n\nImages and logos in /src/img/third_party belongs to their respective owner.\n\n\nAbout\n=========\n\nThis is the official E2E testing styleguide for Passbolt the open source password manager for teams.\nThis styleguide is dedicated to developers who want to improve Passbolt and aim at enriching their\ncontribution with E2E tests.\n\nCredits\n=========\n\nhttps://www.passbolt.com/credits\n\nPrerequisite\n============\n\nYou need to have a passbolt environment build locally with selenium activate in config file\nand have done a sql export of the dummy data.\n\nInstall\n=========\n\n### Running locally\n\nBefore running the E2E tests, be sure you have Chrome, Microsfot Edge and Firefox Nightly as installed.\n\nYou have to build a local version of Passbolt browser extension for all browsers. To do this, first you need to\ncheckout the Passbolt browser extension [repository](https://github.com/passbolt/passbolt_browser_extension) and go\nto the passbolt-browser-extension folder.\n\nFor Chrome, run the command: \n\n```shell\ngrunt build-chrome-mv3-debug\n```\n\nFor Microsoft Edge, run the command:\n\n```shell\ngrunt build-chrome-debug\n```\n\nFor firefox, run the command\n\n```shell\ngrunt build-firefox-debug\n```\n\nThat is going to generate a folder file and a crx file respectively in dist/firefox/passbolt-latest and\ndist/chrome/passbolt-latest@passbolt.com.crx.\n\nThe Webdriver configuration file uses variable environment PASSBOLT_BROWSER_EXTENSION_CHROME and PASSBOLT_BROWSER_EXTENSION_FIREFOX\nto specify the location of these files. So, they should properly defined into your environment such as\nin an Unix-based platform:\n\n```shell\nexport PASSBOLT_BROWSER_EXTENSION_CHROME=\u003cYOUR-CHROME-CRX-FILE-PATH\u003e\nexport PASSBOLT_BROWSER_EXTENSION_FIREFOX=\u003cYOUR-FIREFOX-EXTENSION-FOLDER-PATH\u003e\nexport BASE_URL_PRO=\u003cYOUR-BASE-URL-PRO-EDITION\u003e\nexport BASE_URL_CE=\u003cYOUR-BASE-URL-CE-EDITION\u003e\n```\nBe aware that Chrome based browsers are expecting a path for a `.crx` file whereas Firefox expects a folder path (such as the `build/all` folder generated with the previous commands).\n\n\nAfter having browser extensions built, you can initialize the selenium tests. You'll need to run the following:\n\n```shell\nnpm i\n```\n\nFinally, run the test as follows for 'pro' or 'ce' edition :\n\n```shell\nnpx wdio wdio.local.pro.conf.js\nnpx wdio wdio.local.ce.conf.js\n```\n\nnotes: by default the folder and password creation email are disabled, you have to enable it to avoid the tests failing\n\n### Running saucelabs\n\nYou have to build a local version of Passbolt browser extension for both browsers. To do this, first you need to\ncheckout the Passbolt browser extension [repository](https://github.com/passbolt/passbolt_browser_extension) and go\nto the passbolt-browser-extension folder.\n\nFor Chrome, run the command: \n\n```shell\ngrunt build-chrome-mv3-debug\n```\n\nFor Microsoft Edge, run the command:\n\n```shell\ngrunt build-chrome-debug\n```\n\nFor firefox, run the command\n\n```shell\ngrunt build-firefox-debug\n```\n\nThat is going to generate a folder file and a crx file respectively in dist/firefox/passbolt-latest and\ndist/chrome/passbolt-latest@passbolt.com.crx.\n\nThe Webdriver configuration file uses variable environment PASSBOLT_BROWSER_EXTENSION_CHROME and PASSBOLT_BROWSER_EXTENSION_FIREFOX\nto specify the location of these files.\n\nYou need also to have SAUCELABS_USERNAME and SAUCELABS_ACCESS_KEY. Pay attention to have a 36 characters long for the access key,\nif it's not the case generate a new one on sauce labs.\n\nSo, they should properly defined into your environment such as\nin an Unix-based platform:\n\n```shell\nexport PASSBOLT_BROWSER_EXTENSION_CHROME=\u003cYOUR-CHROME-CRX-FILE-PATH\u003e\nexport PASSBOLT_BROWSER_EXTENSION_FIREFOX=\u003cYOUR-FIREFOX-EXTENSION-FOLDER-PATH\u003e\nexport BASE_URL_PRO=\u003cYOUR-BASE-URL-PRO-EDITION\u003e\nexport BASE_URL_CE=\u003cYOUR-BASE-URL-CE-EDITION\u003e\nexport SAUCELABS_USERNAME=\u003cYOUR-SAUCELABS-USERNAME\u003e\nexport SAUCELABS_ACCESS_KEY=\u003cYOUR-SAUCELABS-ACCESS-KEY\u003e\n```\nBe aware that Chrome is expecting a path for a `.crx` file whereas Firefox expects a folder path (such as the `build/all` folder generated with the previous commands).\n\nFinally, run the test as follows for 'pro' or 'ce' edition :\n\n```shell\nnpx wdio wdio.saucelabs.pro.conf.js\nnpx wdio wdio.saucelabs.ce.conf.js\n```\n\n### Running with shell\n\nBefore execute it, check if the prerequisite is done.\nYou could execute the run_selenium_test.sh and choose which version launch.\nIf some environment variable are not set, the script will ask you and set it.\n\n```shell\n./bin/run_selenium_tests.sh\n```\n\nSetup base data\n=========\n\nIn order to run properly, these tests are assuming that a server is running with a database having a set of data already available.\nPassbolt provides the required data. To set them up, you need to access your server via a command line.\nThen go to the root folder of passbolt application (i.e. it could be something like `/var/www/passbolt`).\n\nIn that folder you can run the following commands:\n\n```shell\n./bin/cake passbolt insert default\n./bin/cake passbolt cleanup\n./bin/cake passbolt mysql_export --file selenium_tests.sql\n```\n\nThe last command might ease your process later in case of a test that fails. It actually dumps your database into the specified `.sql` file.\n\nNormally, when the tests are run, the data should get back to their initiale state. However, if an error occurs chances are that the data\nwill be corrupted. To recover them, you can simply use the previously generated SQL file for an import.\n\n```shell\n./bin/cake passbolt mysql_import --file selenium_tests.sql\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpassbolt%2Fpassbolt_selenium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpassbolt%2Fpassbolt_selenium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpassbolt%2Fpassbolt_selenium/lists"}