Introduction to Testing

Testing is a process of checking how the software would behave in the time of its run. There are different aspects of testing software. But, generally speaking, testing is done to measure the efficiency, accuracy and possible faults of a software.

software-testing

There may be major consequences of using software directly officially and directly in commercial or research fields. To test any software it's necessary to make several test cases and deploy them. Test cases are nothing but, set of all possible values and parameters which the software can act upon.

A good test case is the one which is extreme in input for the software. In other words, a good test case should be able to invoke all the functions and modules present in the software and allow the software to work in a virtual environment as if it was deployed in the real environment.

Software testing can be done by, niche software developers to giant software developing companies. Testing is a core part of the developmental phase and without testing, releasing software is like putting a machine in an environment, which was never known to it.
why-testing-required

Why testing is required:

  • Testing is required to avoid risks in execution time.
  • Testing is required to measure the efficiency of it before its deployment in the practical field.
  • Testing is required so that the software reputation does not go bad.
  • Testing is required to see exactly measure or see how it behaves in extreme inputs.
  • Testing is required to measure the flaws beforehand so that the development phase can be made more accurate.
  • Testing enhances the credibility of the software.
  • Testing also makes the developer understand consumer behavior when testing is made to do with the only friendly set of customers while improving the business.
  • Testing can measure the durability of the software and power to handle a number of different inputs at a time to its modules or functions.

The number of points goes infinite for why we require testing.

Test case in Software Testing

Adverse effects if testing is not done properly

  • In business, faulty software may produce corrupt or faulty reports, which can eventually lead to making a huge loss.
  • A non-properly-tested software may be affected by vulnerabilities and may leak confidential data of any organization.
  • Lack of testing may be life-threatening if used in sensitive areas. For example, an automatic engine start after the main engine failure in any aircraft.
  • In areas where, the entire system is controlled by software, like in banks. If not tested properly, then it may come under the control of hijackers and the entire surveillance system may be directed to perform meaninglessly.
  • In systems where, there is no control of Humans, as in the satellites, where all the sensor inputs are like different test cases for the operating system of the satellite. In that case, tricky input may produce unreal results.
  • The software used in financial organizations are more prone to vulnerable attacks, and tricky input to the software may confuse the software due to the absence of trick handling modules, and finally may lead to loss of billions.
  • Improper testing may make it platform dependent, and it may not work fine when it's the base operating system is changed. And if done it adverse conditions, it may lead to total system failure.
  • A faulty software may give different outputs in a different environment, which does not make it consistent.
  • When a non-properly-tested software is connected to a major or core database, it may cease or reduce the atomicity of the database.

Software Testing Techniques

Testing vs Debugging

Testing:

  • Testing is the process of analyzing the behavior of the software but making several inputs (test cases) into it and seeing the output. Testing can be done on a completed phase of the software development life cycle, and not on incomplete coding.

Debugging:

  • Debugging is the process of analyzing each and every block of codes and remove all possible vulnerabilities and error in the software making process.

Testing VS Debugging

  • most of the common people, testing and debugging may seem the same, but this is not the case in reality. Below are some points where it can be pointed out how testing and debugging has its individual meaning:
  • Testing is a complete process, where at least a module or function is tested. On the other hand, debugging may be on any part of the software.
  • Testing can be done by a testing software or manually by using test cases. On the other hand, debugging can be done by a programmer or developer only.
  • Testing as can be done by software can be made automatic. On the other hand, debugging is a process which totally requires human attention and so cannot be done automatically.
  • Testing can be done by an outsider also, that is someone who does not belong to the developing team. On the other hand, debugging can be only done by core team developers and any professional programmers, not just by anyone.
  • Testing has test cases, which are made to input for the software and the behavior is checked. On the other and debugging main deals with the checking of the functions and the modules which are mainly done by using suitable parameters for the functions.
  • Testing may require time, as it has to complete many executions based on different test cases. On the other hand, a major debugging may also require less time, if the programmer is intelligent enough.
  • Testing can be done in a predictable environment only. On the other hand, for debugging there is scarcely the question of a suitable environment, instead, it has to deal with the individual coding statement.
  • Testing can be done only when at least a working part of the software is developed. On the other hand, debugging can be done at any time at any part of the software making process.
  • Testing has different types such as functional test, unit test, integration test, etc. On the other hand, debugging has no such type.
  • Testing means measuring its behavior, efficiency, durability, and accuracy. On the other hand, debugging is the process of detecting errors anywhere inside or outside the modules.

