Software Engineering

Articles about software engineering.

Stubs and Drivers testing

It is all of the time a good thought, to design and check software programs in “bits”. However, it might appear impractical, as it is difficult to envisage how you are able to test only one “piece” when other “pieces”, which it utilizes, have not even developed. To figure out these types of problems developers utilize stubs and drivers testing method.

In the process of white-box testing, you should run the source code with planned input and verify to make certain that the source code gives preset outputs. For white-box testing oftentimes software testers write down stubs and drivers testing.

Driver for Software Testing

In software testing driver is the part of source code, which clear test cases into other part of code. A test driver or test Harness is supporting source data and code utilized to test software that provides an environment. It might also be called as a module of software, that is utilized to raise a module on test and render test inputs, execution, control, monitor and report results of test or most plainly a row of code, which calls a process and authorizes that process a value.

As for instance, if you desired to give motility to a player on game software, then the driver code will be moveplayer(player, LocationX, LocationY). The driver code will probably will be called from main method. A case of white-box test would run this line of code driver and verify ” player.getPosition()” to assure that the player is at present on the anticipated cell.

Stubs for Software Testing:

Stub is artificial process, unit or module, which denotes for an incomplete part of a system.

Four common types of Stubs are:

1. show a trace message
2. show parameter value(s)
3. Return a value from a table
4. Return table value selected by parameter

Stub is a program that is utilized as an alternate for the module’s body of the software which is or would be defined in a different place or an object or dummy component utilized to imitate the conduct of an actual component until that component is developed.

At last, the artificial process would be accomplished with the correct logic of a program. All the same, developing the stub permits the developer for calling a method in source code that is developed, yet the method do not have the desirable performance.

Stubs and drivers testing are frequently regarded as throwaway code. Nevertheless, they are not been cast away: Stubs might be filled to build the real method.

Thanks.

Incoming search terms for the article:

Test driven development (test first)

Test driven development

software engineering Test driven development (test first)

Test Driven Development is one of test method that specializes in the test repetition.
The reason for doing this is to test codes repeatedly with hopes of making a given software better and more effective.
The Test-Driven Design has several steps that must be followed before the test is successfully completed.
The first step requires writing a test (so it’s also called test first). There has to be a sample diagram or flowchart before any other actions can be taken.
However, when written test finish , it’s not mean to success the TDD process because it is written before the physical test (real test) is performed.
The person writing the test must know precise specification of the features being created as well as everything required for creating test suite.
In most cases the writer obtains the information about the feature required to create the test by using use cases or user stories of the software that will be run the test on.
After gather all useful information then source code is written. Next, every test must be ran to written code to determine that the written code is fail in the test suite
or not.
At this point, it should pass and if all the tests pass then it’s time to proceed to the final step. The final step is all about cleaning up the code.
This is done by re-running the test cases in search for defects and so on . There has to be certainty that there is no damage being found to any other software functionality
as a result of the new software can be released.

Advantages of test first

1. When you continue to do the test first then you will get a lot of test cases. After that when you want to restructure the system, you can do it easily
and don’t have to fear about the bugs that may happen because when you finish restructure the system , your new system may not pass some written
test cases, so at this point you can retrace to modify the written test cases and then try to validate the new system to pass to modified test cases.
(If you don’t have test cases , after complete restructure your system for 2 or 3 months , the unknown bugs may occur because the restructured system
was not tested. At this time you have to fix bugs but it’s so difficult to fix them due to you may forget about wherever in the function or files that you used
to modified source code. In my opinion, if your system is very complex , your certainly have to write intensive test cases )

2.With test first you have to write test documents before write the code , this way will help the programmer or developer to plan before they begin to write
code (they have to write the code to pass the test documents). As a result your entire code will look better and you will get the software that have a good
structure. It also help you to reduce runtime error or unexpected bugs (so cost to fix the bugs is also reduced too).

Test first is differ from unit test as follow
1. Test first is done before writing source code but Unit test is done after finish writing the code.
2. In test first , you don’t need to look at source code to write the tests but in unit test , you must use the written code to do unit test.
3. Unit test help you to ensure that your written function or piece of code is work or not but test first help you to ensure that
entire code in the project work well or not.

Thank you,
Jitkasem

Incoming search terms for the article:

Why Is Load Testing Useful

