Skip to content

Commit

Permalink
structure and test check changed
Browse files Browse the repository at this point in the history
  • Loading branch information
MarinaProsche committed Mar 11, 2024
1 parent d462a12 commit a53c77a
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 31 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/selenium_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ jobs:
docker-compose -f docker-compose-tests.yml build
- name: Run docker-compose-tests
run: |
docker-compose -f docker-compose-tests.yml up
./tests/docker_check_tests.sh
- name: Tests results
run: |
docker-compose -f docker-compose-tests.yml logs selenium-tests
if [ $(docker-compose -f docker-compose-tests.yml logs selenium-tests | grep -c "OK") -eq 1 ]; then
echo true
exit 0
else
echo false
exit 1
fi
docker-compose -f docker-compose-tests.yml up -d
chmod +x tests/scripts/docker_check_tests.sh
./tests/scripts/docker_check_tests.sh
# - name: Tests results
# run: |
# docker-compose -f docker-compose-tests.yml logs selenium-tests
# if [ $(docker-compose -f docker-compose-tests.yml logs selenium-tests | grep -c "OK") -eq 1 ]; then
# echo true
# exit 0
# else
# echo false
# exit 1
# fi

14 changes: 0 additions & 14 deletions tests/docker_check_tests.sh

This file was deleted.

Binary file removed tests/example_of_pres.pptx
Binary file not shown.
Binary file removed tests/example_of_report.doc
Binary file not shown.
Binary file removed tests/example_of_report.docx
Binary file not shown.
9 changes: 4 additions & 5 deletions tests/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@
from basic_selenium_test import BasicSeleniumTest
from test_statistic import StatisticTestSelenium
from test_authorization import AuthTestSelenium
from test_pres_load import PresLoadTestSelenium
from test_single_card_check import SingleCheckTestSelenium
from test_version import VersionTestSelenium
from tests.test_file_load import FileLoadTestSelenium
from test_file_load import FileLoadTestSelenium

def parse_arguments():
parser = argparse.ArgumentParser(description='Run Selenium tests with specified data')
parser.add_argument('--host', type=str, default='http://127.0.0.1:8080', help='Host address for testing')
parser.add_argument('--login', type=str, required=True, help='insert Username')
parser.add_argument('--password', type=str, required=True, help='insert Password')
script_dir = os.path.dirname(os.path.abspath(__file__))
parser.add_argument('--pres', type=str, default=os.path.join(script_dir, 'example_of_pres.pptx'), help='your path to press for testing')
parser.add_argument('--report', type=str, default=os.path.join(script_dir, 'example_of_report.docx'), help='your path to report in .docx')
parser.add_argument('--report_doc', type=str, default=os.path.join(script_dir, 'example_of_report.doc'), help='your path to report in .doc')
parser.add_argument('--pres', type=str, default=os.path.join(script_dir, 'tests_data/example_of_pres.pptx'), help='your path to press for testing')
parser.add_argument('--report', type=str, default=os.path.join(script_dir, 'tests_data/example_of_report.docx'), help='your path to report in .docx')
parser.add_argument('--report_doc', type=str, default=os.path.join(script_dir, 'tests_data/example_of_report.doc'), help='your path to report in .doc')


return parser.parse_args()
Expand Down

0 comments on commit a53c77a

Please sign in to comment.