Welcome To User Friendly Software Technical concepts

This Blog contains information of various technical concepts,The concepts are precise,informative with examples.visitors can easily understand the concepts of different technical related subjects like software Testing concepts , practice questions on sql And JMeter(Open source automation tool ) for Performance testing of an web application and about selenium tool used for functional testing of an web application

Wednesday, December 15, 2010

JMeter:Csv Method

Purpose of CSV Method?

The scenerios where there will be unique login ids for users to login in to the application.For example one need to load test with many user logging at a time in to the application .For this kind of scenerios one needs to go with csv method that is comma seperated variables method.

Follow Four Steps for above scenerio using csv method.

step1:
Testplan->thread group->Define no of users with ramp up period

step2:
    Thread group->samplers->Http request
  •    Mention the url in path:http://www.abc.com of Http request page
  • Add name and variables
For example
Names                        variables
user                          ${username}
password                ${password}

Before defining the variables create a csv file and save in Bin folder of JMeter downloaded files

The format of  csv file  is shown below
username   password
kevi                 ccc
richard          ddd 
tex                   eee

  • select post method
  • server name:local host

After adding Http request
Step3:
Thread group->config elements->csv data set config

The following things should define  in csv data set config page.

Name :give the csv sheet file name (For ex :abc.csv)
File encoding:Leave blank
variable names:username,password

                              (As defined in csv file)
Delimeter: ,
Allow quoted data
?:False
Recycle on Eof?:True
stop thead on EOF?:False
sharing mode:All threads

Step4:
Add listerns to thread group

In view tree listner click request  there you can see Url,username and password.

please see the screenshots for your reference


 




Note :Clear all your  temporary files if your tool is unable to read variables from the CSV file

Sunday, October 10, 2010

Mantis


About Mantis:

Mantis is Bug tracking tool which is very useful to communicate regarding status of issues  between Developers and Testers.It is Web based tool,any one  from any location can login in to the tool to see status of issues.Mantis can be be installed on windows,linux ,Mac os operating systems ,flexibility and user friendly tool.


How to raise a Bug in To Mantis

Steps as follows

1)copy and paste the url

2)Enter the UserName and password

3)Click on Report issue

Report issue:

Category will be the PreBeta and Beta(It depends on the user)

pre Beta  testing will be perfomed by the testers in company
before delivering the product to the customer.
 
Beta testing will be performed by the users in
production/customer site after the delivering of project to
customer.




Reproducibility: Issues status will be always or Not reproducible/unable to reproduce or Randomly,sometimes,always

Priority: Issue priority will be the High or low or immediate or urgent.

severity:Major or Minor or Block,crash,

Blocked : if the Bug is crashing the system then it will be considered as Blocked.


Summary : Brief description of the issue or Bug

Description: Detail report of  the Bug

Additional information:Add additional information if required.

Browse:If testers want to attach any screenshot,They have the option to attach it

Click submit





Status of issues:

New
resolved
verified
Reopen/feedback
closed



When Tester finds and report the bug,The status will be New after that tester or
team lead  has to change the status to assignedby assigning the bug to the respective
 developer

To assign the bug he has click on issue which will be the status as New.After clicking
on issue ,click on change status andselect status as assigned and then click ok button

By clicking ok, A  new window will be opened shows a list of developers in the
 drop down,Assign the issue  to the respective developer and click submit.Issue status
 will change from New to assigned.

After tester assigns the bug to developer .Developer will fix it ,if its a enhancement he will
deferr itby changing issue state as Resolved or Deffer.


Once again Tester will retests the defect when the status has got resolved
.if the issue is fixed tester will change tatus from resolved to verified or else he will
reopen it .

Once the defect is not reproducible ,He will close the defect





My View: If tester /developer click option My view All New,resolved 
,assigned issues will get seperated for that page.

Advantages of Mantis:
  • Flexibility
  • User friendly tool
  • Status of issues will be identified in different colors
  •  user can easily open the issue by searching the id in search
    text box 
  • Suppose when anybody edit the issue or delete the issue or
    else modified the issue ,All details are stored in log history .
  • user can also use filter the issues based on  category,priority ,status ,
    developers etc...as shown in the screen shot.  
  • Developer cant able edit issue raised by Tester and Tester cant edit
     comments of developers for issues raised by the tester.
  • Summary report shows how many defect or open ,resolved ,verified and closed
    in each project and also how many issues a tester has raised,Active issue
    and long time opened issues and also Developer resolution all this things
    we can see in a summary report.
  • Developer can Mark as duplicate if the defect has been raised twice