Load testing is the process of putting increasing demand on a system or software until the system or software breaks or fails to function. The purpose of load testing is to test the system against unusually high usage patterns to determine how the system or software will react. 

One example of the need for this type of testing is a web server hosting a web site that is seasonal or receives peak levels of web traffic during highly publicized special events. Another example would be a link to a small web site from a very popular site, that then doubles or triples the number of concurrent visitors to the smaller web site. Load testing in each example could determine ahead of time whether each site could handle the increased traffic without the hosting server failing to serve web pages to visitors during the peak load. 

Continue reading

Incoming search terms for the article:

Scrum and Extreme Programming

Agile Process (Scrum and Extreme Programming)
The Agile Process or software development refers to a set of software development methods which are based on iterative development. In this process, the solutions and requirements both evolve mutual collaboration between cross functional teams. These teams are self-organizing in nature.
The Agile software development approach usually promotes a regimented kind of project management process which encourages:
* Frequent adaptation and inspection
* Self-organization and accountability
* A leadership philosophy which promotes teamwork
* A business approach which bring into line the development with customer needs and company goals
* And a group of best engineering practices having an intention to allow for rapid delivery of good-quality software.
Extreme Programming (EP)
It is a software development methodology with an intention to enhance software responsiveness and quality to the volatile requirements of customers. Being a type of Agile process, it promotes frequent releases in small development cycles. This introduces checkpoints and improves the productivity in a way that the new requirements from customers can be adopted.
The advantages of Extreme Programming are:
* Unit testing of all code
* Avoiding programming of features until needed
* Programming in pairs or carrying out extensive code review
* Clarity and simplicity in code
* Volatile customer requirements better understood
* A flag management structure
* Frequent communication between the programmers and even with the customer
It has been noted however that there are certain drawbacks with Extreme programming. They are:
* No documented compromises of user conflicts
* Unstable requirements
* Lack of overall design document or specification
* Incorporates inadequate software design
* Necessitates meetings at recurrent intervals at huge expense to customers
* Can enlarge the risk of scope creep due to the lack of thorough requirements documentation
* Requires excess of cultural change to adopt

Scrum
Scrum is an incremental, iterative framework for agile software development and project management. The word “Scrum” is not really an acronym. However, many companies using this methodology spell it with capital letters. Initially Scrum methodology was focused for management of software development projects, but in recent times it can be used to run general program/project management approach or software maintenance teams.
Scrum, which contains sets of predefined roles and practices, is a process skeleton. Main roles in this method are:
1. Product Owner – Represents Stakeholders
2. Scrum Master – The one responsible for maintaining the processes
3. Team – A cross functional group of about 6-8 people who do actual design, testing, implementation, etc.
Each of the iteration is called a “sprint”, typical time frame for which is normally about two to four weeks. The length of each sprint is decided by the team. The product “backlog” pushes the set of features into a spring. These features are prioritized set of higher level requirements for the task to be carried out. Based on this product “backlog”, the team determines how many of the items can be completed in the next sprint. Once the sprint begins, nobody is allowed to alter the sprint backlog, which means that the set of requirements are frozen. On successful completion of a sprint, the team demonstrates the usage of that particular software.
This methodology should be encouraged in organizations since the major advantage of using the Scrum is that it enables the creation of teams which are highly self-organizing in nature. This is achieved by encouraging verbal communication amongst the team members, co-location of all the team members and disciplines which are involved for the project.

Differences between Scrum and Extreme Programming(EP) :
1. The time span for iterative sprints is different in both approaches.
2. Changes are not allowed by the Scrum teams during their sprints. Whereas Extreme Programming teams have to be much more agreeable to changes.
3. Work is done by EP teams in strict priority order. Whereas in case of Scrum, the product owner prioritizes the set of activities.
4. EP does prescribe some engineering practices; Scrum does not.

Thank you

Incoming search terms for the article:

Performance Testing and Regression Testing

Performance Testing and Regression Testing

Software testing or Testing is an examination conducted to present the stakeholders with data regarding the quality of the service or product under test. This type of software testing as well provides in insight on the independent views and objectives of the software to permit the business to understand all the risks involved during the implementation of the software.
Based on the testing method employed, Software testing can be put into practice at any point of time in the development process. Although, most of the efforts for testing occur after the requirements are defined and the process for coding has been completed.

This article describes two types of testing methodologies.

