reading-notes

Software Development Reading Notes

View on GitHub

How to use the Random Module in Python

We want the computer to pick a random number in a given range Pick a random element from a list, 
pick a random card from a deck, flip a coin etc. When making your password database more secure or 
powering a random page feature of your website.

Risk Analysis in Software Testing

risk analysis is the process of identifying the risks in applications or software that 
you built and prioritizing them to test. After that, the process of assigning the level of risk 
is done. The categorization of the risks takes place, hence, the impact of the risk is calculated.

helps the developers and managers to mitigate the risks. When a test plan has been created, risks involved in testing the product are to be taken into consideration along with the possibility of the damage they may cause to your software along with solutions.

Use of new hardware
Use of new technology
Use of new automation tool
The sequence of code
Availability of test resources for the application

Business Risks: This risk is the most common risk associated with our topic. It is the risk that may come from your company or your customer, not from your project.

Testing Risks: You should be well acquainted with the platform you are working on, along with the software testing tools being used.

Premature Release Risk: a fair amount of knowledge to analyze the risk associated with releasing unsatisfactory or untested software is required

Software Risks: You should be well versed with the risks associated with the software development process.

Searching the risk

Analyzing the impact of each individual risk

Measures for the risk identified

Test Coverage

Test coverage is a useful tool for finding untested parts of a codebase.
Test coverage is of little use as a numeric statement of how good your tests are.

Dependency Injection

dependency injection is a technique whereby one object (or static method) supplies the dependencies of another object.
A dependency is an object that can be used (a service).

When class A uses some functionality of class B, then its said that class A has a dependency of class B.

1, constructor injection: the dependencies are provided through a class constructor.
2, setter injection: the client exposes a setter method that the injector uses to inject the dependency.
3, interface injection: the dependency provides an injector method that will inject the dependency into
any client passed to it. Clients must implement an interface that exposes a setter method that accepts the dependency.

Help unit testing
Extending the application and enable loose coupling
Complex to learn
Compile errors