Note : To add Category or project name click on  Manage -> Mange projects and to add users click on Manage ->Mange users.These permissions is given to admin only







 

Tuesday, September 7, 2010

Basic Types of controllers in JMeter


 Controllers in JMeter:
JMeter has two types of Controllers: Samplers and Logical Controllers
Samplers tell JMeter to send requests to a server. For example, add an HTTP Request Sampler if you want JMeter to send an HTTP request
Logical Controllers let you customize the logic that JMeter uses to decide when to send requests.
Logical Controllers:
Logic Controllers determine the order in which Samplers are processed.
1) Once only controller  
 Once Only Logic Controller tells JMeter to process the controller(s) inside it only once.

This Controller is used for the login request that has to be send to the server only once.
So that Login request should be placed under this controller.

Consider there will be two Requests in Test plan ie is Request1 and Request2 such
that one request will be a login request placed under once only controller.So that
JMeter will execute these request such that

Login(Request1)
Request2
Request2 for Loop count :2

This is as like to be a  real time scenerio



Example: No of threads=1
                 Ramp up period=1
                 Loop count=3





In the above screen shot he HTTP Request ‘b’ is executing only once as it is under once only controller. Whereas ‘a’ is executing thrice because loop count is 3.
2) Loop controller
If you add Generative or Logic Controllers to a Loop Controller, JMeter will loop through them a certain number of times, in addition to the loop value you specified for the Thread Group.
For example, if you add one HTTP Request to a Loop Controller with a loop count of two, and configure the Thread Group loop count to three, JMeter will send a total of 2 * 3 = 6 HTTP Requests.


In the above screen shot the http request ‘b’is repeating 9 times(Loop Controller with a loop count of three and configure the Thread Group loop count to three)

If you add Generative or Logic Controllers to an Interleave Controller, JMeter will alternate among each of the other controllers for each loop iteration.

Random Controller

The Random Logic Controller acts similarly to the Interleave Controller, except that instead of going in order through its sub-controllers and samplers, it picks one at random at each pass

 

 

5) Simple Controller
The Simple Logic Controller lets you organize your Samplers and other Logic Controllers. Unlike other Logic Controllers, this controller provides no functionality beyond that of a storage device.


6)Transaction Controller
 
 The Transaction Controller generates an additional sample which measures
the overall time taken to  perform the nested test elements.

 For example :

 In JMeter when record is done through proxy server so many tiny elements will be
 be generated for each page rather than request for entire page. So that,its difficult to
 analyze the test results.To group all the tiny compnents of the page ,
 a Transaction Controller  has to be used.

Transaction Controller will show results for all request rather than the each component.

Please follow the steps to achieve this

1)Add thread group

2)Add Transaction Controller  to the thread group
    (Thread group->Logic controllers ->Transaction Controller).

3)Check the  generate parent sample check box in Transaction Controller page..

4)Now view the listeners.


Tuesday, August 31, 2010

Detailed about What is Test Case

Test case
  • Test case can be defined as written down document by referring to which we validate applications.
  • A test cases help us exactly how to test should be carried out.
  • The systems test case help us verify an validate the system
  • Test cases are written by referring to requirements(document)
  • A test case in software engineering is set of conditions and variables under
    which a tester will determine whether an application or system is working correctly or not.
  • Test cases are often referred to as test scripts
  • Test case contains the data against which we test the application.
  • The test cases are written such that they cover all the scenerios
  • The test case verify validate the technical requirements and specifications
  • The test case verify if the application or system meet the business and functional requirements specified
  • The test case may also verify if the system meets the performance standards

Monday, August 30, 2010

Compatibility Testing

Compatibility Testing
It is a type of Non functional testing
Testing the behaviours of the application on different hardware and software configurations.
Testing conducted on the application to evaluate the application compatability with the computing environment.

computing environment may contain below mention element
1)computing capacity of hardware platform (IBM 360)
2)Bandwidth handling capacity of networking hardware
3)compatability of pheripherals
4)Operating systems(printer.Dvd drive etc)
5)Data Base(oracle)
6)other system software(web server etc)
7)Browser compatability(Firefox,Netscape,safari etc)

Wednesday, August 25, 2010

Selenium xpath

Selenium xpath
Selenium xpath are orginally written for xml files.It is very similar to HTML.
When there no id or name in the html expression selenium uses xpath to identify the elements.
For Example: 


