Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

Tests: Add a few simple test wrapper shell scripts (#1308)

bcoles04675f60ef08
diff --git a/test/acceptance/run b/test/acceptance/run
new file mode 100755
index 00000000..06726eec
--- /dev/null
+++ b/test/acceptance/run
@@ -0,0 +1,7 @@
+#!/bin/bash
+# Run acceptance tests
+#
+# Requires robotframework:
+# cd test/acceptance; pip3 install -r requirements.txt
+
+time robot --outputdir results scan.robot
diff --git a/test/bandit b/test/bandit
index b3ffb6af..07c8903a 100755
--- a/test/bandit
+++ b/test/bandit
@@ -1,2 +1,7 @@
#!/bin/sh
-python3 -m bandit *.py modules/*.py
+# Run bandit static analysis checks
+#
+# Must be run from SpiderFoot root directory; ie:
+# ./test/bandit
+
+python3 -m bandit *.py spiderfoot/* modules/*.py
diff --git a/test/run b/test/run
new file mode 100755
index 00000000..6ba217e8
--- /dev/null
+++ b/test/run
@@ -0,0 +1,8 @@
+#!/bin/bash
+# Run unit and integration tests.
+# These same tests are run on all pull requests automatically.
+#
+# Must be run from SpiderFoot root directory; ie:
+# ./test/run
+
+time python3 -m pytest -n auto --flake8 --dist loadfile --durations=5 --cov-report term --cov=. .
diff --git a/test/update-requirements b/test/update-requirements
new file mode 100755
index 00000000..4aef61b9
--- /dev/null
+++ b/test/update-requirements
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Update and lock all pip packages to latest version.
+#
+# Must be run from SpiderFoot root directory; ie:
+# ./test/update-requirements
+#
+# Requires lock-requirements:
+# pip3 install lock-requirements
+
+lock requirements.txt
+git diff requirements.txt
+
+lock test/requirements.txt
+git diff test/requirements.txt
+
+# python3 -m safety check -r test/requirements.txt