1. Performance Testing
Performance testing is performed to determine how quick a system or sub-system executes under a particular amount of workload. It can also provide to verify and validate other quality traits of the system, such as reliability, scalability and resource usage.

In the field of Software Engineering, performance testing comes under the testing category which is carried out to how fast a particular aspect of the system under observation performs, given a fixed amount of workload. This sort of testing is a subset of Performance Engineering (up-and-coming computer science practices build to get performance into the architecture and design of a system, prior to the actual effort of coding). There are various purposes which performance testing can serve:
It can compare given two systems and finds out which one is performing better
It can demonstrate whether or not the system meets the required performance criteria.
It can calculate which parts of the system under observation cause the system to perform badly.

2. Regression Testing
This type of testing is any software testing which seeks to find out software errors by partly re-testing a modified program. The intention of this type of testing is to provide a kind of assurance that no additional errors were added during the process of fixing the existing problems. Regression testing is generally used to proficiently examine the system by systematically choosing the appropriate suite of tests which are required to sufficiently cove all of the affected changes.
Widespread methods of regression testing comprise of rerunning earlier run tests and scrutinizing whether previously fixed faults have re-emerged. One of the chief reasons for performing regression testing is that it’s often tremendously difficult for a programmer to outline out how a change in one part of the software will reverberate in other parts of the software.

Ad hoc testing
This term is commonly used to represent software testing without any documentation or planning. The tests are made to run only once, unless a defect is discovered. This type of testing is more of a part of exploratory testing. Here, the tester seeks to find errors by any means that seems appropriate to him/her.

Unit Testing
This type of testing is a software verification and validation method where a programmer tests if individual units of system are fit for utilization. A unit is the least testable part of an application. In procedural programming, a unit might be an individual procedure or function.

Advantages

The advantage of performing Performance and Regression testing are:
Reusable: Can reuse tests on diverse versions of an application, even if the user interface alters
Repeatable: Can check how the software responds under repeated execution of the identical operations.
Programmable: Can program complicated tests that bring out concealed information from the application.
Cost Reduction: Cost is reduced since the amounts of resources for regression test are reduced.
Reliable: Tests carry out precisely the equivalent operations each time they are run, thereby eradicating human error.
Comprehensive: Can build a suite of tests that wraps every feature in the application.
Better Quality Software: Can run additional tests in fewer time with less resources
Fast: Automated Tools run tests considerably faster as compared to the human users.

Incoming search terms for the article:

GIT vs Perforce vs Clearcase vs CVS

GIT

This distributed revision control system has an emphasis on speed. It was originally designed and developed by Linus Torvalds for the development of Linux kernel. Every working directory of Git is a full-fledged repository with full revision tracking capabilities and complete history, not dependent on a central server or network access. GIT is a free software which is distributed under the terms of version 2 of the GNU General Public License.

Perforce

This is a proprietary and commercial revision control system developed by Perforce Software Inc. Perforce follows a client/server system. Here the server has the responsibility of managing a central database and a main repository of file versions. Developers can work on files in their local client workspace. After altering the changes, they can submit the changes to the main server. Client and server communicate via TCP/IP.

Clearcase

Rational ClearCase is a tool for configuration management of source code and other software assets. This tool is developed by IBM (Rational Software Division). ClearCase is the basis of version control for many mid size businesses, and has the potential to handle projects with thousands of developers.

CVS

This is a free revision control system. This system was developed by Dick Grune as a series of shell scripts during July 1986. CVS turned out to be popular in the open source software space and is released under General Public License of GNU. CVS also uses Client/Server architecture. Here, the clients connect to the server and can “check out” a version of file onto their local disk. Later after modifying the contents, they can “check in” the changes.

Incoming search terms for the article:

Types of Revision Control Software

Revision Control Software
Revision Control software are used implement Revision Control on single or multiple sites by organizations. Revision Control, also known as Software Configuration Management (SCM) or Source Control or Version Control, is the management or control of changes to programs, documents and other sorts of information data. This type of setup or mechanism is more often used in software development where a set of people may alter the contents of the same file. The changes made are generally identified by a letter code or number which is called as a revision number or simply revision. For instance, an initial revision for a file is “revision 1”. If this file is altered by any developer, its revision becomes “revision 2”, and so on. A developer can perform many operations on these revisions. These revisions of files or directories can be merged, restored or compared. Software tools for revision management are crucial for the organization where development is simultaneously in progress on multi-developer sites.

