An Efficient Combination of Several Frameworks on a Project

No votes yet.
Please wait...

It’s hard to say whether it’s good to use more than one frameworks on a project.

The answer will probably be “Yes” since it’s highly recommended to work with several frameworks, that can be used for more than purpose.

In fact, it’s not hard to configure the usage of several frameworks.

Further, we’ll analyze when this should be used and when it should not be done.

There is no universal method of its usage

You should use tools and other software, designed for specific tasks.

For example, software that is used for feature tests will not be a good fit to perform unit testing.

Unit tests can directly call internal settings and methods of software code, and feature tests interact only with live versions of a product (through an internal user or service).

This means that every test group of such a type requires its own personal solution and the solution, in its turn, is based on using certain software and frameworks.

For example, Behave is a popular BDD framework under the Python programming language.

Authors create test cases on the basis of the Gherkin programming language with numerous Python functions in a form of a certain set of test steps.

All test cases written in Gherkin are completely readable and clear, therefore, they are a good fit for testing high-level behavior using interaction with web pages as an example.

But at the same time, BDD frameworks make this more complex and can prevent the creation of unit tests.

Unit tests are technically very similar to software and are located on the lowest level since they directly call software product code.

PyTest framework will be a perfect match for unit testing.

And vice versa: all feature tests can be created only on PyTest but Behave has a more typical architecture for describing test features.

Therefore, it’s logical to suppose that using separate solutions for different types of tests will the best decision.

A Combination of Frameworks

A Combination of Frameworks

Using one or two repositories

If several test solutions are used on your project, the following problem arises — where should we locate software code?

Should it be located in the same repository as project code or should a development department put tests in separate repositories?

There is no correct answer to this question since we should take into account the following criteria:

1. Unit tests should be located in the same place where the software code that tests them is located. Every unit test depends on code. They should be created in the same language. We should always perform unit testing during code refactoring;
2. Feature tests can be located in the same place or in a separate repository. It’s recommended to add them in the same place where project software code is located if they are written in the same language and if the entire code is located in the same repository. In this case, test version control is done together with the product that is being tested. Otherwise, it’s recommended to store feature tests in a separate repository. Multilingual development repositories are hard at their support and version control for software with several repositories should be done in another way.

Conclusion

To sum up, we’d like to admit that various testing tools and frameworks can (and should be) used for different purposes and tasks.

There is no universal combination to carry out all tasks. We simply need to select proper tools to perform the tasks that quality assurance companies should do immediately.

Leave A Comment