|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
HELP: ASP & Javascript testing procedures & methodstime. 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. Andrew Wan wrote on 17 apr 2007 in
microsoft.public.inetserver.asp.general: > I have been developing web applications with ASP & Javascript for a No, ASP is not a language but a platform.> 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, What language under ASP are you using? > which means one has twice the amount of work to do interms of syntax No, that has nothing to do with interpreting/compiling.> checking & semantic/runtime checking. 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 You could think it is bad, I think it is just right for the purposes > object-oriented features, like public/private members of classes. All > functions are public and accessible which causes bugs. intended. > Does anyone know good testing procedures & methods of ASP & Yes, modular scripting, setting stopping and logging breakpoints,> Javascript? 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 I doubt that. On all the different browsers and versions?> 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. 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 You want to take away all the joy that complex debugging gives?> main webpage code changes. There must be better testing procedures & > methods for ASP & Javascript that is widely known & used. Thankfully impossible, methinks. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress) >> Sorry, when I said ASP I meant VBScript.>> 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 Yes, I know IIS does some compiling/running but only when it runs.>> 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 VBScript is good for small scripts. However it gets messy when 10 developers >> 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. > have contributed to hundreds of ASP/Javascript pages for one webapp. >> Does anyone know good testing procedures & methods of ASP & Yes, that is by manually going through clicking on the javascript submit >> 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. > 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 For each piece of functionality, write a testcase for expected output. >> 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? > 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? Yep, AJAX an asp page, parse the responseXML or responseText to see expected > Just testing if an .asp pseudo-img is downloaded by clientide javascript > will do. > 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 Debugging & testing is ok and managable for a certain sized webapp. But when >> 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? > it gets very big, then it's very time consuming, especially repetitive after every test release..
Show quote
Hide quote
"Andrew Wan" <andrew_wan1***@hotmail.com> wrote in message I don't agree. You can still modularize VBScript in the same way you wouldnews:OuqkSYNgHHA.4156@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. > 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? Show quoteHide quote > >> Does anyone know good testing procedures & methods of ASP & If you want this level of testing you need to develop your app around the> >> 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,.. > 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. Andrew Wan wrote on 17 apr 2007 in
microsoft.public.inetserver.asp.general: >>> I thought so. [not the sorry, but the vbs ;-) ]>>> 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. 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 There is no need to use vbscript at all. > developers have contributed to hundreds of ASP/Javascript pages for > one webapp. 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. > You can build that in using testing modules that you build yourself.> 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 No it is not, I mean it should not be, when you see building the test >>> 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.. 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) "Andrew Wan" <andrew_wan1***@hotmail.com> wrote in message True but there isn't anything much better.news:e7L2ptMgHHA.2396@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. > You mean VBScript and Javascript I suspect. If you are going to use> 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. 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. > You're just not using them right. Both VBScript and Javascript support the> 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. creation object types with Private variables and functions. > For well encapsulated objects you could consider building a unit testing> Does anyone know good testing procedures & methods of ASP & Javascript? > suite other than that there is no substitute for manual test scripts or expensive testing software. > It's all down to management, there is no silver bullet.> 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. > > You mean VBScript and Javascript I suspect. If you are going to use Compiled DLL? Tell me more about this please. Is this like the class file in > 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. 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 True...> the > creation object types with Private variables and functions. > For well encapsulated objects you could consider building a unit testing Please tell me more about building a unit testing suite.> suite other than that there is no substitute for manual test scripts or > expensive testing software. > 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. "Andrew Wan" <andrew_wan1***@hotmail.com> wrote in message VBScript is very similar to VB6 (now no longer on offer from MS since itsnews:Owj9MiNgHHA.1240@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. 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.> See http://www.junit.org/index.htm> > 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. > 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. Yep. I'm afraid a phrase containing the words 'Creek' and 'Paddle' comes to> > 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. > 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.
Other interesting topics
recordset.addNew() with postgres
HELP! -- Redirection question copy from a word doc on to textarea on asp page Update Column to add Decimal Point Classic ASP sytem needs to support Chinese data entry - to do list Getting data from XML file to an array/db preventing Session ID replay attack Problem in Returning Recordset in ASP ASAP: Need ASP reseller hosting free asp host, join this! |
|||||||||||||||||||||||