Subscribe by Email


Showing posts with label Programmers. Show all posts
Showing posts with label Programmers. Show all posts

Monday, January 21, 2013

How is test execution done by Fitnesse Testing Tool?


FitNesse testing tool based on the integration testing frame work is now widely used for acceptance testing more than unit testing since it has the ability to facilitate a description of the function in a detailed manner. 
In this article, we shall discuss about how the execution of the tests is carried out using the Fitnesse testing tool. 
The testing process using the fitnesse testing tool involves 4 major components for every test:
  1. Wiki page that is used to express the test in the form of a decision table.
  2. A testing engine for interpreting this wiki page.
  3. A test fixture that is invoked by the engine and itself invokes the SUT or system under test in turn.
  4. SUT(system under test) that is currently under test.
- Out of the above 4 mentioned components two are produced by the software development team namely the fixture and the wiki page. 
- The team produces the system under test but it is not considered from the point of view of the black box test.
- Decision tables which express a test are included in the wiki page.
- The test fixture is the link that is made between the SUT and the generic testing through a piece of code written in java. 
- Mapping that is done between the fixture and the wiki page is an example of simple convert – to – camel case mapping. 
- Such kind of mapping is applicable to almost all the headings and is used for the identification of the name of the class of the fixture and its methods as well. 
- Whenever a heading ending is encountered, its value is to be considered to be read from the fixture while values from the other headers are considered as input for the fixture.
- The column order of the table i.e., left to right order is followed for calling the methods of the fixtures. 
- Testing engine is the component that actually carries out the mapping process. 
- It also invokes majority of the fixture methods. 

What kind of engines are supported by Fitnesse Testing Tool?

Two types of engines are supported by the fitnesse testing tool:

The FIT Engine: 
- This is more like a frame work rather than just being an engine. 
- It carried out the following purposes:
a)   It combines the functionality for invoking the tests,
b)   Interpretation of the wiki pages,
c)   Generation of the output pages.
- This engine was named so because the tool originally developed around this. - This engine works by combining the responsibilities rather by separating them.

The SLIM Engine: 
- SLIM stands for simple list invocation method and is used as an alternative to the FIT engine. 
- This engine implements the slim protocol. 
- Like FIT, SLIM does not combine all of the elements of the wiki – based testing, rather its focus is on invocation of the fixture. 
- This engine works as a separate server that is invoked by the fitnesse wiki engine remotely. 
- Simple POJOs like light–weighted fixtures are allowed by this engine. 
- These fixtures neither use any frame work classes nor extend it. 
- This leads to a simplified design thus allowing the designer to focus up on the call of the SUT properly and in as simple way as possible.
- This also keeps the ways for inheritance open, thus allowing the fixtures to be developed whenever necessary. 
- Inputs and expected output are coupled together to form the tests described in Fitnesse. 
- These couplings are considered to be a kind of variation of the tables. 
- A number of such variations are supported by the Fitnesse testing tool.


Explain FitNesse testing tool? What are principles of Fitnesse?


- FitNesse is an automated testing tool that has been developed to serve as a wiki and a web server for the development of software systems and applications. 
- This testing tool is entirely based up on the frame work for integrated testing that has been developed by Ward Cunningham. 
- It has been designed to support acceptance testing more than unit testing. 
- It comes with the feature of facilitating the description of the system functions in detail.
- With FitNesse testing tool, the users using a developed system can enter the input when it has been specially formatted i.e., non – programmers are able to access this format. 
- FitNesse tool interprets this input and automatically creates all the tests. 
- The system then execute these tests and returns the output to the users. 
- The main advantage of following this approach is that a very fast feedback can be obtained from the users. 
- Support in the form of classes called ‘fixtures’ is provided by the developer of the SUT i.e., system under testing. 
- The credit of writing the code for the fitNesse tool goes to Robert C. Martin and his colleagues in java language. 
- Since the program was developed in java, therefore initially it supported only java but now over the time it has got versions in a number of languages such as Python, C++, Delphi, ruby, C# and so on. 

Principles of FitNesse Testing Tool

This software works on certain principles which we shall discuss now:

