473,385 Members | 2,044 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,385 software developers and data experts.

HELP: ASP & Javascript testing procedures & methods

I have been developing web applications with ASP & Javascript for a long
time. I have been using Visual Studio 2003.NET. While VS2003 is okay for
intellisense of ASP & Javascript, it's still not that great.

One of the cons of ASP & Javascript is that they're both interpreted, which
means one has twice the amount of work to do interms of syntax checking &
semantic/runtime checking.

Another bad thing is that ASP & Javascript doesn't have real object-oriented
features, like public/private members of classes. All functions are public
and accessible which causes bugs.

Does anyone know good testing procedures & methods of ASP & Javascript?

I have thought about 2 procedures where testing is split into Javascript
Client-side testing, & ASP Server-side testing. ASP testing can be done
using AJAX to see if "Page cannot be displayed" or the correct results are
returned. Javascript testing can be done to see if GUI-related things are
displayed properly.

This is still a lot of work, and the test scripts will fail if the main
webpage code changes. There must be better testing procedures & methods for
ASP & Javascript that is widely known & used.

Apr 17 '07 #1
18 2348
Andrew Wan wrote on 17 apr 2007 in
microsoft.public.inetserver.asp.general:
I have been developing web applications with ASP & Javascript for a
long time. I have been using Visual Studio 2003.NET. While VS2003 is
okay for intellisense of ASP & Javascript, it's still not that great.

One of the cons of ASP & Javascript is that they're both interpreted,
No, ASP is not a language but a platform.

What language under ASP are you using?
which means one has twice the amount of work to do interms of syntax
checking & semantic/runtime checking.
No, that has nothing to do with interpreting/compiling.

A compilesd programme can give you the same amount of headaches.

In fact sort of compiling is done at or just before runtime by most
modern script engines.
Another bad thing is that ASP & Javascript doesn't have real
object-oriented features, like public/private members of classes. All
functions are public and accessible which causes bugs.
You could think it is bad, I think it is just right for the purposes
intended.
Does anyone know good testing procedures & methods of ASP &
Javascript?
Yes, modular scripting, setting stopping and logging breakpoints,
doing some logging on the realtime use and errors,
listening to the end users, and inviting them to report errors,
and especcially using your brain.
I have thought about 2 procedures where testing is split into
Javascript Client-side testing, & ASP Server-side testing. ASP testing
can be done using AJAX to see if "Page cannot be displayed" or the
correct results are returned. Javascript testing can be done to see if
GUI-related things are displayed properly.
I doubt that. On all the different browsers and versions?

How would you do AJAX on a page that is not(!!) run?
Just testing if an .asp pseudo-img is downloaded by clientide javascript
will do.
This is still a lot of work, and the test scripts will fail if the
main webpage code changes. There must be better testing procedures &
methods for ASP & Javascript that is widely known & used.
You want to take away all the joy that complex debugging gives?

Thankfully impossible, methinks.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Apr 17 '07 #2
>>
>One of the cons of ASP & Javascript is that they're both interpreted,

No, ASP is not a language but a platform.

What language under ASP are you using?
Sorry, when I said ASP I meant VBScript.
>which means one has twice the amount of work to do interms of syntax
checking & semantic/runtime checking.

No, that has nothing to do with interpreting/compiling.
A compilesd programme can give you the same amount of headaches.

In fact sort of compiling is done at or just before runtime by most
modern script engines.
Yes, I know IIS does some compiling/running but only when it runs.
>Another bad thing is that ASP & Javascript doesn't have real
object-oriented features, like public/private members of classes. All
functions are public and accessible which causes bugs.

You could think it is bad, I think it is just right for the purposes
intended.
VBScript is good for small scripts. However it gets messy when 10 developers
have contributed to hundreds of ASP/Javascript pages for one webapp.
>Does anyone know good testing procedures & methods of ASP &
Javascript?

Yes, modular scripting, setting stopping and logging breakpoints,
doing some logging on the realtime use and errors,
listening to the end users, and inviting them to report errors,
and especcially using your brain.
Yes, that is by manually going through clicking on the javascript submit
buttons to form post to a asp page, etc. It is still all manual. What I was
looking for is automated testing, like JUnit and use of assert()
functions... which VBScript doesn't have. That's why am looking for better
ways that are similar or automated VBScript/Javascript testing.
>I have thought about 2 procedures where testing is split into
Javascript Client-side testing, & ASP Server-side testing. ASP testing
can be done using AJAX to see if "Page cannot be displayed" or the
correct results are returned. Javascript testing can be done to see if
GUI-related things are displayed properly.

