Sign inSign up

andasis/cli-e2e-tests

By andasis

•Updated about 5 years ago

End to end tests of commad line interface of andasis network devices

Image
1

1.4K

andasis/cli-e2e-tests repository overview

⁠CLI End to End Test Automation

⁠Usage

⁠1 - Running all test cases
docker run -i -t andasis/cli-e2e-tests
⁠2 - Running only one test case
docker run -i -t andasis/cli-e2e-tests -t test_001_enable_dhcp_snooping

[ Test Cases For DHCPSnoopingTest ]
== test_001_enable_dhcp_snooping ................................................... PASSED

-------------------------------------------------------------------------------------------
1 test cases run in 0:00:08.015775. Passed: 1, Failed: 0, Skipped: 0
⁠3 - Running all test cases in a module
docker run -i -t andasis/cli-e2e-tests -m create_user_test

[ Test Cases For CreateUserTest ]
== test_create_duplicate_user ...................................................... PASSED
== test_create_user ................................................................ PASSED
== test_create_user_with_max_username_length ....................................... PASSED
== test_create_user_with_too_long_username ......................................... PASSED
== test_create_user_with_too_short_username ........................................ PASSED
== test_remove_user ................................................................ PASSED

-------------------------------------------------------------------------------------------
6 test cases run in 0:00:17.638371. Passed: 6, Failed: 0, Skipped: 0
⁠4 - Running all test cases in a directory
 docker run -i -t andasis/cli-e2e-tests -p createUser

[ Test Cases For CreateUserTest ]
== test_create_duplicate_user ...................................................... PASSED
== test_create_user ................................................................ PASSED
== test_create_user_with_max_username_length ....................................... PASSED
== test_create_user_with_too_long_username ......................................... PASSED
== test_create_user_with_too_short_username ........................................ PASSED
== test_remove_user ................................................................ PASSED

-------------------------------------------------------------------------------------------
6 test cases run in 0:00:17.437831. Passed: 6, Failed: 0, Skipped: 0

NOTE THAT some directories may have more than one module

⁠use -h or --help parameter to see options
docker run -i -t andasis/cli-e2e-tests -h
usage: run.py [-h] [-l {path,module,all}] [-p PATH | -m MODULE | -t TESTCASE]

Andasis CLI e2e Tests

optional arguments:
  -h, --help            show this help message and exit
  -l {path,module,all}, --list {path,module,all}
                        path for lists just paths. module for included modules. all for included test cases
  -p PATH, --path PATH  select a path to test
  -m MODULE, --module MODULE
                        Select a module to test
  -t TESTCASE, --testcase TESTCASE
                        Select a test case to test
⁠use -l or --list parameter to see test cases and directories

-l path to see only directories

docker run -i -t andasis/cli-e2e-tests -l path 
+--- createUser
+--- dhcpConfiguration
+--- dnsConfiguration
...

-l module to see directories with modules

docker run -i -t andasis/cli-e2e-tests -l module -p dhcpConfiguration
+--- dhcpConfiguration
     \--- dhcp_config_test
     \--- dhcp_snooping_test

-l all to see directories with modules and test cases

docker run -i -t andasis/cli-e2e-tests -l all -p dhcpConfiguration
+--- dhcpConfiguration
     \--- dhcp_config_test
          \--- test_001_dhcp_enable_server_mode
          \--- test_002_disable_dhcp
          \--- test_003_set_dhcp_server_config_default
          \--- test_004_set_dhcp_server_config
          ...

Tag summary

Content type

Image

Digest

Size

56.6 MB

Last updated

about 5 years ago

docker pull andasis/cli-e2e-tests