How we can call perticular server api's by using unit test ?

How we can call perticular server api's by using unit test ?how we can write the code for that api's and also how we can parameterized. pls send me some sample example how we can call the api's into unit test.

[219 byte] By [ramanareddy] at [2007-12-30]
# 1

Hi,

Can you please explain what is it you are trying to do?

guy kolbis

guykolbis at 2007-9-5 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 2
Actually i have to do api level testing after that i have to add this tests into load tests.But i dont know how to write the scripts for api level test by using unit test,also what are the configurations we need to do and how to set the parameters for that perticular api test...... can you explain me and give me some examples on that api level test .....
ramanareddy at 2007-9-5 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 3

Do you mean somthing like NUnit.Forms ? like a button click?

If so, I am not sure but I do not think there is any support for that just yet.

guykolbis at 2007-9-5 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 4
is it possible to do parameterization for unit test.If it is possible how can we do the parameterization in team system for unit test.
ramanareddy at 2007-9-5 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 5

Actually i am a tester, i dont have any coding knowledge to do api level testing?for doing api testing which are the languages do we know?and how can we write the code for chek out/check in for ASCCI Page.

ramanareddy at 2007-9-5 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 6

Hi,

You can create a unit test for each test case you wish to automate. A unit test starts as an empty function in which you can write whatever code you want.

From the Test menu, select New Test and Unit Test. Pick the language of your choice (C#, VB, MC++). If you don't already have a Test Project it will create one.

The unit test file starts with a namespace and a test class. You know it is a test class because it as the attribute [TestClass].

Inside it are the test methods, also attributed with [TestMethod] for identification to VS that they are unit tests.

You can add your own additional methods just by typing in the file. Each method must be public, return void, and accept no parameters:

[TestClass]

class MyTestClass

{

[TestMethod]

public void MyTestMethod()

{

}

}

Inside the test method, you can start to add your test code. Make connections to your server, instantiate objects, call methods, etc. This way you have full flexibility to test however you like.

You can also make use of Data-Driven Unit testing which will simplify testing small variations on an API by storing those variations in a data source. We have a blog about that here and you can also find information on that at MSDN.

Finally, we also have support for generating a unit test from the code under test. This makes your job a bit easier because the basic infrastructure to create the object, initialize parameters, call the method, and validate the output is prepped for you. However, I don't know what kind of server code you are working with so I'm not sure VS will support your project type. You can read more about Test Generation on MSDN.

Cheers,

David Williamson

DavidR.WilliamsonMSFT at 2007-9-5 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 7
i am not understanding what do you mean by server code......... actually it is a vb application..we are trying to call some dll's into unit test of team system... is it possible to do this by using team system...............
ramanareddy at 2007-9-5 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...

Visual Studio Team System

Site Classified