Some principles of Software Testing:

  • All the test performed should meet customer requirements.
  • A test should start at a small level and then move to a larger level to avoid risk.
  • The software must be designed in such a way that, the test can be performed by the third party as well.
  • While testing, it has to be kept in mind that 80% of the error comes from the 20% code of the software.
  • All the test cases or test parameters should be planned before the testing starts.

Retesting

Broad Classification of Testing

Testing can be mainly classified as Functional And Non-functional Testing.

In Functional Testing, the functionalities which are laid down in the SRS documentation are fulfilled and checked. Functional testing only deals with the units, modules, codes, etc which are the components responsible for the functionalities.

The functionality of software means what are the different functions or tasks which the software is made to perform.

On the other hand, in the Non-Functional Testing, the accessibility, security, simplicity, performance, etc of the software is tested. The non-functional requirements are those attributes of the software which does not produce any output or process any data but defines the quality of the software.

To be clear, for example, there should be a search bar in an internet browser is a functional requirement. But, the search bar should appear in the middle of the screen and should show suggestions is a non-functional requirement.

Frontend Testing

Types of testing in brief:

  • Unit Testing : A unit is the smallest functional part of the software. A unit is the one which may act on input and may have an output. So, unit testing is performed in the smallest module or method or function of the software.
    For example, We may choose to check whether a simple for loop is working as it should be.
  • Integration Testing : An integration testing means, we test some modules or units together after integrating them. Integration Testing is done only when the units involved in it, are tested individually with unit testing. This can be of further two types: (a) White Box testing. (b) Black Box testing.
  • Regression Testing: A regression testing is carried out when new functionalities or modules or components are added to the software.

    Regression testing is carried out to check the overall consistency of the software when new modules are added. Regression test assures that no problem has arisen due to the addition of new modules or components.
  • Smoke Testing: A smoke testing can be considered as a prototype test. This test is performed only to check that the software is ready and is stable to be tested further.
  • Alpha Testing: An alpha testing may be considered as a type of validation testing. It is a type of acceptance testing. It is done before the product is released to the customers. This is done mainly for getting feedback from the friendly set of customers and develop the product.
  • Beta Testing: Beta testing is performed at more than one place by the end user of the software. This testing version of the software is provided to only some limited customers, especially for testing it in the real-time environment.
  • System Testing: As the name says, we perform the software as a complete system and perform the test. In this testing, it is checked whether the software as a whole is performing well in different platforms, that is with the different operating systems it was meant to be working with.

    Here, we are not concerned about the internal working, rather we see only the input and the desired output, that's said.
  • Stress Testing: In stress testing, we provide inputs in an unfavorable way and see how the software behaves in extreme inputs. This is done to check, how much faulty or corrupt the software can handle with getting crashed or providing a drastic output.
  • Performance Testing : In performance testing, the run-time parameters of the software is checked. This check is done mainly, to see how much efficient the software is in the run time.
    For example, how many CPU cycles are being used for the execution of a certain module.
  • Accessibility Testing: This testing is all about testing how much the software is accessible to different types of users. For example, a software user may be blind, deaf or mentally challenged person, so in those case also the software must be able to provide some way so that these kinds of people also can use it.
  • Age Testing: In Age Testing, it is seen how the software would perform in the future when the input range or figure or type may change due to change in environment.
  • Ad-hoc Testing: This is the only kind of testing which is done without planning. This is a very different type of testing when the tester tries to crash the system intentionally, by proving different data along with tricks.
  • Assertion Testing : This testing is purely done to assure that all the requirements are being followed in making of the software.
  • Automated Testing: This testing uses automation tools for testing the software. This testing does not involve human being who gives a manual input, rather the test is performed by a computer which itself run different software.
  • Basis Path Testing: This testing derives a logically complex input with a procedural design and uses this as a guide for defining a basic set of the execution path.
  • Backward compatibility Testing: In this test method, it is verified that whether with the old environment also the software is able to perform the same way it is doing for the current environment, in which it is itself developed.
  • Benchmark Testing: In this testing, representative set of programs are developed and data are designed accordingly, to evaluate the performance of the software and the related hardware as well in a different configuration.
  • Dynamic Testing: In this method, the dynamic behaviors of the code is tested.

Protocol Testing

Summary

Software testing means to check whether all the functional and the non-functional requirements of the software are included and are performing the way it should perform.

There are different types of testing such as white box testing, which deals with the internal coding of the software. On the other hand, black box testing is concerned only with the input and output parameters of the softwares.

There are different testing types which we shall in later chapters.

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions
  • Rahul
    Awaiting next section.
    Please release the same.
    Thanks
    Reply
    • Author [ Fitas ]
      I have added few more chapters and will be adding more
      Reply