FitNesse as a testing method: 
- Originally, it was designed as an interface using the fit frame work and it proved to be highly usable. 
- As such it is known to support the regression tests and black box acceptance tests in an agile style.
- This style of testing involves all the functional testers working in collaboration with the software developers in a software development project in an effort of developing a testing suite. 
- FitNesse testing revolves around the notion of black box testing.
- This involves considering the system to be a black box and testing it in the terms of the output that is automatically generated by the tool in accordance with the given inputs. 
- The responsibility of the functional tester is to design tests in a sense of functionality and expressing the same in the fitNesse tool. 
- On the other hand, the responsibility of the software developer is to connect the tool to the SUT so that tests can be executed and the actual output can be compared to the expected one. 
- The idea that drives this tool is forcing the functional testers and software developers to come up with a common language for an improved collaboration which will eventually lead to an improved mutual understanding of the SUT.

Fitnesse as a testing tool:
- Fitnesse defines the tests as inputs and outputs coupled together. 
- These inputs and outputs coupled together are expressed as variations of a decision table. 
- It supports a number of variations that range from tables that execute queries to tables for literal decision and to tables that express the testing scripts. 
- A free form table is the most generic variation that the designers can interpret in any way they like. 
- However, some sort of table is always used to express the tests. 
- The primary focus of FitNesse is on the easy creation of the tests, thus allowing the testers to maintain a high quality for the tests rather focusing on how the tests are to be executed. 
- Three factors are involved in the creation of the tests through fitNesse:
a)   Easy creation of the tables.
b)   Easy translation of the tables in to calls to SUT.
c)   Maintaining flexibility in the documentation of the tests. 


Saturday, June 2, 2012

What is meant by the term system metaphor? What is its use?


System metaphor- well this is a term which is related to the extreme programming but less known of! What is the system metaphor and what is its use and what is the need? 
We shall be discussing all these aspects of the system metaphor in this article. 

"A system metaphor in the simplest words can be defined as a story that any one includes customers, programmers and managers) can tell reading how a system works".

Reasons why we need to use System Metaphor


There are several reasons for why we need to use the system metaphor.  They have been listed below:
  1. Architecture: The metaphor is consider to shape the software system or application exactly as it is required by us with the help of identifying the key objects and giving suggestions regarding the aspects of their interfaces. The dynamic and the static models of the system are supported by the system.
  2. Shared Vocabulary: A common system of names for the objects and relationships that exist between them are suggested by a system metaphor only and thus it provides a powerful vocabulary for the developers and programming experts. The vocabulary created is shorthand and specialized.
  3. Common Vision: System metaphor comes in to as a very handy tool that helps in enabling all the stake holders to agree up on the working of the software system or application. The key structure of how the problem and the solution have been perceived is provided by the system metaphor itself. Overall, this helps in understanding the working of the system well.
  4. Generativity: A system metaphor by the means of its analogies can get you new ideas regarding the problem and its solution and can further dig out many other important issues.

How to choose a System Metaphor?


- Even though choosing up a proper system metaphor for your system may take some time and efforts, it is the best option that you have for exploring several possibilities just by looking at the system through various views. 
- If by combining two metaphors you are getting the one that is fit for your then go for it. 
- Now what if you come to know that you could have got a better metaphor for your system than what you have already opted for? No need to worry, you can still develop your system in that direction. 
- Such a measure will also help you in achieving a greater understanding of your problems. 
- What if you are not able to think of any good metaphors? 
- There are some naive metaphors always available to your rescue. Below mentioned are some examples of the system metaphors:
  1. Use of a pension tool as a spreadsheet.
  2. Using desktop metaphor for graphical user interface.
  3. Buckets, lines and bins in C3 payroll.
  4. Bills of materials in VCAPS.
  5. A double entry system being used as book keeping and spreadsheet.

More about System Metaphor


- Suppose you sign a contract with a client for developing some software system, what you do next? 
- You search for a good system metaphor that will guide the development of your software system or application.
- A metaphor very well guides the development process of a project. 
- Not any one can choose a good metaphor, it requires skills, practice and of course deep knowledge.
- A system metaphor is nothing but a metaphor having a simple design and some essential qualities that the original needs to have. 


Thursday, May 24, 2012

What are common mistakes and misunderstandings in a unified process?


As it is always said “to err is human”, one may make innumerable mistakes. This truth holds good for every aspect of our lives and so for the technology also. While programming, it is obvious that some mistakes will be made but they are not intended, some mistakes might creep in without the knowledge of the programmer; other mistakes might arise due to a lack of knowledge of the programmers and the developers! 
Anything is possible. With so much complex and advanced software systems and applications to build around it is obvious for the programmers and the developers to make mistakes while programming the software because it is not the feature of human intelligence to keep of check of each and every bit of the program that is being built.

