Skip to content

New Tests from telegram team#2

Open
Iwillfinduo wants to merge 18 commits into
devfrom
feature-BL-22-testing
Open

New Tests from telegram team#2
Iwillfinduo wants to merge 18 commits into
devfrom
feature-BL-22-testing

Conversation

@Iwillfinduo

Copy link
Copy Markdown

No description provided.

@antonchuvashow antonchuvashow left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Если придумаете что-то еще, то отлично, если нет, то переходим к другим блокам сервиса и пишем тесты.

Не забываем, что тесты должны быть следующих видов:

  • Проверка отдельных модулей или функций на корректность их работы.
  • Проверка взаимодействия между различными модулями или компонентами.
  • Проверка функциональности с точки зрения конечного пользователя.
  • Проверка производительности при высоких нагрузках.
  • Проверка на наличие уязвимостей.
  • Проверка способности восстанавливаться после сбоев или ошибок (тесты на дурака).
  • Проверка поведения при экстремальных или крайних значениях входных данных.

Хорошо так же использовать случайные тесты, например с помощью библиотеки Faker.

Comment thread tests/core_tests.py
Comment thread tests/core_tests.py
Comment thread tests/core_tests.py Outdated
Comment thread tests/telegram_connector_tests.py Outdated
Comment thread tests/telegram_connector_tests.py Outdated

@antonchuvashow antonchuvashow left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Разбейте class TestTelegramSendingMessage на классы по префиксам ваших функций (catching_response и т.д.), чтобы убрать эти длинные названия; но названия сами хорошие.

Я прогнал тесты с покрытием, сейчас они покрывают треть файлов telegram_connector'а, и на 100% файл telegram_message.py – это хорошо.

Base automatically changed from feature-BL-22 to dev April 19, 2024 11:01
Comment thread tests/telegram_connector_tests.py Outdated
question = TestQuestion(text='Sample Question',
id=3,
subject='Sample Subject',
options='["1", "2", "3", "4"]',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут список должен быть ["1", "2", "3", "4"] без кавычек

@notion-workspace

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants