Random modules allows you to access many operation, it’s used in Python by importing it:
import random
import random
print random.randint(0, 5)
, the output should be a number from 1 to 5, 0 is not included .
import random
random.random() * 100
gives a random number from 0 to 100
import random
random.choice( ['red', 'black', 'green'] ).
the output would be any element from the list .
from random import shuffle
x = [[i] for i in range(10)]
shuffle(x)
Sample output:
print x gives [[9], [2], [7], [0], [4], [5], [3], [1], [8], [6]]
import random
for i in range(3):
print random.randrange(0, 101, 5)
Risk Analysis in Software Engineering is the process of analyzing the risks associated with your Testing Project.
the possible risks that you developers could encounter:
Risk magnitude indicators:
High: when the effect of the risk would be very high and non-tolerable.
Medium: it is tolerable. The company may suffer financially but there is a limited risk.
Low: it is tolerable. There lies little or no external exposure or no financial loss.
Risk Identification:
Business Risks
Testing Risks
Premature Release Risk
Software Risks
the following graph shows the assessment process
Searching the risk
Analyzing the impact of each individual risk
Measures for the risk identified
Test coverage is a useful tool for finding untested parts of a codebase.
The trouble is that high coverage numbers are too easy to reach with low quality testing. At the most absurd level you have AssertionFreeTesting.
TDD is a very useful, but certainly not sufficient, tool to help you get good tests. if you write good and meaningful tests, your tests coverage percentage would be about 80 to 90%
Certainly low coverage numbers are a sign of trouble. But high numbers don’t necessarily mean much, and lead to ignorance-promoting dashboards.
enough testing will be checked if the two following points is true: