Thursday, 18 February 2021

Software Coding and Module Testing


SOFTWARE CODING AND MODULE TESTING

Software coding and implementation stage of software development is the process of converting a system specification into an executable system. It always involves programming to develop software product. During the coding, the project team creates the actual product. Software development can be an exciting phase for the user because their idea for the software becomes impressive product. Project developers and programmers commence building and coding the software. If requirements are gathered correctly and software designed accurately, the coding process is more efficient. Project teams are better capable to meet software coding deadlines when the accurate information is gathered straight from the user.

In business programming it is general principle that each system application is so unique that it must be designed and coded from the beginning. So, prewritten reusable modules cannot be designed, coded, and reused. A code editor is also called an IDE. An IDE is a software application for formatting code, checking syntax, as well as running, and testing code. Some IDEs can work with many programming languages while some are extremely specific for only one language. Programmers use an IDE for checking syntax, formatting code, and testing programs. The common steps for writing a program include the following:

  • -Understand the problem you are trying to solve

  • -Design a solution

  • -Draw a flow chart

  • -Write pseudo code

  • -Then write code

  • -Test and debug

  • -Testing with real-world users

  • -Release program

  • -Iterate the steps for the next version

    Computer code is fundamentally a list of instructions and commands that can be run by a certain program. Mainly code consists of plain text documents so they can be used for numerous different programs. A unique file extension is given to the document to specify the nature of the code. For example: a file created using Python is saved with a .py extension, like ‘program.py.’ However, the real content of the file is still just simple text. Table  shows hello word program in C, C++, Java, Python, and Mathematica.

    Table  Hello word program in C, C++, Java, Python, and Mathematica

    #include #include class Hello { print("Hello Print ["Hello <stdio.h> <iostream> world") world"]

Activities of Software Development Process 

main ()
{ printf("Hello world");

}

main()
{
std::cout << "Hello world\n";
}

public static void main(String[] args) { System.out.println("Hello world");}

}

Above table shows how hello world is printed using C, C++, Java, Python, and Mathematica.

Software testing is an investigation conducted to provide stakeholders with information about the quality of the software product or service under test. Test techniques contain but are not restricted to the process of executing a program through the aim of finding software bugs. There are black box testing, grey box testing, and white box testing methods that can be used for software testing. Functional and non- functional levels of testing include diverse methodologies that can be used for conducting software testing . There are numerous approaches in software testing. Reviews, walkthroughs, and inspections are referred as static testing whereas essentially executing programmed code with a given set of test cases is called as dynamic testing. Mainly there are three levels of testing such as: unit testing, integration testing, and system testing.

Documentation for testing help estimating the testing effort, test coverage, requirement tracing. Most commonly used documented artifacts are: test case, test plan, test scenario, and traceability matrix. Test cases involve a set of conditions, steps, and inputs that can be used for performing testing tasks. Test plan outlines the plan that will be used to test software. Test scenarios used to guarantee that all process flows are tested from end to end. Traceability matrix (Requirement Traceability Matrix, RTM) is a table which is used to trace the requirements during the development cycle. It can be used for forward tracing (from requirements to design or coding) or backward (from coding to requirements). In traditional waterfall model, testing is performed by an independent group of testers. This can be done after the functionality is developed but before it is delivered to the user. However even in waterfall model unit testing is regularly done by the software development team still when further testing is done by a separate testing team. In comparison of some emerging software development techniques such as: extreme programming (XP) and agile software development hold to a ‘test-driven software development’ model. In this software process, unit tests are written initial, by the software engineers. Unit tests are maintained along with the rest of the software code and generally integrated into the build process. The vital goals of this test process are to sustain continuous integration and reduce defect rates. This method increases the testing effort done by development process before reaching any formal testing team. In other development models most of the test execution occurs after the requirements have been defined and coding process has been completed.

Module testing is the testing of entire code objects as created by the compiler when built from source. Modules are completely formed chunks of coherent source code that can usually be tested by driving a few purpose signatures with different stimulus. Module testing is a process of testing the individual subprograms, classes, subroutines, and procedures in a program. As a replacement for of testing whole software program at once, module testing proposes testing the smaller building blocks of the program. Module testing is principally a white box oriented. The objective of module testing is not to exhibit proper functioning of the module but to reveal the existence of an error in the module. Module testing allows to apply parallelism into the testing process by giving the prospect to test several modules simultaneously. Module testing is suggested because probability of identifying bugs or errors on smaller chunks of program becomes high, multiple modules can be tested concurrently thus supports parallel testing and complexity of testing can be effortlessly managed. Table shows the difference between module testing and unit testing

Table  Module Testing vs. Unit Testing

Module Testing

Module testing may be engage combining the units test.

Unit Testing

Unit Testing might be testing units in separate form.

Module tests are a set of tests written by a tester after some code has been written by a software developer.

Unit tests are a compilation of tests written by a developer through the software development process.

So basically module testing is a non-incremental testing which requires more work for debugging test, misunderstanding test doubles, and need to understand the code.


Reference 

Book : Systems and Software Process, Narosa Publishing House Pvt. Ltd. New Delhi 2020, ISBN 978-81-8487-661-1






1 comment: