469,909 Members | 1,769 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,909 developers. It's quick & easy.

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 2265
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Randell D. | last post: by
22 posts views Thread by Alex Martelli | last post: by
5 posts views Thread by Dmitry Martynov | last post: by
9 posts views Thread by Steve Sargent | last post: by
6 posts views Thread by SevDer | last post: by
6 posts views Thread by Vyacheslav Maslov | last post: by
reply views Thread by H - Recruiter - Testing | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.