commit 41aef597754163327513b8d6baaa2cc48de05cef Author: Konstantin Koslowski Date: Mon Feb 14 17:37:22 2022 +0100 nomr: initial commit diff --git a/nomr/main.py b/nomr/main.py new file mode 100644 index 0000000..3a1fbed --- /dev/null +++ b/nomr/main.py @@ -0,0 +1,4 @@ +import robot + +def main(): + robot.run("nomr/nom.rst", outputdir="results") diff --git a/nomr/nom.resource b/nomr/nom.resource new file mode 100644 index 0000000..7c5a6da --- /dev/null +++ b/nomr/nom.resource @@ -0,0 +1,38 @@ +*** Settings *** +Library OperatingSystem +Library lib/libNom.py + + +*** Keywords *** +res success + nom success + Result is True + +res fail + nom fail + Result is False + +res echo + [Arguments] ${arg} + nom echo ${arg} + Result is ${arg} + +res rand + [Arguments] ${max} ${val} + nom rand ${max} + Result leq ${val} + +res nslookup + [Arguments] ${host} ${ip} + nom nslookup ${host} + Result is ${ip} + +res ping + [Arguments] ${host} ${max} + nom ping ${host} + Result leq ${max} + +res speedtest + [Arguments] ${dir} ${min} + nom speedtest ${dir} + Result geq ${min} diff --git a/nomr/nom.rst b/nomr/nom.rst new file mode 100644 index 0000000..4714686 --- /dev/null +++ b/nomr/nom.rst @@ -0,0 +1,46 @@ +.. default-role:: code + +Settings +======== + +.. code:: robotframework + + *** Settings *** + Resource nom.resource + + +Test Cases +========== + +inactive +-------- + + success + res success + + fail + res fail + + echo + res echo foo + res echo bar + +.. code:: robotframework + + *** Test Cases *** + nslookup + res nslookup unifi.nom 192.168.11.4 + res nslookup innocence.nom 192.168.11.11 + res nslookup hifiberry1.nom 192.168.11.31 + res nslookup voronberry.nom 192.168.11.35 + res nslookup hhi.fraunhofer.de 193.174.67.39 + res nslookup google.de any + res nslookup wrong.nom False + + ping + res ping unifi.nom 1 + res ping google.de 20 + + speedtest + res speedtest up 25 + res speedtest down 85 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..fe45cf8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,24 @@ +[tool.poetry] +name = "nomr" +version = "0.1.0" +description = "test nom in roboto" +authors = ["Konstantin Koslowski "] +license = "MIT" + +[tool.poetry.dependencies] +python = "^3.10" +robotframework = "^4.1.3" +docutils = "^0.18.1" +dnspython = "^2.2.0" +ping3 = "^3.0.2" +speedtest-cli = "^2.1.3" + +[tool.poetry.dev-dependencies] + +[tool.poetry.scripts] +nomr = "nomr.main:main" +nom = "nomr.lib.nom:main" + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api"