473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to test performance using the ACT

Hello,
I have developted a webservice application. The application has a few
webservices each webservice with their own webmethods of course.
I want to measure the performance of my site. I look at the Application
Center Test of Visual Studio Enterprice edition, but can not make it to work
with the web services. I can't figure out how to call the web services from
an ACT test. It seems it only can work with aspx pages not web services asmx
(where you have to call the web method)
Eventhought you can create you own ACT projects from Visual Studio the only
laguages supported are vbscript and javascript.
Help!!!
Does any of you have tested performance on webservices?
/Alexis
Nov 23 '05 #1
3 2389
Hello

There are two ways you can do it.

Case 1:

1. Create a proxy class DLL in C# or any .NET or COM.
2. If its C# or .NET regiter (gacutil.exe )it in GAC, by make it as interop
using regasm.exe.
3. Now write a script in ACT to instansite the object and call the method.

Case 2:

1. In ACT create a web request.
2. Build the soap request ( you can lauch the .asmx is IE and get the SOAP
request format"
3. now post the request e.g like below


Set oConnection = Test.CreateConnection(serviceServer, servicePort, false)
If (oConnection is Nothing) Then
Test.Trace "Error: Unable to create connection to " & serviceServer & ":" &
servicePort
Test.StopTest
Else
Set oRequest = Test.CreateRequest
oRequest.Path = serviceUrl
oRequest.Verb = "POST"
oRequest.HTTPVersion = "HTTP/1.1"
oRequest.EncodeBody = false
Set oHeaders = oRequest.Headers
'-------------------------------------------------------------------------
' Add Request header information
'-------------------------------------------------------------------------
oHeaders.RemoveAll
oHeaders.Add "Accept", "image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, */*"
oHeaders.Add "Accept-Language", "en-us"
oHeaders.Add "Content-Type", "text/xml; charset=utf-8"
oHeaders.Add "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.2; H010818; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
oHeaders.Add "Host", "(automatic)"
oHeaders.Add "Pragma", "no-cache"
oHeaders.Add "Cookie", "(automatic)"
oHeaders.Add "Content-Length", "(automatic)"
oHeaders.Add "SOAPAction", soapAction
'------------------------------------------------------------------------------------------------------------
' Create the Request in memory
'------------------------------------------------------------------------------------------------------------
Dim ReqStr
ReqStr = ""
ReqStr = ReqStr + "<?xml version=""1.0"" encoding=""utf-8""?>"
ReqStr = ReqStr + "<soap:Envelope
xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
xmlns:xsd=""http://www.w3.org/2001/XMLSchema""
xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">
<soap:Body>
<HugeText2500 xmlns=""http://tempuri.org/"" />
</soap:Body>
</soap:Envelope>"
Set oResponse = oConnection.Send(oRequest)

If (oResponse is Nothing) Then
.............................

Cheers :)
Geoman
"Alexis" wrote:
Hello,
I have developted a webservice application. The application has a few
webservices each webservice with their own webmethods of course.
I want to measure the performance of my site. I look at the Application
Center Test of Visual Studio Enterprice edition, but can not make it to work
with the web services. I can't figure out how to call the web services from
an ACT test. It seems it only can work with aspx pages not web services asmx
(where you have to call the web method)
Eventhought you can create you own ACT projects from Visual Studio the only
laguages supported are vbscript and javascript.
Help!!!
Does any of you have tested performance on webservices?
/Alexis

Nov 23 '05 #2
Hello and Thank you.
One question thought.
in your samle code is ReqStr the Body of the Request?

"Geoman" wrote:
Hello

There are two ways you can do it.

Case 1:

1. Create a proxy class DLL in C# or any .NET or COM.
2. If its C# or .NET regiter (gacutil.exe )it in GAC, by make it as interop
using regasm.exe.
3. Now write a script in ACT to instansite the object and call the method.

Case 2:

1. In ACT create a web request.
2. Build the soap request ( you can lauch the .asmx is IE and get the SOAP
request format"
3. now post the request e.g like below


Set oConnection = Test.CreateConnection(serviceServer, servicePort, false)
If (oConnection is Nothing) Then
Test.Trace "Error: Unable to create connection to " & serviceServer & ":" &
servicePort
Test.StopTest
Else
Set oRequest = Test.CreateRequest
oRequest.Path = serviceUrl
oRequest.Verb = "POST"
oRequest.HTTPVersion = "HTTP/1.1"
oRequest.EncodeBody = false
Set oHeaders = oRequest.Headers
'-------------------------------------------------------------------------
' Add Request header information
'-------------------------------------------------------------------------
oHeaders.RemoveAll
oHeaders.Add "Accept", "image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, */*"
oHeaders.Add "Accept-Language", "en-us"
oHeaders.Add "Content-Type", "text/xml; charset=utf-8"
oHeaders.Add "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.2; H010818; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
oHeaders.Add "Host", "(automatic)"
oHeaders.Add "Pragma", "no-cache"
oHeaders.Add "Cookie", "(automatic)"
oHeaders.Add "Content-Length", "(automatic)"
oHeaders.Add "SOAPAction", soapAction
'------------------------------------------------------------------------------------------------------------
' Create the Request in memory
'------------------------------------------------------------------------------------------------------------
Dim ReqStr
ReqStr = ""
ReqStr = ReqStr + "<?xml version=""1.0"" encoding=""utf-8""?>"
ReqStr = ReqStr + "<soap:Envelope
xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
xmlns:xsd=""http://www.w3.org/2001/XMLSchema""
xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">
<soap:Body>
<HugeText2500 xmlns=""http://tempuri.org/"" />
</soap:Body>
</soap:Envelope>"
Set oResponse = oConnection.Send(oRequest)

If (oResponse is Nothing) Then
............................

Cheers :)
Geoman
"Alexis" wrote:
Hello,
I have developted a webservice application. The application has a few
webservices each webservice with their own webmethods of course.
I want to measure the performance of my site. I look at the Application
Center Test of Visual Studio Enterprice edition, but can not make it to work
with the web services. I can't figure out how to call the web services from
an ACT test. It seems it only can work with aspx pages not web services asmx
(where you have to call the web method)
Eventhought you can create you own ACT projects from Visual Studio the only
laguages supported are vbscript and javascript.
Help!!!
Does any of you have tested performance on webservices?
/Alexis

