Skip to main content

Powerful! Yet, Easy to USE! Automated Testing Framework

Project description

nRobo image not found!

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.

  1. Install Python (3.11 or higher)
    python --version
    # or
    python --version
  2. Install Java (11 or higher)
    java --version
  3. Install allure command line tool.
    • Check Install guide

    • Run the following command to check if allure cli is installed

    allure --version
  4. Install Target Browsers on testing systems

Installation

  1. 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
  1. Install virtualenv package

pip install virtualenv
  1. Create virtual environment - .venv

virtualenv .venv
  1. Activate virtual environment

    • Unix/Mac/Linux

    source .venv/bin/activate
    • Windows

    .\\.venv\\Scripts\\activate
  2. Install nrobo

pip install nrobo --require-virtualenv
  1. Install & run framework in single command

nrobo --instances 10
  1. Run tests
    1. Minimal switches

    nrobo --browser chrome_headless --report allure
    1. 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:

      1. Test url (–url switch)

      2. Credential: (username, password)=(shiv, tandav)

      3. Run bunch of 10 tests at once (–instances switch)

      4. Rerun addition 2 times the tests which got failed (–reruns switch)

      5. Target browser = Headless Chrome (–browser switch)

Notes for running -b=anti_bot_chrome:

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:
  1. Pure-nCLI-switches
    • Only nCLI specific switches. Non-PyTest CLI switches.

  2. nCLI shadowing switches
    • These are PyTest switches overriden by nCLI with a new long or short name. These are at core, pure PyTest switches.

  3. 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.

  1. 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.

  2. 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’

  3. 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:

  1. 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.

  2. 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

Download Statistics

Country

Percent

Download Count

US

41.26%

19,014

CN

13.03%

6,006

RU

5.37%

2,475

SG

5.06%

2,334

DE

4.06%

1,872

HK

3.91%

1,803

JP

3.18%

1,466

FR

3.05%

1,407

CA

2.79%

1,284

KR

2.75%

1,269

GB

1.86%

859

AU

1.86%

855

NO

1.62%

747

IN

1.56%

720

SE

1.25%

576

HR

0.82%

380

TH

0.82%

378

TW

0.79%

362

DK

0.71%

325

IE

0.67%

309

ES

0.57%

262

IL

0.55%

253

NL

0.52%

241

CH

0.41%

191

AE

0.35%

163

FI

0.20%

90

ZA

0.19%

89

PL

0.13%

61

TR

0.10%

44

CW

0.10%

44

OM

0.09%

42

IS

0.09%

42

CZ

0.09%

42

BR

0.05%

24

RO

0.05%

24

UA

0.02%

8

CY

0.01%

6

GF

0.01%

6

EE

0.01%

3

AR

0.01%

3

SK

0.00%

2

PT

0.00%

1

RS

0.00%

1

MX

0.00%

1

Total

100.00%

46,084

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

nrobo-2024.24.5.tar.gz (65.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nrobo-2024.24.5-py3-none-any.whl (81.6 kB view details)

Uploaded Python 3

File details

Details for the file nrobo-2024.24.5.tar.gz.

File metadata

  • Download URL: nrobo-2024.24.5.tar.gz
  • Upload date:
  • Size: 65.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for nrobo-2024.24.5.tar.gz
Algorithm Hash digest
SHA256 64b64eed77562da1ec8984bec30b78ff6064ac90429fbe71c4335d00ea51c7b7
MD5 1b568a94749739e9ea5183f75f74f7a6
BLAKE2b-256 44993e450dfe77dae0f6861275214097e9497160fcb139a9ae31044d6a119a4f

See more details on using hashes here.

File details

Details for the file nrobo-2024.24.5-py3-none-any.whl.

File metadata

  • Download URL: nrobo-2024.24.5-py3-none-any.whl
  • Upload date:
  • Size: 81.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for nrobo-2024.24.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e08e0cbccc61c2f87c54fee1575b42cfa489f6799265b3ac83d300e9526d77f4
MD5 e047538cd66a6eb5b686ad0bbd95ba3d
BLAKE2b-256 813947ee8970fce4aba0de073f42c17a134bc02766b5d2a62f991b4a16fad650

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page