reading-notes

Game of Greed Reading

Random Modules in Python

Random Functions:

  1. Randint: used to get a random number from a given range, it takes two parameters, the high and low values that determine the range. Example:

import random

print random.randint(0, 5), the output should be a number from 1 to 5, 0 is not included .

  1. Random: used for a large range of numbers, Example:

import random

random.random() * 100 gives a random number from 0 to 100

  1. Choice: it’s used to get a random element from a given list. Example:

import random

random.choice( ['red', 'black', 'green'] ). the output would be any element from the list .

  1. Shuffle: shuffles the list elements’ order so they would have a random order. Example;

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]]

  1. Randrange: Generate a randomly selected element from range, it takes three arguments which are : (start, stop, step). Example:

import random

for i in range(3):

print random.randrange(0, 101, 5)

Risk Analysis in Software Testing

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:

Risk Identification:

Risk Assessment:

the following graph shows the assessment process

risk

How to perform Risk Analysis?

  1. Searching the risk

  2. Analyzing the impact of each individual risk

  3. Measures for the risk identified

TestCoverage

Test coverage is a useful tool for finding untested parts of a codebase.

test coverage

measure your testcoverage level :

enough testing will be checked if the two following points is true: