Capitolo 6 – Insights

Di seguito riportiamo ulteriori approfondimenti di tematiche che sono state segnalate da chi ha sostenuto l’esame PSD I.

Static program analysis

“It is the analysis of computer software that is performed without actually executing programs, in contrast with dynamic analysis, which is analysis performed on programs while they are executing. In most cases the analysis is performed on some version of the source code, and in the other cases, some form of the object code. The term is usually applied to the analysis performed by an automated tool, with human analysis being called program understanding, program comprehension, or code review. Software inspections and software walkthroughs are also used in the latter case (Wikipedia)”

Static program analysis is the art of reasoning about the behavior of computer programs without actually running them. This is useful not only in optimizing compilers for producing efficient code but also for automatic error detection and other tools that can help programmers.

Static Program Analysis – Anders Møller and Michael I. Schwartzbach – Department of Computer Science, Aarhus University – Last revision: December 2019

What is the difference between Unit Testing and Integration Testing?

In Software Development Life Cycle, normally software application does not developed by a single developer. The software application is divided into different modules and modules are allocated to different development teams. When a module is developed by developer and it is tested for functionality then it is known a Unit testing. Once all modules are developed and integrated with other modules then Integration testing is to be carried out to discover the issues arise when different modules are interacting with each other to build overall system.

UNIT TESTING INTEGRATION TESTING
Unit testing is a type of testing to check if the small piece of code is doing what it is suppose to do. Integration testing is a type of testing to check if different pieces of the modules are working together.
Unit testing checks a single component of an application. The behavior of integration modules is considered in the Integration testing.
The scope of Unit testing is narrow, it covers the Unit or small piece of code under test. Therefore while writing a unit test shorter codes are used that target just a single class. The scope of Integration testing is wide, it covers the whole application under test and it requires much more effort to put together.
Unit tests should have no dependencies on code outside the unit tested. Integration testing is dependent on other outside systems like databases, hardware allocated for them etc.
Unit Test is first type of testing is to be carried out in Software testing life cycle and generally executed by developer. Integration testing is carried out after Unit testing and before System testing and executed by the testing team.
Unit testing is not further sub divided into different types. Integration testing is further divided into different types as follows:
Top-down Integration, Bottom-Up Integration and so on.
Unit testing starts with the module specification.   Integration testing starts with the interface specification.
The detailed visibility of the code comes under Unit testing. The visibility of the integration structure comes under Integration testing.
Unit testing mainly focus on the testing the functionality of individual units only and does not uncover the issues arises when different modules are interacting with each other. Integration testing is to be carried out to discover the issues arise when different modules are interacting with each other to build overall system.
The goal of Unit testing is to test the each unit separately and ensure that each unit is working as expected. The goal of Integration testing is to test the combined modules together and ensure that every combined modules are working as expected.
Unit testing comes under White box testing type. Integration testing comes under both Black box and White box type of testing.

Conclusion: Integration testing will help to verify the overall system after developing the different modules. When issues observed in the integration test, the unit testing results for specific functionality will help to fix the issue. As a result both Unit testing and Integration testing is equally important. Source: what-is-difference-between-unit-testing-and-integration-testing

Different Types of Software Testing

Functional Testing types include: • Unit Testing • Integration Testing • System Testing • Sanity Testing • Smoke Testing • Interface Testing • Regression Testing • Beta/Acceptance Testing

Non-functional Testing types include: • Performance Testing • Load Testing • Stress Testing • Volume Testing • Security Testing • Compatibility Testing • Install Testing • Recovery Testing • Reliability Testing • Usability Testing • Compliance Testing • Localization Testing. Per i dettagli sulle descrizioni dei tipi di test fare riferimento a: types-of-software-testing

What is Continuous Integration and Continuous Delivery?

CI/CD is the acronym for the combined practices of Continuous Integration (CI) and Continuous Delivery (CD). CI/CD practices are currently the most widely accepted choice to shorten software development and delivery cycle time. Per i dettagli sulle descrizioni di CI/CD fare riferimento a: ci-cd-introduction

What is Continuous Integration (CI)? CI, pioneered by Gary Booch, software integration was first integrated as one of the key practices of Extreme Programming.