Nov 23 '05 #3
Its the whole request which would be send to the server. if you look closely
you can see the body.......

<soap:Body>
<HugeText2500 xmlns=""http://tempuri.org/"" />
</soap:Body>
</soap:Envelope>"

thanks
Geo

"Alexis" wrote:
Hello and Thank you.
One question thought.
in your samle code is ReqStr the Body of the Request?

"Geoman" wrote:
Hello

There are two ways you can do it.

Case 1:

1. Create a proxy class DLL in C# or any .NET or COM.
2. If its C# or .NET regiter (gacutil.exe )it in GAC, by make it as interop
using regasm.exe.
3. Now write a script in ACT to instansite the object and call the method.

Case 2:

1. In ACT create a web request.
2. Build the soap request ( you can lauch the .asmx is IE and get the SOAP
request format"
3. now post the request e.g like below


Set oConnection = Test.CreateConnection(serviceServer, servicePort, false)
If (oConnection is Nothing) Then
Test.Trace "Error: Unable to create connection to " & serviceServer & ":" &
servicePort
Test.StopTest
Else
Set oRequest = Test.CreateRequest
oRequest.Path = serviceUrl
oRequest.Verb = "POST"
oRequest.HTTPVersion = "HTTP/1.1"
oRequest.EncodeBody = false
Set oHeaders = oRequest.Headers
'-------------------------------------------------------------------------
' Add Request header information
'-------------------------------------------------------------------------
oHeaders.RemoveAll
oHeaders.Add "Accept", "image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, */*"
oHeaders.Add "Accept-Language", "en-us"
oHeaders.Add "Content-Type", "text/xml; charset=utf-8"
oHeaders.Add "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.2; H010818; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
oHeaders.Add "Host", "(automatic)"
oHeaders.Add "Pragma", "no-cache"
oHeaders.Add "Cookie", "(automatic)"
oHeaders.Add "Content-Length", "(automatic)"
oHeaders.Add "SOAPAction", soapAction
'------------------------------------------------------------------------------------------------------------
' Create the Request in memory
'------------------------------------------------------------------------------------------------------------
Dim ReqStr
ReqStr = ""
ReqStr = ReqStr + "<?xml version=""1.0"" encoding=""utf-8""?>"
ReqStr = ReqStr + "<soap:Envelope
xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
xmlns:xsd=""http://www.w3.org/2001/XMLSchema""
xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">
<soap:Body>
<HugeText2500 xmlns=""http://tempuri.org/"" />
</soap:Body>
</soap:Envelope>"
Set oResponse = oConnection.Send(oRequest)

If (oResponse is Nothing) Then
............................

Cheers :)
Geoman
"Alexis" wrote:
Hello,
I have developted a webservice application. The application has a few
webservices each webservice with their own webmethods of course.
I want to measure the performance of my site. I look at the Application
Center Test of Visual Studio Enterprice edition, but can not make it to work
with the web services. I can't figure out how to call the web services from
an ACT test. It seems it only can work with aspx pages not web services asmx
(where you have to call the web method)
Eventhought you can create you own ACT projects from Visual Studio the only
laguages supported are vbscript and javascript.
Help!!!
Does any of you have tested performance on webservices?
/Alexis

Nov 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Randell D. | last post by:
Folks, Ever since reading an interesting article in Linux Format on PHP whereby suggested code writing was made that could enhance performance on a server, I've started testing various bits of...
1
by: Bob | last post by:
Are there any known applications out there used to test the performance of the .NET garbage collector over a long period of time? Basically I need an application that creates objects, uses them, and...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
22
by: Alex Martelli | last post by:
I have fixed almost all of the outstanding bugreports and feature request for gmpy: divm doesn't leak memory any more, truediv and floordiv are implemented for all types, etc -- in the current CVS...
5
by: Dmitry Martynov | last post by:
Consider I have the following construction "if(x is T) ...". How much this test cost? And I wonder how it is implemented. Can I gain in performace if I introduce virtual methods like "bool...
9
by: Steve Sargent | last post by:
Hi: I'm trying to debug the following code, and it keeps looping on the if statement: public static bool operator == (OnlineMemberNode first, OnlineMemberNode second) { if(first == null) {
6
by: SevDer | last post by:
Is there a way to test guid string? I want to do it without try catch block to save on performance. Thanks in advance. -- SevDer
6
by: Vyacheslav Maslov | last post by:
Hi all! I have many many many python unit test, which are used for testing some remote web service. The most important issue here is logging of test execution process and result. I strongly...
0
by: H - Recruiter - Testing | last post by:
Dear Candidate, Hope you are doing well. One of our CMM level 5 clients, SATYAM has urgent requirement for SR. PERFORMANCE TEST ENGG. Please mail your resume across ASAP with following details:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.