G
G
glader2019-02-20 13:10:38
Python
glader, 2019-02-20 13:10:38

How to automatically break your code to check tests?

I heard that there are tools that make random changes to the code and check that the tests fail. If you didn’t fall, then this place is not covered by tests. Please advise such a tool. If you really used it, I will be glad to some feedback.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Drakosh, 2019-02-20
@glader

mutmut ( https://github.com/boxed/mutmut)

V
Vladimir Kuts, 2019-02-20
@fox_12

You are probably confusing with tests where various random changes are made to the input data, and the reaction is checked.
Since accidental editing in the code will break the program itself and it will stupidly not start.

I
Igor Statkevich, 2019-02-20
@MadInc

Um, almost any character, in almost any part of the code, will kill your code, you are confusing something.

B
Boris Korobkov, 2019-02-20
@BorisKorobkov

Perhaps you need to change not the code, but the data. Then it is called "fixtures" (Test fixture). Generate them yourself and in the tests describe the desired result for each.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question