Skip to content

Commit

Permalink
fix the test
Browse files Browse the repository at this point in the history
  • Loading branch information
pancht committed Mar 4, 2024
1 parent bebb5fe commit f07b844
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
[//]: <> (The format is based on Keep a Changelog keepachangelog.com/)
[//]: <> (and this project adheres to Semantic Versioning semver.org/)

### [2024.25.0] - On 2024.03.04

#### Added
- Introduced a new nRoBo command line switch, --title. If supplied, sets a custom report title of HTML report.
- Added feature to run tests from specific modules, classes and packages.

### [2024.24.0] - On 2024.03.01

#### Added
Expand Down
8 changes: 5 additions & 3 deletions framework_tests/nrobo_args/test_nrobo_args_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
class TestNroboArgsPackage():
"""Tests for nrobo.cli.nrobo_args package"""

DEFAULT_NROBO_ARGS = ['-n', '1', '--reruns-delay', '1', '--html', 'results/report.html',
DEFAULT_NROBO_ARGS = ['--app', 'nRoBo', '--title', 'Test_Automation_Report',
'-n', '1', '--reruns-delay', '1', '--html', 'results/report.html',
'--durations-min', '0.005', '--verbosity', '0', '--browser',
'chrome', '--cache-clear', '--color', 'yes',
'-r', 'fE', '--code-highlight', 'yes', '--junit-xml', 'results/junit-report.xml', '--alluredir', 'results/allure']
'-r', 'fE', '--code-highlight', 'yes', '--junit-xml',
'results/junit-report.xml', '--alluredir', 'results/allure']

def _replace_and_get_default_key_value(self, key, value) -> [str]:
"""Replace key-value if given <key> is found in default nRoBo args
Expand Down Expand Up @@ -178,7 +180,7 @@ def test_nrobo_cli_arg_app_switch(self):
command = ['pytest', SWITCH, APP]
sys.argv = command.copy()

self._assert_command(command)
self._assert_command_replace_default_values(SWITCH, APP)

def test_nrobo_cli_arg_url_switch(self):
"""Validate nRoBo cli --url switch: --url URL"""
Expand Down
2 changes: 1 addition & 1 deletion nrobo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@email: erpanchdev@gmail.com
"""

__version__ = '2024.24.6'
__version__ = '2024.24.9'

# install rich library
import os
Expand Down
6 changes: 2 additions & 4 deletions nrobo/cli/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,8 @@ def launcher_command(exit_on_failure=True):
command.append(str(value))
elif key in nCLI.ARGS:
"""process nrobo specific keys"""
if key in [nCLI.APP, nCLI.URL, nCLI.USERNAME, nCLI.PASSWORD, nCLI.BROWSER_CONFIG]:
if key == nCLI.APP:
os.environ[EnvKeys.APP] = value
elif key == nCLI.URL:
if key in [nCLI.URL, nCLI.USERNAME, nCLI.PASSWORD, nCLI.BROWSER_CONFIG]:
if key == nCLI.URL:
os.environ[EnvKeys.URL] = value
elif key == nCLI.USERNAME:
os.environ[EnvKeys.USERNAME] = value
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"
# Project details
[project]
name = "nrobo"
version = "2024.24.6"
version = "2024.24.9"
authors = [{name="Panchdev Singh Chauhan", email="erpanchdev@gmail.com"}]
maintainers = [{name="Panchdev Singh Chauhan", email="erpanchdev@gmail.com"}]
description = "Powerful! Yet, Easy to USE! Automated Testing Framework"
Expand Down
6 changes: 3 additions & 3 deletions validatetest_individually.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from framework_tests.nrobo_args.test_nrobo_args_package import TestNroboArgsPackage

t = TestNroboArgsPackage()
t.test_nrobo_cli_arg_pyargs_switch()
t.test_nrobo_cli_arg_color_switch_with_invalid_value()
t.test_nrobo_cli_arg_app_switch()
# t.test_nrobo_cli_arg_color_switch_with_invalid_value()

from framework_tests.version.test_version_pkg import TestVersionPkg
t = TestVersionPkg()

t.test_arithmetic_operations_on_Version_class()
# t.test_arithmetic_operations_on_Version_class()
2 changes: 1 addition & 1 deletion versions/prod.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: 2024.24.6
version: 2024.24.9
2 changes: 1 addition & 1 deletion versions/test.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: 2024.24.6
version: 2024.24.9

0 comments on commit f07b844

Please sign in to comment.