帮助:ASP& Javascript测试程序&方法 [英] HELP: ASP & Javascript testing procedures & methods

查看:44
本文介绍了帮助:ASP& Javascript测试程序&方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用ASP& amp ;;开发Web应用程序。 Javascript很长

时间。我一直在使用Visual Studio 2003.NET。虽然VS2003适用于ASP&的
智能感知Javascript,它仍然不是那么好。


ASP& Javascript就是它们都被解释了,其中
意味着它有两倍的工作量可以进行语法检查和语义/运行时检查。&br;

语义/运行时检查。 />

另一个坏处是ASP& Javascript没有真正面向对象的

功能,比如公共/私有类成员。所有功能都是公共的

并且可以访问,这会导致错误。


有没有人知道好的测试程序& ASP和方法Javascript?


我考虑了2个程序,其中测试分为Javascript

客户端测试,& ASP服务器端测试。可以使用AJAX完成ASP测试

以查看页面是否无法显示或者正确的结果是返回
。可以进行Javascript测试以查看与GUI相关的内容是否正确显示。


这仍然是很多工作,测试脚本将失败如果主要的

网页代码发生变化。必须有更好的测试程序和方法

ASP&广为人知的Javascript&使用。

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.

推荐答案

Andrew Wan于2007年4月17日写在

microsoft.public.inetserver.asp .general:
Andrew Wan wrote on 17 apr 2007 in
microsoft.public.inetserver.asp.general:

我一直在使用ASP& amp; Javascript for

很长一段时间。我一直在使用Visual Studio 2003.NET。虽然VS2003对于ASP& ;;的intellisense来说是好的。 Javascript,它仍然不是那么好。


ASP& Javascript是他们都被解释,
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,



不,ASP不是一种语言而是一个平台。


什么ASP下的语言是你用的吗?

No, ASP is not a language but a platform.

What language under ASP are you using?


这意味着一个人有两倍的工作量来完成语法间隔

check&语义/运行时检查。
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.


另一个坏处是ASP& Javascript没有真正的

面向对象的功能,比如类的公共/私有成员。所有

函数都是公共的,可以访问,这会导致错误。
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.


有没有人知道好的测试程序& ASP&

Javascript的方法?
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.


我想过测试分为2个程序

Javascript客户端测试,& ASP服务器端测试。 ASP测试

可以使用AJAX来查看页面是否无法显示或

返回正确的结果。可以进行Javascript测试以查看

与GUI相关的内容是否正确显示。
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.



我对此表示怀疑。在所有不同的浏览器和版本上?


如何在不运行(!!)的页面上进行AJAX?

只测试一下。 asp伪img由clientide javascript下载

会这样做。

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.


这仍然是很多工作,测试脚本会失败如果

主网页代码发生变化。对于ASP& amp;必须有更好的测试程序&

方法。广为人知的Javascript&用过的。
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.



你想要带走复杂调试所带来的所有乐趣吗?


谢天谢地,不可能,这是不可能的。

-

Evertjan。

荷兰。

(请将x''es更改为我的电子邮件地址中的点数)

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)


>>
>>

> ASP& amp; Javascript是他们都被解释,
>One of the cons of ASP & Javascript is that they''re both interpreted,



不,ASP不是一种语言而是一个平台。


什么ASP下的语言是你用的?


No, ASP is not a language but a platform.

What language under ASP are you using?



对不起,当我说ASP我的意思是VBScript。

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.



是的,我知道IIS会进行一些编译/运行,但只有在运行时才会运行。

Yes, I know IIS does some compiling/running but only when it runs.


>另一个坏处是ASP& Javascript没有真正的面向对象功能,比如类的公共/私有成员。所有
功能都是公共的,可以访问,这会导致错误。
>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适用于小脚本。然而,当10个开发人员为一个webapp贡献了数百个ASP / Javascript页面时,它会变得混乱。

VBScript is good for small scripts. However it gets messy when 10 developers
have contributed to hundreds of ASP/Javascript pages for one webapp.


>有没有人知道好的测试程序& ASP&
Javascript的方法?
>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.



是的,那是通过手动点击javascript提交

按钮来形成发布到asp页面等等。它仍然是所有手册。我在寻找的是
是自动化测试,比如JUnit和使用assert()

函数......这些都是VBScript所没有的。这就是为什么我正在寻找更好的类似或自动VBScript / Javascript测试的方式。

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.


>我已经考虑了将测试分成两个程序的程序。
Javascript客户端测试,& ASP服务器端测试。 ASP测试可以使用AJAX来查看是否无法显示页面或者返回正确的结果。可以进行Javascript测试以查看是否正确显示了与GUI相关的内容。
>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?



对于每个功能,编写一个预期输出的测试用例。

当然我们无法以图形方式测试但只搜索

上的某些字符串的响应文本(例如页面加载等)。如果有人没有测试他们的ASP

页面,那么通常语法错误将导致页面无法显示页面。搜索此类页面会自动进行自动化。

javascript相同,..

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,..


你会怎样做AJAX在一个不是(!!)运行的页面上?

只是测试一下.asp伪img是否由clientide 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.



是的,AJAX是一个asp页面,解析responseXML或responseText以查看预期的

输出(忽略布局/图形问题)。这将测试VBScript语法&

服务器端逻辑。

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.


>这仍然是很多工作,如果
主网页代码发生变化,测试脚本将失败。必须有更好的测试程序和ASP&
方法。广为人知的Javascript&用过的。
>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&对于特定大小的webapp,测试是可以管理的。但是当

变得非常大时,那么它非常耗时,特别是在每次测试发布后都是重复的......

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..




" Andrew Wan" < an ************ @ hotmail.comwrote in message

news:e7 ************** @ TK2MSFTNGP04.phx .gbl ...

"Andrew Wan" <an************@hotmail.comwrote in message
news:e7**************@TK2MSFTNGP04.phx.gbl...

我一直在使用ASP& amp; Javascript很长

时间。我一直在使用Visual Studio 2003.NET。虽然VS2003适用于ASP&的
智能感知Javascript,它仍然不是那么好。
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.


>

ASP& amp;的一个缺点Javascript是它们都被解释,
>
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.



你的意思是我怀疑的VBScript和Javascript。如果你要使用

语言,没有严格的类型检查,那么是的,你有更多的工作

要做。使用其他语言。如果您控制服务器平台,请自行获取VB6的副本并将服务器端复杂性转移到已编译的DLL中。

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.


>

另一个坏处是ASP& Javascript没有真正的
>
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.



你只是没有正确使用它们。 VBScript和Javascript都支持带有私有变量和函数的

创建对象类型。

You''re just not using them right. Both VBScript and Javascript support the
creation object types with Private variables and functions.


>

任何人都知道好的测试程序& ASP和方法Javascript?
>
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.


>

我已经考虑过将测试分成Javascript的2个程序

客户端测试,& ASP服务器端测试。可以使用AJAX完成ASP测试

以查看页面是否无法显示或者正确的结果是返回
。可以进行Javascript测试以查看与GUI相关的内容是否正确显示。


这仍然是很多工作,测试脚本将失败如果主要的

网页代码发生变化。必须有更好的测试程序和方法
>
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

for


ASP&广为人知的Javascript&使用。
ASP & Javascript that is widely known & used.



这完全取决于管理层,没有银弹。

It''s all down to management, there is no silver bullet.


这篇关于帮助:ASP&amp; Javascript测试程序&amp;方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