< input type="submit" 
value="login now" valign="absmiddle"/>



In above example there is no id or name so selenium uses xpath to identify the elements to perform the action.
For Example:


  
< input type="submit" 
value="login now" valign="absmiddle"/>

Saturday, August 21, 2010

Static and Dynamic testing

Static and Dynamic testing
Static Testing:
1)Analysis of program is carried out without executing program.
example:Reviewing,walk through

Review:An evaluation of a product or project status to ascertain
discrepancies from planned results and to recommend improvements.

Walk Through: A step by step presentation by the author
of a document in order to gather information and to establish
a common understanding of its content.


Friday, August 20, 2010

Prototype Testing

                                                                             Testing

Prototype Testing
It  involves the testing of prototype developed

It includes testing color,word,spelling,label,size,length etc..
of the dummy screen.


Advantages
1)The changes in prototype can made with least efforts ,compared
to change made on real applications,

2)No confusions between company and customer.

3)The software designer and implementation  can obtain feedback
from users early in the project that if there are any changes it
can be done before the actual design.

4)Quality of the application will be good.

5)prototype can also used by end users to describe and prove
requirements that developers have not considered.

Disadvantages
1)Resource,time,cost used is more

2)prototypes(dummy screens) might be wasted.

Thursday, August 19, 2010

Mutation Testing

Mutation Testing
Mutation Testing is a method of software testing which involves
modifying programs source code in small ways.

Mutation testing is forcibly injecting bugs and testing the
application.

It means making changes in code and testing how application
works.

Mute means Bug ,In this testing programmer intentionally
introduce the  bug and validates completeness and correctness
of the program.

Comparison Testing

Comparison Testing
In comparison testing , testers compare the old application
with new application and see whether the new application is
working better than the old application.

Testers will compare the strengths and weakness of new product  with the
existing product which is already in use.

Comparison Testing is needed to improve the quality of the product by
removing weakness of the new product.

Tuesday, August 17, 2010

JMeter Samplers and Assertions

Samplers and Assertions :

1) SAMPLERS:Samplers tell JMeter to send requests to a server and wait
for a response.


JMeter samplers include: 
FTP Request 
HTTP Request
Java object request 
LDAP Request 
SOAP/XML-RPC Request 
WebService (SOAP) Request

Sunday, August 15, 2010

Security Testing

Security Testing




Testing the security of application that how well it protects
the data from unauthorized entry.


The process to determine that an information system
protects how well it protects data and maintain
functionality as intended.


The six basic security concepts that needed to be covered
in security testing are:
confidentiality
Integrity
authentication
authorization
availability
non-repudiation



Confidentiality:
A  security measure which protects against the disclosure of
information against disclosure of information to parties
other than intended persons by no means ,the only
way of ensuring the security.


Integrity:
A measure intended to allow the receiver to determine the
information which it is providing is correct.

Authentication:
Allows a receiver to have confidence that information it receives
is origination from specific known resource.

Authorization:Access control
The process of determining that a request is allowed to receive
a service or perform an operation.

Availability:Assuring information and communication services
is ready for use when expected only bt the authorized users.

Non-Repudiation: A measure intended to prevent the later denial
that an action happened ,or a communication took place.

Some examples of security Testing are:
    Examples1:
  • When user Login to new session there will be one session pool
    and one number is generated and this is dropped in to local
    machine
    c:\prog files\window\temp
    session id=cookie
  • When you logotype the cookie gets deleted that is cookies
    get back into browser.
  • Login to web application
  • Go to c:\prog files into notepad 
  • logout
  • once again paste into path then try to open it without
      user name and password,It should not login because each time
    different random numbers are generated.
  • session id should get expired as soon as user logout.
    This is security testing

    Example2
    :
    1)Take notepad ,write user name and password
  • copied user name and password is then copied into
      user name and password fields of the application.
  • once again copy and paste it in notepad,it should
    not be decoded.

    Example3:
  • Logout  and click on the back arrow,it should not once again
    go back to application









Reliability Testing



Reliability Testing
In case of electronic voting machine due to more use or continuous
clicking of Buttons the machine may not work.

Testing the precession(accuracy) of the fuctionality of the
application over a period of Time.

The ability of a system or component to perform its required
fuctions under stated conditions for a specified period of Time.

Done for standard application.

Example1)Load Runner : Run the application for many hours
        set time 70hrs,92hrs,120hrs
2)There should be no change in functionalities even after many hours
   example:Gaming applications.

Friday, August 13, 2010

Basics of Jmeter

1) To work with Jmeter

Install JDK software which is used for java application.
Then install Jmeter
After installation,go to “bin” directory.
Double click on “Jmeter.bat”


JMeter proxy Step-by-step

To record the requests sent to the server follow the below mentioned steps

2) The main screen loads two elements in the left pane
Test Plan

The Test Plan is a container for running tests

Workbench.
The Workbench is a sandbox for any test or portion of a test that you
are working on. When you are ready to test what you have designed in
the Workbench, you can copy or move the elements into the Test Plan.



3) Right click on workbench and add the HTTP proxy: add
   -> non-test elements -> HTTP Proxy Server.

  Click on start button at the bottom of the  window.

4)


5) Start Internet Explorer, but do not close Jmeter.
6) From the tool bar, click “tools -> internet options”. This should bring up the     options.

7) Select the “connection” tab

8) Click “LAN settings”  button near the bottom.

9) On the connections tab, check “Use a proxy server for your LAN”. The address and port  fields should be enabled now.

10) Address – enter “Local host” or the IP address of your system

11) Port – enter “8080”.

12) Click “OK” button

13) Click “OK” button again. This should return you to the browser

14) In the “Address” bar at the top, enter   WWW.gmail.com           
and  hit the “enter” key.

15) Click on a few links on “Gmail page”  page.

16) Close internet explorer and bring up the Jmeter window.

17) Right click on the testplan and click add>thread group



18) Select “Thread group” and enter Number of threads 
  ,Ramp up Period, Loop   count .

19) Copy the paths from “Work bench” into “Thread group”.

20) Right on the Thread group ->add - > listener -> summary report .

21) 21) Save the test plan.
22) When you're ready to run the test, there's two ways:

                 1. Run -> Start
                 2. CRTL – R
 
23) While the test is running, in the upper right-hand corner, there should be a green square.
When the test is done, the box should be Grey.

Glossary

Thread Groups
A thread group allows you to define the behavior of a group of threads that will interact with your application. Think of each thread as a person sitting at their computer, trying to access a given Web page. You will use thread groups to define the number of threads that a test will launch.



Number of Threads -- You can enter as many threads to stimulate a load test. A single user is represented by each Thread so if you wish to simulate a load test with 5 concurrent users then you need to enter 5 as the value for this property.    

         
Ramp-Up Period -- It indicates the time taken by Jmeter to create all of the threads needed. If you set 10 seconds as the ramp-up period for 5 threads then the JMeter will take 10 seconds to create those 5 threads. Also by setting its value to 0 all the threads can be created at once.  

                                                
Forever -- If you choose this option then the Jmeter will keep sending the unspecific requests to the tested application. And if disabled then the test will be repeated the number of times entered in the Loop Count box.        

                                                                                    
Loop Count -- By specifying its value Jmeter gets to know that how many times a test is to be repeated provided that the Forever check box should be unchecked.      

Listeners :
Listeners gather data as your tests run, and allow you to report on that data. You can use listeners to create graphs or export data to files.
      

Wednesday, August 11, 2010

Performance Testing(Load,stress,volume ,soak, spike,scalability)


Performance testing:

Performance testing of an application / system is basically the process of
understanding how the application and its operating environment behave at
various user loads.
In general, it is performed by simulating virtual users to determine / validate the
scalability, availability, robustness, hardware & software resource utilization of the
application thus ideally paving the way for effective capacity planning of the system for
future usage. One of the main objectives of performance testing is to help maintain the
system with low latency, high throughput, and low utilization.

Testing the stability and the response time of an application by
applying  different loads is called performance Testing

Stability:Ability to withstand a designed numbers of users.
Response Time:Time taken to run the program,send the request
                and receive the response.This should be
                minimum when any application runs.

If 1500 users access at a time and due to load the system
may getcrashed then it has poor stability. If it is not gets
crashed thencheck the response time.Response Time should
be low.



Need for Performance Testing
Performance Testing sets the ‘best possible’ performance expectation under
a given configuration of infrastructure.
It also highlights early in the testing process if changes need to be made before a
pplication goes into production.

Types  of Performance Testing:
Load Testing:A Load test is usually conducted to understand the
                Behavior of an application under a specific
expected Load.

"Testing the stability and response time of an application by
applying loadin which it is equal to or less than designed numbers 
of usersperforming a specific operation no of transactions within the
set duration".

