Stages | Activities and Steps | Output/Results |
Application Study
|
|
- High level understanding
- Know supported browsers,
Test environment, test processes
|
Feasibility Analysis
|
|
- Feasibility checklist
- Automation model
|
Scope
|
|
- Features in scope of automation
- High level estimates
|
Test Planning
|
|
- Automation Test Plan
- Team setup
- Training plan
|
Test Design
|
|
- Coding standards
- Framework libraries identified
- Format of configuration, UI/Data map files identified
|
Test Development
|
|
- Framework libraries
- Framework functions
- Page Objects
- Test scripts
|
Test Execution
|
|
- Formatted test results
- Test summary reports
|
Maintainance
|
|
- Updated test scripts
- Updated function libraries
|
Mar 28, 2014
Automation Framework Development - Various Stages
Mar 12, 2014
Testing GetWeather webservice using Nunit and .Net
We need .NET framework (Visual Studio 20XX) to carry out web services testing using NUnit. We would need to create new Project/Solution in Visual Studio from File > New > Project (as shown in below fig)
Select ClassLibrary Project and provide some name and click on Ok. (Class library is a library of classes, interfaces, and value types that provide access to system functionality.)
Once the project is created, add the NUnit dlls (nunit.core.dll and nunit.framework.dll) to integrate NUnit with .NET. Right click on References and click Add Reference.
Once the dlls are added, provide attributes [TestFixture] to Class and [Test] to method(s).
NUnit will understand from these attributes that the class is TestClass and the method is TestMethod which we are going to Test.
After this add a web-reference for WSDL by right clicking in references and select "Web Reference". and provide the WSDL URL. In this case : http://www.webservicex.net/globalweather.asmx?WSDL.
After the nunit reference and web service reference are being added, create a class and paste below code in class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using WebserviceX.GlobalWeatherWebService;
namespace WebserviceX
{
[TestFixture]
public class CurrencyConvert
{
private GlobalWeather gw=new GlobalWeather();
public String city;
public String country;
[Test]
public void TestGlobalWeather()
{
String weather = gw.GetWeather("Hyderabad Airport", "India");
Console.WriteLine("weather : " + weather);
Assert.IsNotNull(weather,"Null Response");
}
}
}
Now build the solution file. After the build is successful you can see .dll file is created under bin/debug folder of your parent solution directory.
To test :
1. Open Nunit
2. Load the .dll file which was generated after building the solution. From File > Open
3. Select the method and click on Run.
Using this you can get weather for any city in world. :)
Subscribe to:
Posts (Atom)