473,508 Members | 2,367 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mini ASP.net code executer/testing app thing/widget?

I often want to test a simple snippet of ASP.net code. Something usually
less than a full function such as a quick if/then loop or math function.

To do that, I usually create a new page, put my code on there, do some
response.writes, then compile and run. But this is tedius and I'm sure
there's a better way.

Is there a way in VS.net, or perhaps some 3rd party tool to, say, type in
this:

x=3
if x=3 then
y=5
end if

and, for example, see what the value of y is at the end?

-Darrel

--
Jun 27 '08 #1
3 1159
you could switch to a langauge that supports this: ironruby, ironpython,
javascript.net, or f#, or switch to TDD (test driven design).

to do tdd, you create a unit test to test your code (small snippets).
for visual studio use nunit or if you have team suite, then its built
in. after installing one these tools, a test project is added to your
solution. then you write click to create a test. its just a simple
harness to run your test snippets (ideally the actual code).
-- bruce (sqlwork.com)
darrel wrote:
I often want to test a simple snippet of ASP.net code. Something usually
less than a full function such as a quick if/then loop or math function.

To do that, I usually create a new page, put my code on there, do some
response.writes, then compile and run. But this is tedius and I'm sure
there's a better way.

Is there a way in VS.net, or perhaps some 3rd party tool to, say, type in
this:

x=3
if x=3 then
y=5
end if

and, for example, see what the value of y is at the end?

-Darrel

--

Jun 27 '08 #2
you could switch to a langauge that supports this: ironruby, ironpython,
javascript.net, or f#, or switch to TDD (test driven design).
Well, given we're a vb.net shop, I kind of have to stick with vb. net ;o)

IronRuby...that'd definitely interesting, but I struggle to see the appeal
in those. Why not just switch to RoR? I suppose it's useful to existing Ruby
developers, I guess.

f#? Hadn't heard of that one. Learned something new!
to do tdd, you create a unit test to test your code (small snippets). for
visual studio use nunit or if you have team suite, then its built in.
after installing one these tools, a test project is added to your
solution. then you write click to create a test. its just a simple harness
to run your test snippets (ideally the actual code).
Yes...that sounds exactly like what we'd like. Nunit looks ineresting.

It'd be nice to have a built-in 'run this chunk of code' in VS.net, but
nunit might be the next best thing. Thanks for the info!

-Darrel
Jun 27 '08 #3

You need to verse yourself with UnitTesting....NUnit is the one I go
with....

If you're using VS2008, then you can ECONOMICALLY use the built in one with
Microsoft as well.
(VS2005 has it as well, but requires versions more pricier than VS2005 Pro).

...

I would recommend this book:
http://www.amazon.com/Pragmatic-Unit.../dp/0974514020

Here is the resource itself:
http://www.nunit.org/index.php

I know you're a vb.net shop, I'd still recommend that book.
The concepts are more important than the vb.net vs csharp syntax.

..........

You'll also need to push you business logic down into a business logic
layer.
One place to look:
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!139.entry

NUnit can help you, but you have to learn it, and then actually take the
time to write them.


"darrel" <no*****@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>I often want to test a simple snippet of ASP.net code. Something usually
less than a full function such as a quick if/then loop or math function.

To do that, I usually create a new page, put my code on there, do some
response.writes, then compile and run. But this is tedius and I'm sure
there's a better way.

Is there a way in VS.net, or perhaps some 3rd party tool to, say, type in
this:

x=3
if x=3 then
y=5
end if

and, for example, see what the value of y is at the end?

-Darrel

--

Jun 27 '08 #4

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

Similar topics

22
2252
by: Martin MOKREJ© | last post by:
Hi, I'm looking for some easy way to do something like include in c or PHP. Imagine I would like to have: cat somefile.py a = 222 b = 111 c = 9
2
5217
by: Daniel | last post by:
Hi , i was just wondering if it is possible to create a mini game in vb.net say for example like space invaders with a spacecraft coming across the top of the screen in a web form dropping...
7
2511
by: Rich Grise | last post by:
OK, I don't know if this is Off-Topic for the group(s), because "QT" isn't "Pure C++", and Slackware is a distro, but those guys are sharp. :-) And I've crossposted to sci.electroncs.design because...
3
1513
by: darrel | last post by:
Not sure how to ask this, but is there such a thing as a small standalone VB.net script application that will just execute functions for testing? For instance, maybe I'm working on a 10 line...
3
2151
by: aurora | last post by:
This is an entry I just added to ASPN. It is a somewhat novel technique I have employed quite successfully in my code. I repost it here for more explosure and discussions. ...
0
5518
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
0
1063
by: tshad | last post by:
When you use Validators, it increases the size of the page and adds the following code to your page: <script language="javascript" type="text/javascript"> <!-- var Page_ValidationActive =...
5
2911
by: =?Utf-8?B?R3VpbmVhcGln?= | last post by:
Hi, I just wrote a mini C# lab for myself, I think it may be useful for others, so I shared it on my blog. If you often need to write only serveral lines of code and don't want to waste time on...
0
220
by: mqrk | last post by:
On Sep 12, 4:58 am, dizzy <di...@roedu.netwrote: I don't know that there is any way around this with g++ and ld. I find that surprising, but that may well be. Have you tried using explicit...
0
7223
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
7321
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,...
1
7036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7489
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5624
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.