Game of Greed 1
Random Module in Python
- Random module is used when a random number feature is required; e.g. choosing a random number/item/card..etc
- can be imported through (import random)
What is a random module?
provides access to functions that support many operations allows you to generate random numbers
Random Functions
- Randint(random integer between two integers)
Example: random.randint(0, 5)
- Random(large random number)
Example: random.random() * 100
- Choice (random value from the sequence sequence, e.g. a list)
Example: random.choice( [‘red’, ‘black’, ‘green’] )
- Shuffle (shuffles a list’s elements)
Example: shuffle([[i] for i in range(10)])
- Randrange (random element from a given range)
Example: random.randrange(0, 101, 5)
Risk Analysis in Software Testing
- Risk Analysis is a process where the potential risks ;problem areas in the built software are identified, categorized and calculated.
- It is used in software testing, so that it mitigates the risks.
Possible Risks:
- Use of new hardware
- Use of new technology
- Use of new automation tool
- The sequence of code
- Availability of test resources for the application
Unavoidable Risks:
- testing time
- defect leakage(application size or complexity)
- clients’ urgency
- Incomplete requirements
risk magnitude indicators can be high, medium, or low.
Risk Identification Process
- Business Risks
- Testing Risks
- Premature Release Risk
- Software Risks
Risk Assessment(Effect-> Cause -> Likelihood)
- perspective : > Effect – To assess risk by Effect. In case you identify a condition, event or action and try to determine its impact.
Cause – To assess risk by Cause is opposite of by Effect. Initialize scanning the problem and reach to the point that could be the most probable reason behind that.
Likelihood – To assess risk by Likelihood is to say that there is a probability that a requirement won’t be satisfied.
- How to perform Risk Assessment?
- Search the risk –> Analyze the risk impact –> Measure the risk