What is Continuous Delivery (CD)? Continuous delivery (CD) picks up where continuous integration ends. While CI is the process to build and test automatically, CD deploys all code changes in a build to the testing or staging environment.

What are the benefits of CI and CD?

Continuous Integration (CI) allows you to continuously integrate code into a single shared and easy to access repository. Continuous Delivery (CD) allows you to take the code stored in the repository and continuously deliver it to production. CI/CD creates a fast and effective process of getting your product to market before your competition as well as releasing new features and bug fixes to keep your current customers happy.

10 Top Benefits can be:

  1. Smaller Code Changes
  2. Fault Isolations
  3. Faster Mean Time To Resolution (MTTR)
  4. More Test Reliability
  5. Faster Release Rate
  6. Smaller Backlog
  7. Customer Satisfaction
  8. Increase Team Transparency and Accountability
  9. Reduce Costs
  10. Easy Maintenance and Updates

Source and Details: benefits-continuous-integration-delivery

Qui di seguito trovate alcune domande ricorrenti all’esame PSD I:

  1. What are three advantages of Continuous Integration?
  • A. Broken builds are detected quickly.
  • B. Readibility of code is improved.
  • C. The software is generally kept in a buildable state.
  • D. Know immediately how a check-in affected the build.
Correct Answer: A.C.D
  1. Which of the following best describes Continuous Integration?
  • A. A software development practice where members of a development team integrate and verify their work frequently, often multiple times each day, to detect integration errors as quickly as possible.
  • B. A software development practice where members of a development team all work on the same computer to ensure a common code base.
  • C. A software development practice that continuously integrates feedback from users into software design.
  • D. A software development practice used by Integration Teams to create best practice branching and merging strategies
Correct Answer: A.
  1. What are some shortcomings of code coverage as measurement for how well a system or product is tested? (Choose 3)
  • A. Code coverage does not ensure that the most important or highest risk areas of the code are being exercised by tests.
  • B. Code coverage does not necessary provide functional coverage.
  • C. Code coverage incentives to write tests that simply increase code coverage, rather than tests that fond bugs without increasing coverage.
  • D. Code coverage metrics vary by development platform (e.g. NET, Java).
  • E. It is too complicated to explain to management
Correct Answer: A,B,C. Code coverage is a useful metric, but not in isolation. It should not be considered a replacement for effective test design techniques
  1. Which are the benefits of Test Driven Development (choose all that apply)?
  • A. It promotes good design and separation of concerns.
  • B. It improves quality and reduce bugs
  • C. It causes you to construct a test harness that can be automated
  • D. It speeds the overall development process
Correct Answer: A,B,C,D
  1. What does a test written with Test Driven Development represent?
  • A. A bug that will be uncovered.
  • B. A technical requirement that must be satisfied.
  • C. Something that completes the test coverage of a system.
  • D. An assignment from the lead quality engineer
Correct Answer: B. Since the test exists before the code that makes it pass, the test acts a requirement of the system under test. 
  1. Which are attributes of a good bug report (choose all that apply)?
  • A. Generic titles.
  • B. One bug per report.
  • C. Simple and repeatable reproduction steps
  • D. Vague statements or untested assumptions.
  • E. Assigning blame.
Correct Answer: A.D.E.
  1. Select three reasons why automated builds are important.
  • A. They allow frequent validation of the unit of software being worked on, ensuring it remains in a potentially shippable state.
  • B. They support continuous integration.
  • C. The build process is clearly defined and scripted, making it easy consistent and repeatable.
  • D. They eliminate the need for Build Engineers.
  • E. They ensure your product remains bug free.
Correct Answer: A, B, C.
  1. What is pair programming?
  • A. The Scrum Team is divided into several two-person Development Teams that consolidate work in Scrum of Scrum.
  • B. Two developers writing code together, providing constant peer review.
  • C. A developer and a tester work together to write and test code.
  • D. Managers doing performance reviews by comparing one programmer’s code to another’s
  • E. Two programmers write code separately. A third programmer integrates the work.
Correct Answer: B.

Articoli