Well, this article has been focused up on the mistakes and misunderstandings that result in mistakes in a unified process. Such mistakes and misunderstandings in a development can cause severe problems in the whole development process causing further problems in the software system or application that is being built. 

What are common mistakes in unified process?


There are various mistakes that one can make while programming using the unified process. 
- The very common mistake that is done is that the complex problems might be made more complex due to lack of sufficient understanding of the methodologies that are available for programming or may be because wrong or inappropriate methodologies might have been put in to use. 
- The problem that occurs here is for adopting any software development process different people assume different values and hence it is like using a single software development process for every programmer or developer.
- For getting the appropriate solutions to the programming problems it is not necessary that the programs should be developed with the extreme agile or test driven development methodologies. See this is where the people make mistakes!
- When a software system or application can be developed using the simplest of the methodologies available then why go for the complex and the tough ones? 
- Even though the agile processes and the unified software development processes are a big step towards the advancement of the software development, it is not always that they can be extended for all sorts of softwares and applications.
- The best way to avoid much of the problems is to train the programmers and developers in information protection. It does not require months and weeks to learn about common software security mistakes and misunderstandings. 

Examples of Common Mistakes


- Suppose that during programming a file was not locked properly and there are two parts of the programs that access the same file without properly locking it. 
- Such a case can result in a race condition between the two programs that can make the file quite unstable or in a vulnerable condition. 
- Another mistake can be logging in trying many passwords in just few seconds without giving the system a proper time to check. 
- The spirit of a programmer should be as such that even if he/ she has not made the mistakes he/she should take the responsibility to correct them before they cause more harm to the software system or application. 
- The longer the time is spent on writing the programs the more you avoid the mistakes. 


Friday, May 18, 2012

Explain unstructured loops in detail?


Loops are one of the most important of the languages like C and C++. They have greatly reduced the drudgery of the programmers and developers which would otherwise have made the programming of a software system or application more hectic. The necessity of the loops cannot be ignored when it comes to the repetition of a particular executable statement or a block of statements in a program. 

In other words,
Say we have the below written statement in C++ programming language that we need to print only one time:
“hello! Welcome to C++ programming”
To print it one time we shall write the code like this:
Cout<<”hello! Welcome to C++ programming\n”;
Say now you need to print this statement a 100 times! What you are going to do- write the above C++ statement a 100 times? No! Certainly not! This is unfeasible and a complete waste of time! So what is the alternative that we have? Yes of course we have the “loops”. 
Using loop we will have to write only a small code instead of writing that C++ statement again and again for 100 times. Using loop we shall write like this:

For( int i = 1; i <=100; i++ )
{
Cout<<”hello! Welcome to C++ programming\n”;
}

The above loop is a for loop and it will the statement that we wish to be printed 100 times. See to how much extent our task has been reduced! This would not have been possible without loops. 

Loops generally are classified based on their types namely in to:
  1. The while loop
  2. The for loop
  3. The do – while loop
But based up on their structure, they are classified in to two types:
  1. Structured loops and
  2. Unstructured loops
This article is all about the unstructured loops. We shall discuss them in detail. 

The Unstructured Loops


- The unstructured loops can be defined as the loops that are void of a single header or a node in the control flow graph that has all the nodes dominating the whole loop body. 
- The main problem that arises with these unstructured loops is of managing them.
- Managing them is such a hectic task.
- For analyzing the unstructured loops the programmers, developers and researchers have come up with so many ways but none of them seems to be so efficient.
- One of the ways is to use a control flow graph along with the scope graph corresponding to the function containing the unstructured loop to be analyzed. 
- This method involves attaching of each and every iteration counter with each of the loop header.
- Attaching the iteration counters in such a way can cause over estimation of the control flow. 
- So to overcome this problem, the iteration counters are attached to each basic block and this helps a great deal in achieving a lot of flow information. Even this way results in some disadvantage! 
Therefore another method of managing the unstructured loops has been developed. 
- Another method has been developed for transforming the unstructured loops in structured ones. 
- If one looks at the unstructured loop with a view of the control flow graph they seem to have entry edges to one or more than one node all over the loop. 
- In another way we can say that an unstructured consists of parts of several different loops. 
Several structured loops can also be merged in to an unstructured loop with the help of a code size optimizing compiler.
- A straight way has been developed for the elimination of the unstructured loops which is creating a scope with a single header for each entry of the loop. 