I doubt that. On all the different browsers and versions?
For each piece of functionality, write a testcase for expected output.
Ofcourse we cannot test graphically but only search for certain strings on
the response text (eg. page loaded, etc). If someone didn't test their ASP
page then usually a syntax error will result in a "Page cannot be displayed"
page. It would be good for this to be automated to search for such pages.
Same for javascript,..
How would you do AJAX on a page that is not(!!) run?
Just testing if an .asp pseudo-img is downloaded by clientide javascript
will do.
Yep, AJAX an asp page, parse the responseXML or responseText to see expected
output (ignoring layout/graphical issues). That will test VBScript syntax &
server-side logic.

>This is still a lot of work, and the test scripts will fail if the
main webpage code changes. There must be better testing procedures &
methods for ASP & Javascript that is widely known & used.

You want to take away all the joy that complex debugging gives?
Debugging & testing is ok and managable for a certain sized webapp. But when
it gets very big, then it's very time consuming, especially repetitive after
every test release..

Apr 17 '07 #3

"Andrew Wan" <an************@hotmail.comwrote in message
news:e7**************@TK2MSFTNGP04.phx.gbl...
I have been developing web applications with ASP & Javascript for a long
time. I have been using Visual Studio 2003.NET. While VS2003 is okay for
intellisense of ASP & Javascript, it's still not that great.
True but there isn't anything much better.
>
One of the cons of ASP & Javascript is that they're both interpreted,
which
means one has twice the amount of work to do interms of syntax checking &
semantic/runtime checking.
You mean VBScript and Javascript I suspect. If you are going to use
languages that don't have strict type checking then yes you have more work
to do. Use another language. If you control the server platform get
yourself a copy of VB6 and move server side complexity into a compiled DLL.
>
Another bad thing is that ASP & Javascript doesn't have real
object-oriented
features, like public/private members of classes. All functions are public
and accessible which causes bugs.
You're just not using them right. Both VBScript and Javascript support the
creation object types with Private variables and functions.
>
Does anyone know good testing procedures & methods of ASP & Javascript?
For well encapsulated objects you could consider building a unit testing
suite other than that there is no substitute for manual test scripts or
expensive testing software.
>
I have thought about 2 procedures where testing is split into Javascript
Client-side testing, & ASP Server-side testing. ASP testing can be done
using AJAX to see if "Page cannot be displayed" or the correct results are
returned. Javascript testing can be done to see if GUI-related things are
displayed properly.

This is still a lot of work, and the test scripts will fail if the main
webpage code changes. There must be better testing procedures & methods
for
ASP & Javascript that is widely known & used.
It's all down to management, there is no silver bullet.
Apr 17 '07 #4

"Andrew Wan" <an************@hotmail.comwrote in message
news:Ou**************@TK2MSFTNGP02.phx.gbl...
>
Another bad thing is that ASP & Javascript doesn't have real
object-oriented features, like public/private members of classes. All
functions are public and accessible which causes bugs.
You could think it is bad, I think it is just right for the purposes
intended.

VBScript is good for small scripts. However it gets messy when 10
developers
have contributed to hundreds of ASP/Javascript pages for one webapp.
I don't agree. You can still modularize VBScript in the same way you would
in any other language. Hence the problems of change control are the same
for VBScript as they are for VB6, C++ or any other language. You are using
Source control?
Does anyone know good testing procedures & methods of ASP &
Javascript?
Yes, modular scripting, setting stopping and logging breakpoints,
doing some logging on the realtime use and errors,
listening to the end users, and inviting them to report errors,
and especcially using your brain.

Yes, that is by manually going through clicking on the javascript submit
buttons to form post to a asp page, etc. It is still all manual. What I
was
looking for is automated testing, like JUnit and use of assert()
functions... which VBScript doesn't have. That's why am looking for better
ways that are similar or automated VBScript/Javascript testing.

I have thought about 2 procedures where testing is split into
Javascript Client-side testing, & ASP Server-side testing. ASP testing
can be done using AJAX to see if "Page cannot be displayed" or the
correct results are returned. Javascript testing can be done to see if
GUI-related things are displayed properly.
I doubt that. On all the different browsers and versions?