Types of Revision Control Software
The various possible approaches for revision control software are:
Local Only: In this approach, it is necessary for all the developers to use the same computer system. Examples:
a. Revision Control System (RCS)
b. Source Code Control System (SCCS)

Distributed Model: In this approach, each of the developer has his/her own setup or local repository. And at some predefined time, all of the changes from various developers are shared or synced between repositories as a different step. Examples:
c. Open Source:
i. Aegis
ii. Codeville
iii. DCVS
iv. GIT
d. Proprietary:
i. Sun WorkShop Team Ware
ii. BitKeeper

Client-Server Model: In this approach, all the developers have to share a single repository. Examples:
e. Open Source:
i. Concurrent Versions System (CVS)
ii. CVSNT
iii. OpenCVS
f. Proprietary:
i. Perforce
ii. Clearcase
iii. Visual SourceSafe

Incoming search terms for the article:

User Acceptance Testing.

UAT (User Acceptance Testing)

UAT is a sort of testing that usually done at the last step of software development process (before release the software to the market).UAT is done by user (the person who will use this software or person who possess requirement of software).It is the way to increase reliance and ensure that the software was designed correctly based on requirements.

Before doing UAT your software need to pass Unit Testing,Integration Testing,System testing and must solved the defects found in each of these testing phases (in practical, the defects relate to technical or logic of software should be fixed before sending to UAT).The defects concern with appearance or color of software are acceptable during doing UAT.

Test Case is also need in UAT because it help doing UAT more effective. Otherwise the test case should be designed on the perspective of Bunsiness Flow and Business Logic that based on requirement. The tester will emphasize on testing the software like they are real user.

Procedure for doing UAT.
One important factor you must focus on while you doing UAT is Test Environment.The test environment should be similar to Production Enviroment as much as possible.

Basic step of doing UAT are as follow…

-Make the testing plan for UAT.
-Design the test cases for UAT.
-Set up testing team for operate UAT in accordance with test cases.
-Operate UAT.
-Record Bug or Defect found during operate UAT and hold a meeting in order to summarize anything we have to modify.
-Fix bug or defect found in previous step and then do Regression Testing.
-Finish UAT, sign off.



UAT is classified as Black box testing.The test cases for UAT normally designed according
to requirements of user (after finish requirements definition phase). Business Analysis
team or System Analysis team are also provide the inputs used for creating the test cases
and it should be described using simple language which easy to understand because the
tester may be the person other than programmer or tester and they don’t know the
technical phrase.

Visit these site for more information about UAT (User Acceptance Testing)
-Wikipedia
-eHow
-Exforsys INC

Reference for this article:
-http://www.welovebug.com/user-acceptance-testing/what-is-uat/#more-1503

Thank you,
Jitkasem Pintaya.

software engineering User Acceptance Testing.

Incoming search terms for the article:

How to do white box testing

The article for today is about white box testing.I had written article about white box testing in this blog but that time it was only introduction of white box testing.This article concern with how to do white box testing.

The procedure of White box testing is normally saparated into 3 topic as follow

1.Statement Coverage
It is the testing to verify that all instructions or code must be executed at least one time.We can specify one or more than one test case for doing statement coverage testing (there may be a chance that one test case is not cover all the code we need to test).Below is an example demonstate how to do statement coverage testing.

Suppose you have a piece of code to test like this

software engineering How to do white box testing

Code1

If you determin ‘C’ as the test case then the coverage reach 100% (pass through all line of code) and only one test case is sufficient for doing Statement Coverage for this code.

Advantage of Statement Coverage.
1.To ensure that all source code can be reached at least for one time.
2.It is suitable for making Performance profiling because it can be applied directly to object code without processing source code.

Disadvantage of Statement Coverage.
1.It is insensitive to logical operators such as OR (||),AND (&&) etc.
2.If your source code have a lot of IF-ELSEIF-ELSE statements or contain consecutive switch labels then the test case used for doing Statement Coverage will be increased respectively.

2. Branch Coverage (Condition judgment Coverage)
It is the testing to verify that all branches and instructions must be executed at least one time (Concentrate on testing to cover every branches or decision points in the code).It is the easiest way to perform testing of path or workflow of program.