Thursday, May 17, 2012

Explain concatenated loops in detail?


Loops as we all know are quite an essential programming constructs in the program that involve solving the complex problems with the repetition of the simple statements. With the loops it has been possible to reduce the drudgery of the programmers and developers of writing the same code again and again innumerable number of times. Everyone is familiar with the three types of loops namely:
   (i)  For loop
   (ii) While loop and lastly
   (iii) The do while loop
Based up on the structure of the loops, they have been categorized as mentioned below:
   (i)  Structured loops and
   (ii) The unstructured loops

There are various kinds of other loops like the nested loops and simple loops. Yet there is one more kind of loops that we are going to discuss in this article namely “the concatenated loops”. Before going to the discussion regarding the concatenated loops let us clear up with the meaning of the concatenation. 

What is meant by Concatenation and Concatenated Loops


- To concatenate means to join two things mostly statements or words or strings together end by end to make them in to one single statement, word or string respectively as the case may be. 
- Concatenated loops are the loops that occur in following to the preceding loop in the code of the program.
- The execution of the next loop begins only after the termination of the previous loop. 
Concatenated loops are usually found to be the independent loops since the number of times they have to be iterated does not depends on the iterations of any other loop.
- They are treated normally as the other simple loops in the sequence.

Guidelines for testing concatenated loops


For testing these loops separate guidelines are followed rather than the simple loops.
- For the first and the last loop in the concatenated sequence, simple loop tests are conducted at the minimum possible values. 
- For the successive loops also the simple loop tests are carried out and keeping minimal values for the upper loops and typical values for the lower loops.
- Loop concatenation along with another looping technique called loop replication is used for increasing the network capacity. 
- The above mentioned approach is to be used only if the concatenated loops are found to be independent loops.
- If they are not found to be independent than the nested approach for testing is to be followed. 
- If there are two concatenated loops say loop 1 and loop 2 and if the loop counter of the loop1 is used as the initial value for the loop 2 or vice versa, then the loops are not said to be independent. 

More about Concatenated Loops


- The concatenated loops are quite easy to maintain as compared to the other types of loops except the simple loops.
- Concatenated loops form the basis of most of the program algorithms.
- The testing of these loops is carried out in accordance with the white box testing techniques. 
- The testing techniques are applied based up on the validity of the loop constructs.
- It depends up on the programmer whether the loops are tested independently or in groups. 
- The following tests can be applied to the concatenated loops:
  1. Skipping of the entire loop
  2. Giving one pass to the loop
  3. Giving m passes to the loop where the m is less than n.
  4. Giving, n, n + 1, n – 1 passes through the loop.
In the third test the n is the number of maximum passes allowed for the loop.


Monday, May 14, 2012

How to define boundaries between automation framework and a testing tool?


Automated software testing is difficult to be carried out on its own and thus requires support. This support is supplied by a frame work which is automated for all kinds of testing and is commonly known as the “test automation framework”. To define it formally we can say that it is a set of the below mentioned aspects:
  1. Assumptions whether true or false,
  2. Concepts providing support to the automated testing and,
  3. The tools that provide aid in performing the automated testing and so on.
About Automated Testing Framework and a Testing Tool
- The most beneficial advantage being the reduction in the high costs of the whole software testing life cycle or STLC. 
- Software testing life cycle is a very extensive process and requires a lot of efforts. 
- The test automation frame work alone cannot help in completing the software testing life cycle. 
There are some additional tools other than the test automation frame work that provide aid in the testing process.
- Most of the tools available nowadays are quite easy to use and deliver what they promise.
- Most of testing tools have been exclusively designed to take control of the whole testing process inclusive of the quality assurance check.
- The testing tools which create the test cases, create them based up on the requirements. 
- Some of the testing tools have been designed to carry out the user acceptance testing programs and they are also capable of tracking the testing environments.
- With so many testing methodologies around, an equivalent number of types of testing tools have been developed to carry out the corresponding tests.
- We mean to say that for every kind of testing there are particular testing tools. 

Often the software testing tools and test automation frame work are confused to be the same thing but this is not so. There is a considerable difference between the two. This article is focused up on the boundaries between the automation frame work and the testing tools.

