From cfaf9ef6d065113d18a74960725aa2f039af2552 Mon Sep 17 00:00:00 2001 From: Orandi Harris Date: Mon, 13 Mar 2023 12:34:21 -0500 Subject: [PATCH] Updated cli docs for spectre --- .../1.sitemap.md | 0 .../{3.scaffilding => 3.scaffolding}/_dir.yml | 0 .../1.getting-started/1.introduction.md | 2 - .../4.Spectre/1.getting-started/1.overview.md | 63 ++++++++++ .../4.Spectre/2.cli-commands/1.usage.md | 119 ++++++++++++++++++ .../4.Spectre/{ => 2.cli-commands}/_dir.yml | 0 6 files changed, 182 insertions(+), 2 deletions(-) rename docs/content/3.rdvue/{3.scaffilding => 3.scaffolding}/1.sitemap.md (100%) rename docs/content/3.rdvue/{3.scaffilding => 3.scaffolding}/_dir.yml (100%) delete mode 100644 docs/content/4.Spectre/1.getting-started/1.introduction.md create mode 100644 docs/content/4.Spectre/1.getting-started/1.overview.md create mode 100644 docs/content/4.Spectre/2.cli-commands/1.usage.md rename docs/content/4.Spectre/{ => 2.cli-commands}/_dir.yml (100%) diff --git a/docs/content/3.rdvue/3.scaffilding/1.sitemap.md b/docs/content/3.rdvue/3.scaffolding/1.sitemap.md similarity index 100% rename from docs/content/3.rdvue/3.scaffilding/1.sitemap.md rename to docs/content/3.rdvue/3.scaffolding/1.sitemap.md diff --git a/docs/content/3.rdvue/3.scaffilding/_dir.yml b/docs/content/3.rdvue/3.scaffolding/_dir.yml similarity index 100% rename from docs/content/3.rdvue/3.scaffilding/_dir.yml rename to docs/content/3.rdvue/3.scaffolding/_dir.yml diff --git a/docs/content/4.Spectre/1.getting-started/1.introduction.md b/docs/content/4.Spectre/1.getting-started/1.introduction.md deleted file mode 100644 index 7461deda..00000000 --- a/docs/content/4.Spectre/1.getting-started/1.introduction.md +++ /dev/null @@ -1,2 +0,0 @@ -# Coming Soon - diff --git a/docs/content/4.Spectre/1.getting-started/1.overview.md b/docs/content/4.Spectre/1.getting-started/1.overview.md new file mode 100644 index 00000000..7f4a23a2 --- /dev/null +++ b/docs/content/4.Spectre/1.getting-started/1.overview.md @@ -0,0 +1,63 @@ +Spectre 🔍 +====== +The Spectre CLI is used to scaffold web & mobile automation projects quickly and easily. The CLI leverages the use of the [WebDriverIO](https://webdriver.io/) framework to enable QA and software engineers to verify the quality of mobile or web applications being developed. The CLI also provides examples for you to quickly run to be able to get going with automated testing! + +The CLI also uses the Page Object Pattern which provides a layer of abstraction between the test files and the pages/screens actually being tested. For more information on page objects, you can read [here](https://www.martinfowler.com/bliki/PageObject.html). + +The CLI also provides tooling support to easily create test scripts to verify functionality through the use of [Mocha](https://mochajs.org/) and [Chai](https://www.chaijs.com/). + +A project created from Spectre also has access to different testing services such as: +- [Appium](https://appium.io/) +- [BrowserStack](https://www.browserstack.com/) +- [Allure](https://docs.qameta.io/allure/) + +# System Requirements +## Mac +1. [Node](https://nodejs.org/en/) +2. [Java](https://www.java.com/en/download/help/mac_install.html) + +## Windows +1. [Node](https://nodejs.org/en/) +2. [Java](https://www.java.com/en/download/windows_manual.jsp) + +For web automation, a web browser for web automation (Google Chrome, Firefox, Safari, Edge or a combination of all of the above). + +For mobile automation, you will need the following installed on your machine: + +### Windows +- Android SDK and access to emulators: https://developer.android.com/studio/install#windows +- Download Appium https://github.com/appium/appium-desktop/releases/download/v1.22.3-4/Appium-Server-GUI-windows-1.22.3-4.exe + +### Mac +- Android SDK and access to emulators: https://developer.android.com/studio/install#mac +- Xcode configuration https://developer.apple.com/support/xcode/ & https://www.freecodecamp.org/news/install-xcode-command-line-tools/ +- Download Appium https://github.com/appium/appium-desktop/releases/download/v1.22.3-4/Appium-Server-GUI-mac-1.22.3-4.dmg + +NB - You can double check your appium installation by installing Appium Doctor using the command below: +``` + npm install -g appium-doctor +``` + +Then you can verify if your Android or iOS setup is correct (pass either --ios or --android if you want to see if the installation of a specific platform is correct): +``` + appium-doctor +``` + +Please look at this Appium reference [here](https://appium.io/docs/en/about-appium/getting-started/#starting-appium) for more details. + +### Recommended tools +We recommend the use of Visual Studio Code as they provide autocompletion for many of the WebDriverIO commands being used by the scaffolded project. + + +# Installation +Installing the spectre plugin can be done with the following command: +```bash +$ frontier plugins:install @rdfrontier/plugin-qa +``` + +Verify installation is working by typing: +The help menu can be accessed with the command: + +```bash +frontier qa --help +``` \ No newline at end of file diff --git a/docs/content/4.Spectre/2.cli-commands/1.usage.md b/docs/content/4.Spectre/2.cli-commands/1.usage.md new file mode 100644 index 00000000..7e19176f --- /dev/null +++ b/docs/content/4.Spectre/2.cli-commands/1.usage.md @@ -0,0 +1,119 @@ +# Usage + +The format for running an Spectre command is generally: + +```bash +frontier qa:COMMAND +``` +## Commands + + +- [`frontier qa:create-mobile-project [NAME]`](#frontier-qa-create-mobile-project-name) +- [`frontier qa:create-page-object [NAME]`](#frontier-qa-create-page-object-name) +- [`frontier qa:create-project [NAME]`](#frontier-q-create-project-name) +- [`frontier qa:create-screen-object [NAME]`](#frontier-qacreate-screen-object-name) +- [`frontier qa:create-test [NAME]`](#frontier-qa-create-test-name) +- [`frontier qa --help [COMMAND]`](#frontier-qa-help-command) + + +### `frontier qa:create-mobile-project [NAME]` + +Create a new WDIO project for Mobile + +``` +USAGE + $ frontier qa:create-mobile-project [NAME] + +ARGUMENTS + NAME Name of the project to be created + +OPTIONS + -h, --help show CLI help +``` + +## `frontier qa:create-page-object [NAME]` + +Create a new page object file + +``` +USAGE + $ frontier qa:create-page-object [NAME] + +ARGUMENTS + NAME Name of the page object file to be created + +OPTIONS + -h, --help show CLI help + +EXAMPLE + $ frontier qa:create-page-object + Running this add command! +``` + +## `frontier qa:create-project [NAME]` + +Create a new WDIO project + +``` +USAGE + $ frontier qa:create-project [NAME] + +ARGUMENTS + NAME Name of the project to be created + +OPTIONS + -h, --help show CLI help +``` + +## `frontier qa:create-screen-object [NAME]` + +Create a new screen object file + +``` +USAGE + $ frontier qa:create-screen-object [NAME] + +ARGUMENTS + NAME Name of the page object file to be created + +OPTIONS + -h, --help show CLI help + +EXAMPLE + $ frontier qa:create-screen-object + Running this add command! +``` + +## `frontier qa:create-test [NAME]` + +Create a new test file + +``` +USAGE + $ frontier qa:create-test [NAME] + +ARGUMENTS + NAME Name of the test file to be created + +OPTIONS + -h, --help show CLI help + +EXAMPLE + $ frontier qa:create-test + +``` + +## `frontier qa:[COMMAND] --help ` + +display help for spectre + +``` +USAGE + $ frontier qa:[COMMAND] --help + +ARGUMENTS + COMMAND command to show help for + +OPTIONS + --all see all commands in CLI +``` \ No newline at end of file diff --git a/docs/content/4.Spectre/_dir.yml b/docs/content/4.Spectre/2.cli-commands/_dir.yml similarity index 100% rename from docs/content/4.Spectre/_dir.yml rename to docs/content/4.Spectre/2.cli-commands/_dir.yml