Please consider the code below and its explanation to understand the operation of Branch Coverage testing.

software engineering How to do white box testing

code2

In the above code we need only two test case to cover all the branches (also all instructions too), they are…
Test case #1 : Input n1 = 1 , n2 = 1
Test case #2 : Input n1 = 2 , n2 = 0

Advantage of Branch Coverage.
1.To validate all branches in the code can be reached and ensure that no branches lead to abnormal of the program’s operation.
2.It eliminate problems that occur with Statement Coverage testing.

Disadvantage of Branch Coverage.
1.There may be other condition that can be used for decision making.For the example, statement “if((b == TRUE) || functionA())”, in this statement we can define only test case with “B = TRUE” and this test case is cover this branch but functionA() isn’t tested.

3.Condition Coverage/Multiple Condition Coverage

It is the testing to verify that all condition expression within each branch will be tested (the true and the false condition of each sub-expression within the decision branch must be tested at least one time ).
It is more intensive testing than Branch Coverage and Statement Coverage.Multiple Condition Coverage has detail of testing more than Condition Coverage.Its test cases are larger than test case of Condition
Coverage because it ensures that all possible combination of conditions of sub-expression within each branch must be tested.

Please consider the code below for Condition Coverage testing.

software engineering How to do white box testing

code3

If you want to test above code by using Condition Coverage you must specify two test
cases to cover all sub-expressions in this branch.The test cases are as follow…

Test case #1: Input n1 = 60 , n2 = 70
Test case #2: Input n1 = 40 , n2 = 110

If you want to test above code with Multiple Condition Coverage you must specify four
test cases to cover all combination of possible condition of sub-expressions in this branch and the test cases look like these

Test case #1: Input n1 = 60 , n2 = 70
Test case #2: Input n1 = 60 , n2 = 110
Test case #3: Input n1 = 40 , n2 = 70
Test case #4: Input n1 = 40 , n2 = 110

Advantage of Condition/Multiple Condition coverage.
1.It is very thorough testing and the bugs are normally found by this kind of testing.

Disadvantage..
1.If the decision branch contain lots of sub-expressions or has very complex boolean expressions , the tester will have to define a large number of test cases.

Thank you,
jitkasem pintaya.

Reference site:
1.MindBlaze Blog
2.Bullseye
3.The paper from utwente.nl by Arnold Zanderink

Incoming search terms for the article:

CASE tool overview.

CASE tool (Computer-Aided Software Engineering)

CASE tool is the software that support system development or facilitate in system development.It
has an ability in building various kinds of document during analysis and design the system.For the example such as building the UML diagram,the screen interface (Graphical User Interface),form and report etc…
Furthermore some CASE tool can automatically generate source code too.In system maintenance can use CASE tool to make the operation smoothly,quickly and correctly.CASE tool also help you to decrease the time in document improvement or source code improvement.So at the present time CASE tools have an important role in system development and system maintenance.

Formerly CASE tool was separated into two groups as follow…
1.Upper CASE tool is the software that used in the step of analysis and design the system.This CASE tool make various diagram such as DFD (Data flow diagram) . DFD is used for design the component of the system such as the input of system , the mechanism of system , the result of the system etc.Other diagrams such as ER diagram (Entity-relationship diagram),layout (the screen that used for bring the data into the system or screen of the report). The example of CASE tool in this group are ERwin and Visual UML.

2.Lower CASE tool is the software that can build the source code or program automatically from condition or determinate procedure such as we can write the program for manage the vacation of our employee from the specific workflow or we can write the database structure command by select from the menu.The example of CASE tool in the group are Ecore Diagram Editor and dzine.

3.Integrated CASE tool is software that fulfill the usability from system analysis,system design to the system implementation (writing the source code) and system testing.It is the software that combine Upper CASE tool and Lower CASE tool into one software.The example of CASE tool in this group is Rational Rose from IBM.

The story of CASE tool is not finish by this article.In the next article I will write about the review of CASE tools that are well-known nowadays such as MagicDraw, Visual Paradigm,Poseidon UML and the suggestion about Commercial CASE tools and Open Source CASE tools software list.

for more information please visit these sites
1.UML Modeling Tools
2.Wikipedia
3.CASE tool index

Thank you,
Admin

Incoming search terms for the article:

Get Adobe Flash playerPlugin by wpburn.com wordpress themes