For each piece of functionality, write a testcase for expected output.
Ofcourse we cannot test graphically but only search for certain strings on
the response text (eg. page loaded, etc). If someone didn't test their ASP
page then usually a syntax error will result in a "Page cannot be
displayed"
page. It would be good for this to be automated to search for such pages.
Same for javascript,..
If you want this level of testing you need to develop your app around the
testing. For example you can seperate the output of data from it's
presentation by having processing pages generate XML instead of HTML. Tests
can post to and receive from these pages XML which should be invariant. XSL
or other tools can be used to transform the XML to a presentation. If that
presentation needs to change the processing tests remain unaffected.
Apr 17 '07 #5
You mean VBScript and Javascript I suspect. If you are going to use
languages that don't have strict type checking then yes you have more work
to do. Use another language. If you control the server platform get
yourself a copy of VB6 and move server side complexity into a compiled
DLL.
Compiled DLL? Tell me more about this please. Is this like the class file in
ASP.NET? Will it be able to still do XSL transformations using MSXML?
You're just not using them right. Both VBScript and Javascript support
the
creation object types with Private variables and functions.
True...
For well encapsulated objects you could consider building a unit testing
suite other than that there is no substitute for manual test scripts or
expensive testing software.
Please tell me more about building a unit testing suite.
It's all down to management, there is no silver bullet.
True. But consider a very large webapp already programmed, and it's been
passed down to a new team... and previous developers have left. And already
there's no standards/management and everyone has already done their own
thing.... Very messy.
Apr 17 '07 #6
Andrew Wan wrote on 17 apr 2007 in
microsoft.public.inetserver.asp.general:
>>>
One of the cons of ASP & Javascript is that they're both
interpreted,

No, ASP is not a language but a platform.

What language under ASP are you using?

Sorry, when I said ASP I meant VBScript.
I thought so. [not the sorry, but the vbs ;-) ]

Serverside jscript is a good alternative though,
more compact, object oriented, much more imaginative.

Why focus on vbscript?

[....]
VBScript is good for small scripts. However it gets messy when 10
developers have contributed to hundreds of ASP/Javascript pages for
one webapp.
There is no need to use vbscript at all.
Jscrip will do fine.

It will only get messy if you do not programme modular,
so making black box functions that are thoroughly documented, tested, and
which bowel workings are not of interest anymore to the outside
programmer.

Yes, I know that needs a firm hrip by the head programmer, but that is
not different in a compiling environment.
>
Yes, that is by manually going through clicking on the javascript
submit buttons to form post to a asp page, etc. It is still all
manual. What I was looking for is automated testing, like JUnit and
use of assert() functions... which VBScript doesn't have. That's why
am looking for better ways that are similar or automated
VBScript/Javascript testing.
You can build that in using testing modules that you build yourself.
>>I have thought about 2 procedures where testing is split into
Javascript Client-side testing, & ASP Server-side testing. ASP
testing can be done using AJAX to see if "Page cannot be displayed"
or the correct results are returned. Javascript testing can be done
to see if GUI-related things are displayed properly.

I doubt that. On all the different browsers and versions?
Debugging & testing is ok and managable for a certain sized webapp.
But when it gets very big, then it's very time consuming, especially
repetitive after every test release..
No it is not, I mean it should not be, when you see building the test
environment as a logical part of the final site building.

And in the end, the testing should be done by user, as the developer
knows too much about the intention of the project to make those logical
sound "mistakes" the user makes. That is why the debugging code should be
part of the end product and enable logging and error reporting on
production run.

This is valid for all software development:
testing, testing, updating, testing ..., ad libitum et ad nauseam.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Apr 17 '07 #7

"Andrew Wan" <an************@hotmail.comwrote in message
news:Ow**************@TK2MSFTNGP04.phx.gbl...
You mean VBScript and Javascript I suspect. If you are going to use
languages that don't have strict type checking then yes you have more
work
to do. Use another language. If you control the server platform get
yourself a copy of VB6 and move server side complexity into a compiled
DLL.

Compiled DLL? Tell me more about this please.
VBScript is very similar to VB6 (now no longer on offer from MS since its
been replaced by VB.NET which is now know simply as VB). VB6 though can
compile code native machine code, supports typed variables and allows access
to the windows API.

