Commit graph

49 commits

Author SHA1 Message Date
cd00de6d01 change discvoery mask 2023-12-11 02:24:34 +01:00
94f03f946b move docs to docs dir 2023-12-11 02:17:08 +01:00
019d2c028c fixup 2023-12-11 02:06:43 +01:00
cf4cfdc4c9 improve imports 2023-12-11 02:05:29 +01:00
d22af87ca1 improve imports 2023-12-11 02:01:42 +01:00
f1c862c903 use URL 2023-12-11 02:00:48 +01:00
eacfd6582b use URL 2023-12-11 02:00:02 +01:00
705287c84d use URL 2023-12-11 01:59:11 +01:00
cf28a0631b Merge commit 'ba33d97c53' into cleanup 2023-12-11 01:52:53 +01:00
ba33d97c53 fix type and config for tests 2023-12-11 01:44:02 +01:00
8ba0121415 add working config 2023-12-11 01:27:00 +01:00
5a45255bd6 test 2023-12-11 01:25:47 +01:00
b5bd361569 wip pre-commit config 2023-12-11 01:14:58 +01:00
4d8033ca9d fix type 2023-12-11 01:14:44 +01:00
5368b667e6 add dev dependencies 2023-12-11 01:14:18 +01:00
7c1f1ff5d4 records -> results 2023-12-11 00:43:12 +01:00
093818bc81 results to status 2023-12-11 00:41:07 +01:00
27a0ff8a2e add load_test_credentials 2023-12-11 00:20:49 +01:00
f49029aeed add docstring 2023-12-11 00:14:13 +01:00
2f6d0c47e5 add load_json_to_environ 2023-12-11 00:12:51 +01:00
fed7d27136 add example 2023-12-11 00:09:28 +01:00
744a017eed unique check no longer necessary 2023-12-11 00:08:25 +01:00
5ce6be9745 disable test_wordpress_receive_email 2023-12-11 00:07:59 +01:00
de6a71b9c8 fixup 2023-12-11 00:07:53 +01:00
edc8c9a2f5 remove RunnerMeta, save path to class var instead 2023-12-11 00:00:16 +01:00
7ec75cd6a0 Use RunnerMeta to save path along with Runner subclass 2023-12-10 23:53:49 +01:00
4f8bceb587 rename functions 2023-12-10 23:20:06 +01:00
fec4e0a6ea add todo 2023-12-10 18:01:42 +01:00
a8479a56e3 add generate_random_string 2023-12-10 18:00:52 +01:00
ebac7f49fd add todos 2023-12-10 18:00:44 +01:00
3ffa2f8ecd turn create_result_file into classmethod 2023-12-10 18:00:36 +01:00
016b88a68d testing-html-merge (#15)
* add tests for merge_html_reports function

Reviewed-on: local-it-infrastructure/e2e_tests#15
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-12-09 15:28:48 +01:00
873bf73ae8 add api testing (#14)
* add fixture to make api calls with authentification

* add authentik test that checks the status of all blueprints

* add option to append any kind of data to html report

Reviewed-on: local-it-infrastructure/e2e_tests#14
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-12-09 12:34:25 +01:00
d1ff1183a5 refactoring (#13)
* general project refactoring

* various small improvements

* improve imap fixture with helper functions and typing

* add wordpress send email setup

* add wordpress receive email test

* add various documentation

Reviewed-on: local-it-infrastructure/e2e_tests#13
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-12-08 18:17:31 +01:00
41a042f07d add-resume (#12)
* add functionality to --resume flag. latest test will resume by running failed tests again

* fix nextcloud setup -> all tests passing

* fix expect timeout by moving it to its own fixture

Reviewed-on: local-it-infrastructure/e2e_tests#12
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-12-07 19:38:17 +01:00
0b4e0a0c16 remove-pythonpath-requirement (#11)
Before, recipes_dir had to be present in the importable paths of the python interpreter. This was solved by adding it to the PYTHONPATH env var. Now, abratest handles this by itself.

Reviewed-on: local-it-infrastructure/e2e_tests#11
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-12-07 17:21:19 +01:00
d2cfc089c3 fix-docker (#10)
* fix docker
-> use "pip install -e ." in installation
-> add symlinks in docker image
-> docker / non docker execution can run same main.py + cli

* remove sh scripts

* remove requirements.txt

Reviewed-on: local-it-infrastructure/e2e_tests#10
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-12-07 13:02:39 +01:00
8685688698 installable package (#9)
* turn repo into installable package (pip install -e .)

* add hatchling build packend

* call it pytest-abra

* add pytest entrypoint, so that it gets loaded automatically if installed (and pytest is run)

* make fixtures optional, so that pytest can still be used in other context

* add cli script -> you can now directly run "pytest-abra" in console

Reviewed-on: local-it-infrastructure/e2e_tests#9
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-12-07 11:32:01 +01:00
4c5a470a70 refactor so that coordinator instance is available in runner instance (#8)
-> all program states available

Reviewed-on: local-it-infrastructure/e2e_tests#8
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-12-06 12:05:13 +01:00
f9c21c6e6b refactor for independent test dirs (#7)
* make it so that the actual tests can be moved anywhere, for example in abra recipe repos
-> major refactoring with pytest test discovery magic

* create RUNNER_DICT dynamically with importlib
-> none of the tests are hardcoded, more tests can be added by placing a folder

* autoload fixtures with pytest plugins

* add URL fixture to navigate on web pages. Includes url parser based on python urllib to generate correct links

* fix nextcloud setups and tests

*  add email groundwork with imbox

Reviewed-on: local-it-infrastructure/e2e_tests#7
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-12-05 21:41:43 +01:00
3fa10aaa69 implement env manager (#6)
* add EnvManager class

* holds all functions that are env file related

* integrates runner dependency resolution

* add integration and unit tests for EnvManager

Reviewed-on: local-it-infrastructure/e2e_tests#6
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-12-04 17:09:01 +01:00
d3dc0f942a new-features (#5)
* refactoring and rework: runner now has setups / tests / cleanups as lists
* add nextcloud runner
* add email testing prototype with imap fixture
* add dependency resolution (sort env files in input so that test order is correct)

Reviewed-on: local-it-infrastructure/e2e_tests#5
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-12-04 12:46:30 +01:00
2e33f8f014 make-all-env-files-available (#4)
Before, a test had only access to it's own env file / configuration (wordpress could see wordpress env file). Now, all env files are available. Wordpress test can also read authentik env file, for example to get the authentik domain.

Reviewed-on: local-it-infrastructure/e2e_tests#4
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-11-30 10:53:20 +01:00
8172f685de rework-output-and-test-logic (#3)
* fix flakey tests in authentik / wordpress

* make it possible to rerun tests partially -> passed will be skipped, failed will be repeated

* improve organization of all outputs (moving, renaming, keeping multiple versions etc.)

* add html reports, replace .txt tracebacks

* combine all html reports into one

* add demo runner with comments for documentation purposes

Reviewed-on: local-it-infrastructure/e2e_tests#3
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-11-29 14:14:46 +01:00
d2cd6ba47f authentik setup and tracing (#2)
* authentik sessions created successfully during setup without breaking tracing

* setup works on EN and DE localization by using regex patterns

* automated tracing with pytest --trace option, manual hook no longer needed

Reviewed-on: local-it-infrastructure/e2e_tests#2
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-11-27 17:01:45 +01:00
97ed87c79f [WIP] Add new automated test framework (#1)
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-11-22 21:40:13 +01:00
859bd57006 test framework 2023-07-07 03:38:10 +02:00
5961516536 add config 2023-06-15 22:22:58 +02:00
6ec9b5df50 init 2023-06-15 21:53:12 +02:00