Stress Testing:







Stress Testing:
This testing is normally used to break the application.Double the
no of usersadded to the application and test is run again until
the application break down.
This is done to determine the application robustness in the times of
extreme loads and helps application administrator to determine if the
application willperform sufficiently if the current load goes above the
expected load.

Example:If it is designed for 100 users and configuration 1ghz
processor with speed 1ghz Rom,Reduce the network the configuration
               and keep the numbers of users constant.


Volume Testing:Testing the stability and response time of an application
                            by transferring or processing huge volume
of data.

Soak Testing:Test the stability and response time of an application
              of an application by applying Load continuouslyfor particular
period of time.
It is also  known as  endurance Testing

For Example : Test the application for 72hrs(3days),96hrs(4 days)
and 120hrs(5days).If it works well for 3 days thenwe can  ensure for
1 year it will work fine.

spike testing:It is done by spiking the number of users
 (Increasing or changing the load) and understanding the behavior
of the application whether  it will go down or will it be able to
handle dramatics(sudden) changes in load.

Scalability Testing: It is Testing of software application for
measuringits capability to scale out(There will besome standards
if measures beyond that its scale out)in terms of any of its non
functional capabilitieslike user load supported the number of
transactions,and the data volume.

Functional and Funtionality Testing

Functional  and Functionality Testing

Functional Testing:
After completing the user interface testing test engineers
concentrateon Functional testing  to validate the customer 
requirements.

 Note : User interface testing:Testing three factors on every screen
of the build.
                           1) Ease to use 
                            2)Look and feel(GUI)
                            3)Speed in interface

 Functional testing involves  testing each component is working
fine or not.
For example:1) For Email field if testers enter invalid data whether
it showing warning or not.(Validation)
              2)For Fax field testers enter  invalid data like alphabets
showing warning or not..

A procedure to drive and /or select test cases based on analysis
of the specification of the functionality of a component or system
without reference to its internal structure or internal logic.

  • Testing the product features at early phase of  the Life cycle

Functionality Testing
  Functionality testing is nothing but to test whether product or application
 is build as per customer requirement specified in system requirement
specification.

For Example:
1) SRS  specifies application should work in multiple
  Browser. 
2)customer specifies in a email, user should have
  privilege to  specify the number of mails at once.

3)In Gmail application by clicking logout button it should
return back to home page.

In above examples there is certain logic that  customer specified
in srs.Testing this kind of scenarios is called Functionality Testing .

Functionality testing is nothing but to test whether product or
applicationis build as per customer requirement specified in system
requirement specification.

Testing the product features at every phase of the life cycle that is
Adhoc Testing,Integration Testing and System Testing.

Tuesday, August 10, 2010

System Testing

         
         
         
        
         
          System Testing:
  • It is end-to-end testing ,testing where in testing
    environment is just like in production environment .
  • Navigate through all features and check whether
    end features are working or not.
  • Testing the overall behavior of an application by
    simulating an environment which is just by simulating
    an environment which is just like the production
    environment.
  • To do system testing we have to identify end-to-end
    scenario.
  • It is the test conducted by navigating through modules.
  • system testing is performed on the entire system in the
    context of a Functional requirement specification
    or system requirement specification.
  • It is also intended to test beyond the bounds defined in
    system requirement specification.

      Example:In a Bank
      Fist time :
      Loan amount :20000
      Rate of interest =2%=400
      processing  fee:250

    while repaying the loan he has to pay 20650

      second time :

      Loan amount :20000
      Rate of interest :400
      No processing fee
      Repayable:20400

       steps:-
  •    Login as x and apply for 20000
  •    After applying ,Logout
  •    login as manager then approve the loan for x
  •    logout as a manager
  •    login as x and check the balance and it should be
       20000
  •    come back to amount balance ,20000 is there.
  •    logout as x
  •    login as database access and change the server time to
       next month
  •    logout as data base access 
  •    login as x and check the loan amount to be repaid as
       20650
  •    login as y and transfer 650 rs to x
  •    logout as y
  •    login as x and check the balance 20650, repay loan


  •   Here all modules like manager module ,
     savings,amount transfer,Data base access,loan
      module are working properly.
  •   It is like master checkup.
  •   For example :when many users use the same
      application system become slow or clash due
      to load.
      If the load on the system is resistible then
      we can say whole system is working properly.
  •   what ever test is done on the overall
      system it is called system testing or
      end -to-end testing.