-
Notifications
You must be signed in to change notification settings - Fork 1
IntegrationTests
The integration tests have been written to verify that the Kentico Kontent documentation portal and its integrations with other services such as Kentico Kontent, Algolia or GitHub work correctly.
The tests can be run locally by running yarn test
in the console. To ensure the correctness of the whole system automatically, the tests are run once a day as a CRON job on the Travis CI service. If the tests fail, developers are notified through a Teams channel.
The integration tests are designed to test various scenarios that can occur when content developers work with the Kentico Kontent documentation portal. The test suite consists of tests testing one simple scenario and tests that include complex use cases.
The test environment uses its own Kentico Kontent project, development instances of the Azure function services and a separate index on Algolia. Before the tests are run, a clean environment is prepared: all leftover content items, content types, and taxonomies are deleted from the Kentico Kontent test project and afterwards, content types and taxonomies are copied from the live Kentico Kontent project. This ensures that the tests are run against the most recent version of the content types and taxonomies.
The Kentico Kontent Docs test website used in the integration tests needs several content items to be published in Kentico Kontent to display the content correctly. The required items by the web are:
- author
- footer
- topic
- scenario
- navigation_item
- home
- ui_messages
The simple tests follow similar scenario:
- Upsert a content item to Kentico Kontent.
- Upsert a content language variant with specific content and insert it into parent item (topic/navigation item).
- Publish every related item.
- Check the specific content in Algolia's index through Algolia's API.
- Using Selenium type specific content into search input on the test version of the Kentico Kontent documentation website and click on the search result.
- Check the search suggestion text, the current URL, content on the page and the heading of the article.
The more advanced tests differ in the more complex workflow scenario in Kentico Kontent, e.g.:
- An article content item is created with some content and published - some tests utilize the Publisher service by setting the item to cascade publish or scheduled to publish workflow step; afterwards, the Publisher service is triggered to run the service immediately.
- The content is checked on Algolia and website.
- The article is unpublished in Kentico Kontent and checked if it has been deleted also from Algolia and can't be searched on the website.
- The content of the article is then updated and again published.
- The updated content is searched on Algolia and the website.
- Overview
- Website
- Dispatcher
- Notifier
- Search Functionality
- GitHub Integration
- Bulk Publishing / Scheduling to Publish
- API Reference
- Integration Tests
- Content Models