You'd have to ask yourself whether it's not better just to go ASP.NET
instead.
Is this like the class file in ASP.NET?
Nope nothing like at all.
>Will it be able to still do XSL transformations using MSXML?
Yes.
>
You're just not using them right. Both VBScript and Javascript support
the
creation object types with Private variables and functions.

True...
For well encapsulated objects you could consider building a unit testing
suite other than that there is no substitute for manual test scripts or
expensive testing software.

Please tell me more about building a unit testing suite.
See http://www.junit.org/index.htm

Unfortunately in view of the what you have said below it's way way too late
for this to help. Unit testing is only effective if the modules have been
built with the need to be unit tested in mind.
It's all down to management, there is no silver bullet.

True. But consider a very large webapp already programmed, and it's been
passed down to a new team... and previous developers have left. And
already
there's no standards/management and everyone has already done their own
thing.... Very messy.
Yep. I'm afraid a phrase containing the words 'Creek' and 'Paddle' comes to
mind.

If you have a large uncontrolled organically grown app on your hands that
doesn't already support the sort of industrial strength testing you seem to
be looking for the chances are slim you can do much about it now.

Apr 17 '07 #8
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:Ol**************@TK2MSFTNGP05.phx.gbl...
>
If you want this level of testing you need to develop your app around the
testing.
Yes, unfortuantely. As someone experienced with old-style batch programming,
I know that most modern interactive systems are inadequate environments for
testing. Software should be developed with a life-cycle philosophy including
testing but it would really help if the environments such as Windows and ASP
were to include support of such requirements.
Jul 15 '07 #9
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn*******************@194.109.133.242...
>
You are responding on a posting of 3 months ago, on

Date: 17 Apr 2007 10:24:24 GMT
Yes, I know.
Fine for you, but I am not going along.
Okay.
Jul 15 '07 #10

"Sam Hobbs" <sa****@social.rr.com_change_social_to_socalwrot e in message
news:eR**************@TK2MSFTNGP03.phx.gbl...
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn*******************@194.109.133.242...

You are responding on a posting of 3 months ago, on

Date: 17 Apr 2007 10:24:24 GMT

Yes, I know.
Fine for you, but I am not going along.

Okay.

I rarely agree with evertjan on comments on how people post but honestly if
you expect a response you'll need to quote more of the original thread.

--
Anthony Jones - MVP ASP/ASP.NET
Jul 17 '07 #11
Anthony Jones wrote on 17 jul 2007 in
microsoft.public.inetserver.asp.general:
I rarely agree with evertjan on comments on how people post but
honestly if you expect a response you'll need to quote more of the
original thread.
I often agree with Anthony as I also do in this instance, but I hate to say
so wih this amount of crossposting. He could become famous.

;-)

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 17 '07 #12
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:uM**************@TK2MSFTNGP04.phx.gbl...
>
I rarely agree with evertjan on comments on how people post but honestly
if
you expect a response you'll need to quote more of the original thread.
Look again; I did. It was evertjan that removed the relevant text.
Jul 18 '07 #13
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
>
I often agree with Anthony as I also do in this instance, but I hate to
say
so wih this amount of crossposting. He could become famous.
Who is "He"? Are you speaking in the third person, since you are the first
one that responded to the thread.

Or perhaps you intended to be critical of me and this was your attempt to to
do that. If so then I will assume my previous comments were accurate, but if
that is the explanation then it is unfortunate that you feel a need to
respond in this manner.
Jul 18 '07 #14
Sam Hobbs wrote on 18 jul 2007 in microsoft.public.scripting.jscript:
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
>>
I often agree with Anthony as I also do in this instance, but I hate
to say
so wih this amount of crossposting. He could become famous.

Who is "He"? Are you speaking in the third person, since you are the
first one that responded to the thread.

Or perhaps you intended to be critical of me and this was your attempt
to to do that. If so then I will assume my previous comments were
accurate, but if that is the explanation then it is unfortunate that
you feel a need to respond in this manner.
No, this is something personal, Anthony seems to have with me, and is felt
asplayful from my side, nothing to di with you, Sam.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 18 '07 #15


