reading-notes

reading notes for code fellows


Project maintained by dLeigh01 Hosted on GitHub Pages — Theme by mattgraham

Ten Thousand Game 1

The concepts in today’s readings are important mostly in terms of testing and development. Risk analysis and test coverage will keep your code from having too many bugs and will give you a better handle on good code straight out of the gate. The random module also is a good module to have knowledge of for future assignments.

How to Use the Random Module

The Random Module is a piece of python code that allows you to generate random numbers.

What is Risk Analysis

In software testing, risk analysis is the process of identifying risks and prioritizing them for testing/assigning each a level of risk. By using risk analysis at the start of a project, you can analyze the most likely problem areas and work to mitigate the possible issues before or as they arise. Some possible risks include use of new hardware, new technology, new tools for automation, the sequence of the code, and availability of test resources. Some unavoidable risks are the time allocated for testing, a defect leakage due to the project’s complexity, client urgency, and incomplete requirements. In any case, you should conduct a risk assessment meeting, use maximum resources to work on the highest-risk areas, create a risk assessment database for future use, and identify and notice the risk magnitude indicators (high - effect of the risk is non-tolerable, medium - it is tolerable but not desirable, low - it is tolerable).

The different types of risks include business risks - the risk may come from the company or customer rather than the project, testing risks - keep aware of the software and testing tools you are using, premature release risks - be sure to understand the risk of releasing unsatisfactory software, software risks - the normal risks associated with the development process. After you know what type of risk you are dealing with, you then need to assess it. The three perspectives of risk assessment are effect - you identify a condition event or action and try to determine the impact, cause - the opposite of effect, find the problem and work backwards to the cause, and likelihood - find the probability a requirement won’t be satisfied.

To actually perform risk assessment you need to first search for the risk, analyze the impact of each individual risk, and then create measures for the risk identified.

Test Coverage

Test coverage shouldn’t only be a measure of how many possibile outcomes you have covered in your tests. An important part of testing is to have good tests, not just tests that are designed to pass. The way to know you have good tests is that you rarely get bugs that escape and you aren’t afraid to change your code for fear of failing the tests. A good percentage to hit on test coverage is somewhere in the 80-90’s.

Things I Want to Know More About

I’d really like to know how pytest-cov does what it does, how does it know how many possible outcomes there are and what actually require different tests versus those that don’t?

Discussion

Risk analysis for software is like risk analysis for anything, it’s finding things that could possibly go wrong before they do and working on finding ways to avoid them. Test coverage as a topic today was more about how not to use it - it doesn’t matter if you get 100% on the test if you don’t know how you got the answers and everything goes wrong later on down the line. The random module is, again, similar to randomizing numbers in javascript, and I assume works in the same way.

[< table of contents]

[< home]