ClubStarterKit Beta 3 (w/ subsonic)

by Jesse 9. April 2008 16:01

This past fall, I was asked to help coach a kids team, 12-13 year olds.  I played for years, know a ton of stuff about it -- I use to pitch, play first and left (I got wheels and can track down a ball).  Not to be overjocked, I knew we needed a website of some kind and remembered the club starter kit -- gah! There's 3 now.  I notice one is on codeplex and has a dazzling "2.0" on it ...I'm skeptical so I check it out.  Subsonic with a beta 3 is out!  Well, luck would have it I'm using subsonic on the project I'm currently working on.  Ha, this'll be easy.

Right out of the box, there were a couple little things with just general clicking around and removing the default content, no big deal.  I removed the forums area (nothing like having little Johnny's psycho mom going nuts on a public site) and started to completely rewire the stats area.  The site really isn't designed out of the box for a baseball team, so I went off and added a batting and pitching section, along with a base page that displays these.  Slap on some update panels and presto, I got a nice, clean looking stats page with uber cool updating.  I divided up the adding into two parts, Game and Player.  From there, you can add players to a "Roster" and therefore change what players were in that game, you can then input their stats which drive the main page.  This is a members only area of course, but otherwise, coooool stuff.

baselist.JPG (13.15 kb) - this is an empty stats page, extra links added along with "Sponsors"

mod-addgame.JPG (16.80 kb) - add game "pop up"

mod-addplayer.JPG (8.92 kb) - add player "pop up"

I'll post up my code here sometime soon (meant to do it last night when I started this writing) along with a blank database. 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

.Net | Coding | VB

Selenium revisited (web testing in general)

by Jesse 11. March 2008 04:41

One of the magic's of the internet and more specifically, blogs, it puts you in touch with people you'd NEVER otherwise talk with.  I recieved a comment on my Selenium and the Kiss Theory from InCisif.net suggesting their Web unit testing.  Initially, I denied the response and asked for a more detailed comment as to why and explain how their product is better in x, y, z for reasons a, b and c -- Here's the response I recieved... 

Generally I avoid saying things like "I believe ours [product] is better in x, y and z for a, b and c reasons", making a good case will take a long paragraph, and it is just my opinion and I am bias. Anyway,  here is my case.

Selenium is the only automation tool under $1000 that support cross browser testing. And If you absolutely need functional cross browser testing, Selenium and Selenium RC (remote control) are good choices. Selenium comes with some weaknesses that are due to its architecture that allow cross browser testing (Speed of execution, installation of the Selenium Core on the server).
 
If you are more interested in implementing a lot functional testing, focusing

  • On the speed of development
  • The speed of execution
  • The quality of the IDE and debugger
  • Having a direct access to the DOM
  • You have to support only Internet Explorer or you will address the others browser manually

You could chose between Watir, WatiN, TestComplete or InCisif.net.

If you want to develop your automation in Ruby, then you will choose Watir.
 
If you want to develop your automation in DelphiScript, VBScript or JavaScript, then you will choose TestComplete.

If you are more .NET guy and want to develop in VB.NET, you probably want to look at our product, because we are committed to support VB.NET and C# to the same level (Selenium IDE does not support VB.NET, WatiN focus primarily on C#).
 
Here are some of the some differences between WatiN and InCisif.net.

By the way why do I known so much about WatiN, because I was been using it since January 2008 extensively on one web development. I think WatiN is a very good product. And I have been chatting with the author Jeroen van Menen via email.

InCisif.net has a more advanced record mode than the WatiN recorder. WatiN recorder is little buggy and still not mature. Here you must try for yourself (see our screen casts at http://www.incisif.net).

Web automation testing is not about dummy capture/replay, but a good code generator (AKA record mode can save time). See our screenshots.  Our record mode support: C#, VB.NET and IronPython.

InCisif.net has a tracing mode that allows reviewing the execution of tests. Making easier to find where exactly a test failed.

( full sized image here InCisif_net_Trace_File.jpg (466.08 kb) )

InCisif.net API to look up control is based on what we call the “HTML Control Naming Algorithm”, documented in our help file. 9 steps to determine what is the best information to identify uniquely an html control. Used at record and run time.

WatiN also as a pretty good API, but the record mode does not know how to use it.

When accessing an html control WatiN uses the type of the html control for example : 

ie.Link(Find.ById("LinkButton1")).Click();
ie.Button(Find.ById("btnSubmit")).Click();

Incisif.net uses the following syntax:

Page.Control(“LinkButton1”).Click();
Page.Control(“btnSubmit”).Click();

If the html control changes from a <button> to a <div> Incisif.net code will still work.

WatiN API is a little bit faster than InCisif.net API. Our 9 steps algorithm and our tracing feature have a cost.

I was not able to get WatiN to work with the NUnit 2.x GUI Application. InCisif.net supports NUnit, but also comes with its own test framework including a UI, similar to NUnit, but we added the concept of parameterized test (see here, here and here) and the concept of Test Dependency, very important for UI testing (see this link)

InCisif.net has some special features at record time and runtime to deal with the ASP.NET I'd like “ctl00_ContentPlaceHolder1_butCreateAccount”. See the blog we also have a screen cast about it.

InCisif.net can use some of the C# 3.5 LINQ features and some of our API can use Lambda expressionThat is not absolutely required to program web testing, but is kind of fancy.
 
InCisif.net supports to start and stop Cassini, the web server that ship with ASP.NET 2.0. 
Very usefull.
 
Other features from InCisif.net

  • Reporting API, XML report, HTML report about the tests and test suite execution.
  • Grab Screen shots when an assert failed or an un-expected error is raised.
  • Email notification of the HTML suite report. Attached in a zip file: the xml report, the text trace file and the screenshot grabbed in case of errors.
  • WatiN may support FireFox in the future, InCisif.net may support testing SilverLigth 2.0 application.

Pricing: WatiN is Free. InCisif.net is not, but we are about to reduce our price to $99 a license. We will also offer to license the source code later this year.
If you want to develop applications using InCisif.net and distribute them, we have what we call InCisif.net Run Time For Application which requires a simple files copy to install.
There are royalties between $25 and $50 per install based on the quantity.
 
Jesse, let me known what you think.

Frederic Torres
www.InCisif.net
Web Testing with C# or VB.NET

I think this week at home I'm going to take a look at this - Frederic was nice enough to send me a personal key and I just so happen to have a few sites I could use this against.  More to come on this, no doubt.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

.Net | C# | VB | Testing

My TreeView ate my TreeNodeCollection

by Jesse 6. March 2008 10:38

I seem to always come into contact with these "We hate you!" type errors, and this one is up there.  Took me a while to figure this out, Humor me.

Open up a new web project, create a short number of nodes as such...(sorry its in VB)

Dim Master As New TreeNode("Master", "1m")
Dim Node1 As New TreeNode("Item1", "1p")
Dim Node2 As New TreeNode("Item2", "2p")
Dim Child As New TreeNode("Child1", "1c")
'add child node to node1
Node1.ChildNodes.Add(Child)
'add node1 and 2 to Master
Master.ChildNodes.Add(Node1)
Master.ChildNodes.Add(Node2)

Ok, got that? Now if you tag this into a treeview, you get this kind of display...

Master
- Item1
  o Child1
- Node2

Which is great, but what if you wanted a tree of JUST the children items to Master? so it would look like this...

Item1
- Child1
Item2

How would you do that?  Use some kind of loop?  How about trying TreeView1.Nodes.Add(Master.ChildNodes) (bernt, one's a collection and the control only expects a single node)? I decided to use the Master.ChildNodes and try a foreach loop -- surprise, and recieved this error. 

Index was out of range. Must be non-negative and less than the size of the collection. 

Hu?  My code isn't complicated, so what'd I do wrong?  I move out my Master.ChildNodes into its own collection, "nodes", slightly refactor and check my logic.

For count As Integer = 0 To nodes.Count - 1
    
Me.treeView.Nodes.Add(nodes(count))
Next

yep, I'm starting at 0, minus one off the collection count -- thats lining up, makes sense so I run the code, check the count, yep its 2, thats good

I'm thinking at this point maybe I'm counting wrong, maybe it IS 1 based, so I step into the next and see this

Wait ...hu? Why would it REMOVE an item from my collection when I add it to the treeview?  What if I wanted that for multiple places?  This doesn't add up.  So, let me ask the question -- WHY is it doing this?!  If you switch the Me.treeView.Nodes.Add(nodes(0)) it'll build just fine.  I just don't get it.  With other things like lists and the like, you can rip though those things and pull only what you need into whatever and it does not remove stuff.

Can someone try this and see if you get the same thing?

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

.Net | Coding | Weird | VB

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Like the description says, at my core, I'm a scientist and engineer.  I came from humble beginnings on a 486DX2 Packard Hell playing doom2 on IPX to in a small time retail shop and got into hardware (ISO layers FTW!) and it was all downhill from there.  I'm infinitely curious about almost everything and always wanting to know.

Some of the stuff I'm currently into/researching...

Sitefinity

Ninject

Subsonic

Java

Currently working on ...
i did the hundred 
and some extra stuff

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's, their brother nor their dog's view in anyway.  At all.  Ever.

© Copyright 2007-2008