axcxl / overwatcher

Ultra-lightweight automated testing framework for CLIs.
MIT License
0 stars 0 forks source link

Pass parameters to a test #5

Closed axcxl closed 6 years ago

axcxl commented 8 years ago

Useful for batch execution (if every test is ran by hand, you can modify the setup_test function to receive user input for example).

axcxl commented 8 years ago

IMPLEMENTED (see the config.py code).

axcxl commented 6 years ago

Umm, not sure if impemented correctly.

Current idea: pass parameters (ip, port) + a dictionary that is appended to the markers stuff and is device dependent. This should contain the usual stuff, such as prompts and general stuff.

axcxl commented 6 years ago

Added parameters (currently only server, port and test file). Tests can now be written easier in YAML (but the old tests still run).

Left TODO: also add a device dictionary which is added besides the test. This is to make the test portable.

axcxl commented 6 years ago

Hmm, how about replace the device dictionary with regex for prompts? This will be more in line with the KIS(S) idea of the framework and we have one less thing to version and worry about :)

This means that markers need to be able to handle regular expressions.

axcxl commented 6 years ago

After looking at how regex look for a prompt, this will look too complicated and ugly.

Current idea: just remove the device specific part from the markers. Tested this on a few devices and it works OK.

Maybe in the future will add limited regex support for markers (like interpret as .), but for now closing this.