"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Sam Hobbs wrote on 18 jul 2007 in microsoft.public.scripting.jscript:
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
>
I often agree with Anthony as I also do in this instance, but I hate
to say
so wih this amount of crossposting. He could become famous.
Who is "He"? Are you speaking in the third person, since you are the
first one that responded to the thread.

Or perhaps you intended to be critical of me and this was your attempt
to to do that. If so then I will assume my previous comments were
accurate, but if that is the explanation then it is unfortunate that
you feel a need to respond in this manner.

No, this is something personal, Anthony seems to have with me, and is felt
asplayful from my side, nothing to di with you, Sam.
Yes just some tongue in cheek banter. (I'm not actually very good at it but
I try).

--
Anthony Jones - MVP ASP/ASP.NET
Jul 19 '07 #16

"Sam Hobbs" <sa****@social.rr.com_change_social_to_socalwrot e in message
news:eS**************@TK2MSFTNGP04.phx.gbl...
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:uM**************@TK2MSFTNGP04.phx.gbl...

I rarely agree with evertjan on comments on how people post but honestly
if
you expect a response you'll need to quote more of the original thread.

Look again; I did. It was evertjan that removed the relevant text.

Nope sorry I read the thread from the beginning, I don't no what you're on
about. I'm not prepared to comment even on my own comments when I can't
remember the context properly.
--
Anthony Jones - MVP ASP/ASP.NET
Jul 19 '07 #17
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Sam Hobbs wrote on 18 jul 2007 in microsoft.public.scripting.jscript:

No, this is something personal, Anthony seems to have with me, and is felt
asplayful from my side, nothing to di with you, Sam.
Very sorry. Once I know you, I am sure we can have a few jokes too.
Jul 20 '07 #18
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
>
"Sam Hobbs" <sa****@social.rr.com_change_social_to_socalwrot e in message
news:eS**************@TK2MSFTNGP04.phx.gbl...
>"Anthony Jones" <An*@yadayadayada.comwrote in message
news:uM**************@TK2MSFTNGP04.phx.gbl...
>
I rarely agree with evertjan on comments on how people post but
honestly
if
you expect a response you'll need to quote more of the original thread.

Look again; I did. It was evertjan that removed the relevant text.


Nope sorry I read the thread from the beginning, I don't no what you're on
about. I'm not prepared to comment even on my own comments when I can't
remember the context properly.
--
Anthony Jones - MVP ASP/ASP.NET

I am sorry for having an unfair advantage. If it was important then I would
retrieve the details, but my comments were not that importnat.
Jul 20 '07 #19

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

Similar topics

4
by: Hugh Cowan | last post by:
Hello, I don't program full-time (anymore), but I do try and stay on-top of the latest technologies and like most are always trying to upgrade my skills and remain current (as much as is...
4
by: kevin | last post by:
meta refresh tag is failing , it is supposed to go to the entry1.htm site which is the flash swf file but it doesn't check code please http://members.optusnet.com.au/~kevindauth/ thanks...
1
by: jarit | last post by:
Hi, Found these coding guidelines for C#, HTML, Javascript, Java, HTML, PL/SQL, T-SQL, VB and VBScript. Well written and free to download. www.demachina.com/products/swat Jeroen
4
by: johkar | last post by:
When the output method is set to xml, even though I have CDATA around my JavaScript, the operaters of && and < are converted to XML character entities which causes errors in my JavaScript. I know...
1
by: Vadym Stetsyak | last post by:
Hi there! Are there any built-in tool in VS.NET that can help to profile an application? (here I mean source code) Generally I need to determine the time of execution of particular methods. ...
8
by: Bob | last post by:
This is a bug that affects all controls, not just the ones that it's screwing up in my app. I really need a workaround. Anyone? Please? Before I regret letting my MSDN subscription run out and pay...
6
by: b. hotting | last post by:
Hi, I don't see why this won't work, it are 3 links, the last one (a get) does work, but the first 2 won't. i would like to use a post, through hidden input types any idea? thanks for your...
2
by: Kuldeep | last post by:
Hi All, Could anybody give me some ideas on the advantages and disadvantages when it comes to having Event Procedures and Methods in .aspx page rather than having them in .aspx.cs/.aspx.vb ...
1
by: Zwalker | last post by:
Help with Javascript turned off, new flashdrive version needed, to view YouTube even though Javascript is turned on and new flashdrive version installed.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.