How the work is reduced in the case of test automation framework? 
- The start-up scripts and the driver scripts remain the same in all the processes. 
- Only the test case file to whose test case the changes have been made is required to be updated whenever a change in the test case is detected. 
- Changes are not made to the driver scripts and the startup scripts since under ideal conditions there is no need to update the scripts whenever changes are introduced in to the software program or application. 

Now coming to the testing tools, how do they work? 
The testing tools build up on the requirements of the particular piece of software under test and can make many significant improvements in the following aspects of the development process:
  1. Productivity of the developers and programmers,
  2. Motivation of the development team,
  3. Quality of the software product and so on.
Purpose for which testing framework is used:
The following are the purposes for which the testing automation frame work is used:
  1. For defining a format for the expectations to be expressed in.
  2. For creating a mechanism for driving the software system or application.
  3. For execution of the test cases.
  4. For reporting of the results.F
Purpose for which testing tools are used:
  1. Monitoring the program.
  2. Simulating the instructional set.
  3. Repeating the system level tests
  4. Making the benchmarks or run time performance comparisons.
  5. Executing the program step by step.
  6. Symbolic debugging for the inspection of the programming variables.
  7. Fault detection
Test automation frame work itself can be thought of as a testing tool.


Saturday, May 12, 2012

Explain Extreme Programming (XP) - an agile method?


One of the agile software development methodologies is the extreme programming which is quite popular with the software programmers and developers. The extreme programming since its advent has been known for the improvement of the quality of the software products and the projects and their responsiveness to the ever changing requirements of the customers. 
Apart from all this the extreme programming is known to advocate many frequent releases of the shipped software product in short development cycles i.e., to say it advocates time boxing. 
So we can say that overall it improves the productivity of the whole development process and also facilitates the introduction of check points where the new requirements from the customers can be adopted. 

Aspects of Extreme Programming


There are some other aspects of extreme programming few of which have been mentioned below:
            1.      Pair programming (programming in pairs)
            2.      Extensive code review
            3.      Unit testing of the whole code
            4.      Avoiding programming of avoidable features till they are required
            5.      Flat management structure
            6.      Simplicity of the code
            7.      Clarity of code
            8.      Adoption of the changing requirements of the customer
            9.      Maintaining frequent communication among the programmers and with the customers etc.

Drawbacks of Extreme Programming


This methodology took its name from the ground that the beneficial aspects of the engineering practices are implemented at their extreme levels. It follows from the idea that more is better if a little is good. However several potential drawbacks have been pointed out few of which have been mentioned below:
            1.      Unstable requirements
            2.      Absence of documented compromises of user conflicts
            3.      Lack of overall design specifications
            4.      Lack of design documents

"Extreme programming now experiences quite different environments from the ones that were present at the time of its origin. Extreme programming is strictly aimed for the organization of the people for the production of the high quality software projects and products." Not only this, the cost of the changing requirements is also reduced by the means of implementing multiple short development cycles in place of a long one. 

It produces the below mentioned aspects all based up on the agile programming frame work:
            1.      A number of basic values
            2.      Principles
            3.      Practices

Activities Under Extreme Programming


There are 4 basic activities that are carried out under the extreme programming process:

      1. Coding: 
      Regarding the extreme programming it has always been argued that code is the most important aspect of any program since without it no working program would exist. Coding is the thing that helps you figure out most of the solutions and navigate through the programming problems. Code sometimes can be used as a code to demonstrate a program to the fellow programmers and developers which otherwise might prove to be difficult. Code is always interpreted in one way and is suppose to be clear and concise.
  
      2. Testing: 
     This aspect also follows the above mentioned idea that more is better if a little is good. It involves the following tests:
       (a)  Unit tests: These are included for the determination of whether the program is working and giving the outcome as intended. May automated tests are written that can break the program and if the program passes all these tests successfully, the coding is declared to be complete. Each piece of the code is tested before carrying the development process forward.
     
    (b) Acceptance tests: These tests are included for the verification of the requirements which the programmers think can satisfy the requirements of the customers.
       
      3.   Listening
      4.  Designing

     

Extreme Programming Values


     1.      Communication
     2.      Simplicity
     3.      Feedback
     4.      Courage
     5.      Respect
     6.      Rules

     

 Basic Principles of Extreme Programming


     1.      Feedback
     2.      Assuming simplicity
     3.      Embracing change


Facebook activity