Powerful! Yet, Easy to USE! Automated Testing Framework
Project description
nRoBo (An Automated Testing Framework )
For Web Developers, QAs and Testers
Project Status
Active
Online Tutorials
VISIT and SUBSCRIBE to nRoBo YouTube Channel
Pre-requisites
Following pre-requisites needs to be installed in order to run *nRoBo* framework.
- Install Python (3.11 or higher)
- Notes on Python Installation on Windows:
Go to “Control Panel > Add Or Remove Programs” and make sure that there are not multiple versions of Python are installed.
While installing Python, make sure following options to check as mentioned in the screenshots:
python --version # or python --version
- Install Java (11 or higher)
Run the following command to check if java is installed
java --version
- Install allure command line tool.
Check Install guide
Run the following command to check if allure cli is installed
allure --version
Installation
On Windows machine, Run Command Prompt and/or Python IDE of your choice should be run in Administrator mode and execute the following commands. (To run in administrator mode, Right click on the tool and select ‘Run As Administrator’ option)
Make a directory for automation project
mkdir <project-name>
- Example:
If you want to develop autotests for the project, Dream. You can create directory and change directory to dream as following:
mkdir dream
cd dream
Install virtualenv package
pip install virtualenv
Create virtual environment - .venv
virtualenv .venv
Activate virtual environment
Unix/Mac/Linux
source .venv/bin/activate
Windows
.\\.venv\\Scripts\\activate
Install nrobo
pip install nrobo --require-virtualenv
Install & run framework in single command
nrobo --instances 10
- Run tests
Minimal switches
nrobo --browser chrome_headless --report allure
Typical usage
nrobo --app <app-name> --url <test-url> --username <username> --password <password> --instances <number-of-parallel-tests> --reruns <number-of-retries-to-rerun-failed-tests> --browser chrome_headless --report allure
Example:
nrobo --app Lotus --url https://www.google.com --username shiv --password tandav --instances 10 --reruns 2 --browser chrome_headless --report allure
- Above command instructs nrobo to do the following actions:
Launch the tests of Lotus application from the default test directory, <project-root-dir>, and its subdirectories and generate both, html (plain) and allure (rich) reports for displaying test results with following additional test parameters:
Test url (–url switch)
Credential: (username, password)=(shiv, tandav)
Run bunch of 10 tests at once (–instances switch)
Rerun addition 2 times the tests which got failed (–reruns switch)
Target browser = Headless Chrome (–browser switch)
- Notes for running -b=anti_bot_chrome:
anti_bot_chrome will not work with –grid switch!
Command Line Switches
This section enlists list of nRoBo-command-line-switches (nCLI) that it supports. nCLI shadows every PyTest-command-line-switches (PyTestCLI) for backward compatibility with pytest.
- Thus, nCLI switches are being categorized into three types:
- Pure-nCLI-switches
Only nCLI specific switches. Non-PyTest CLI switches.
- nCLI shadowing switches
These are PyTest switches overriden by nCLI with a new long or short name. These are at core, pure PyTest switches.
- Pure-PyTest-CLI-switches
As the name suggests, it is self explanatory that these switches are pure PyTest switches and maintained by them.
Below is a list of switches including all the three types categorically.
Pure nCLI Switches
- -i, --install
Install nRoBo requirements and framework on host system
- --app
Name of application under test. Name should not include special chars and it should only having alphanumeric values.
- --url
Application url under test.
- --username
Username for login.
- --password
Password for login.
- -n, --instances
Number of parallel tests to reduce test-run-time. Default value is 1. Meaning single test at a time in sequence.
- --report
Defines type of test report. Two types are supported, Simple HTML or Rich Allure report. Options are <html> or <allure>. Default is <html>
- -b, --browser
Target browser. Default is chrome. Following is a list of browser options support in nRoBo. chrome, chrome_headless, anti_bot_chrome, edge, edge_headless, safari, firefox, firefox_headless, ie
- --browser-config
Path of browser-config-file containing additional options that is/are needed to be applied before browser instantiation. Each line in file should contain one option only.
For example: You want to apply, –start-maximized, chrome switch for chrome browser. and if the browser-config-file is names as ‘chrome_config.txt’, then the content of file would be as following:
–start-maximized
There will be no conversion taking place by nRoBo! The browser switches will be applied to the browser instance.
- --grid
Remote Grid server url. Tests will be running on the machine when Grid server is running pointed by Grid url.
nCLI Shadowing Switches
- -k, --key
Only run tests that match the given substring expression. An expression is a python resolvable expression where all names are substring-matched against test names and their parent classes.
- Example:
-k ‘test_method or test_other’ matches all test.yaml functions and classes whose name contains ‘test_method’ or ‘test_other’, while -k ‘not test_method’ matches those that don’t contain ‘test_method’ in their names. -k ‘not test_method and not test_other’ will eliminate the matches. Additionally keywords are matched to classes and functions containing extra names in their ‘extra_keyword_matches’ set, as well as functions which have names assigned directly to them. The matching is case-insensitive.
Note: –key switch is shadowing -k switch of PyTest for the sake of readability.
- -m, --marker
Only run tests matching given mark expression. For example: -m ‘mark1 and not mark2’
Pure PyTest CLI Switches
- --reruns
Retries to rerun the failed tests n times specified by –reruns switch.
- --reruns-delay
Delay time in second(s) before a rerun for a failed test. Default is 1 second.
- --markers
Show markers (builtin, plugin and per-project ones).
- --junit-xml
–junit-xml=path. create junit-xml style report file at given path.
- --rootdir
–rootdir=ROOTDIR. Define root directory for tests. Can be relative path: ‘root_dir’, ‘./root_dir’,’root_dir/another_dir/’; absolute path:’/home/user/root_dir’; path with variables: ‘$HOME/root_dir’.
- --co, --collect-only
only collect tests, don’t execute them.
- Note:
Full list of PyTest switches are enlisted and explained at the following web address: Pure PyTest CLI Switches
Full list of all switches can be seen by running the following nrobo cli:
nrobo -h #or nrobo --help
nRoBo shadows all the PyTest switches, so no need to worry about. We can use each of them within the nRoBo framework. Isn’t it great!
Personalization
Reports
Support for two kinds of test reports:
- Lightweight HTML Report (Best for sharing test results)
Go to <results> dir and Double click on <report.html> file to view the simple html report.
- Rich Allure Pytest Report (Best for visualization)
- Make sure *allure-pytest command line tool is installed!*
To check, run the command:
allure --version
If not installed, please go through Pre-requisites section above.
Run the following command:
allure serve results/allure
Videos
Features
Country |
Percent |
Download Count |
---|---|---|
US |
41.14% |
34,222 |
CN |
11.42% |
9,503 |
DE |
7.64% |
6,356 |
HK |
5.62% |
4,673 |
SG |
4.39% |
3,648 |
RU |
4.18% |
3,478 |
JP |
3.30% |
2,745 |
KR |
3.21% |
2,668 |
FR |
2.86% |
2,379 |
CA |
1.98% |
1,645 |
GB |
1.89% |
1,569 |
NO |
1.77% |
1,473 |
AU |
1.35% |
1,120 |
IN |
1.28% |
1,066 |
SE |
1.18% |
982 |
DK |
0.71% |
588 |
FI |
0.66% |
549 |
NL |
0.61% |
508 |
IE |
0.58% |
485 |
TH |
0.58% |
484 |
HR |
0.58% |
481 |
ES |
0.47% |
389 |
TW |
0.44% |
363 |
IL |
0.43% |
361 |
AE |
0.40% |
332 |
CH |
0.32% |
269 |
ZA |
0.31% |
255 |
CZ |
0.17% |
144 |
BR |
0.09% |
78 |
PL |
0.07% |
61 |
TR |
0.06% |
46 |
CW |
0.05% |
44 |
IS |
0.05% |
42 |
OM |
0.05% |
42 |
RO |
0.03% |
24 |
BG |
0.03% |
21 |
GF |
0.02% |
16 |
BE |
0.02% |
14 |
UA |
0.01% |
10 |
IT |
0.01% |
10 |
AT |
0.01% |
9 |
CY |
0.01% |
8 |
CL |
0.01% |
6 |
DZ |
0.00% |
4 |
VN |
0.00% |
3 |
AR |
0.00% |
3 |
EE |
0.00% |
3 |
SK |
0.00% |
2 |
SI |
0.00% |
1 |
RS |
0.00% |
1 |
MX |
0.00% |
1 |
PT |
0.00% |
1 |
Total |
100.00% |
83,185 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nrobo-2024.43.1.tar.gz
.
File metadata
- Download URL: nrobo-2024.43.1.tar.gz
- Upload date:
- Size: 82.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6a6fe3dc3a9dca7673bec0cc3a915ee804cd5571f97089c7095d1009d777851 |
|
MD5 | 749d72288edf68ec4c74381cd8c8003c |
|
BLAKE2b-256 | 09aeb3d2103da43b8cea8748ce6edab531a3889b7d9d0a941a6ec6e2539671d7 |
File details
Details for the file nrobo-2024.43.1-py3-none-any.whl
.
File metadata
- Download URL: nrobo-2024.43.1-py3-none-any.whl
- Upload date:
- Size: 98.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 894f8c2daf51d3ff241a0f12345dce59cf1fd4afd722705f86800ef809f7c01b |
|
MD5 | cf8f3949430b19dfc16fb74774ad0e9e |
|
BLAKE2b-256 | d7895540ce147c860781dd84e5c1f1c74912c3844066294736546aafd375c0f7 |