Lightweight Test Automation Framework April Release

Published Thursday, April 09, 2009 3:07 PM

The April release of the Lightweight Test Automation Framework for ASP.NET has just been posted and you can download it here. For this release, the team has worked hard to include the following bug fixes and new features. Please continue to give us your feedback as many of the fixes and features are based what we have heard from the community.

Improvements to the user interface

  • A new look has been given to the test name when it passes or fails.  There is both color and visual queues that indicate weather a test has passed or failed.  Failed test names also appear slightly larger to help them stand out.
  • There is now a “Run Failed Tests” button. This button will open a new browser window that will select and run only the failed tests, for easy verification of fixes.
NewUI2

The ability to automate popup windows

In previous versions of the framework there was no way to verify the contents of a popup window.  With this release we have far better support for opening and verifying the contents of popup windows.

HtmlPage page = new HtmlPage("MyPage.aspx");
page.Elements.Find("OpenPopup").Click();
// get popup window
HtmlPage popup = page.GetPopupWindow(1);
// verify title of popup
Assert.AreEqual("This is the Popup Page", popup.Elements.Find("h1", 0).GetInnerText());

The GetPopupWindow method returns a HtmlPage object that is representative of the window at that index.  This is pulled from the collection that is maintained by the framework with index zero being the main, or starting, window. In this example index zero is MyPage.aspx, while index one is the popup window. 

The ability to find elements by partial attribute values

In previous versions of the framework when finding elements on a page you could only use the ID attribute to match against.  So if you wanted to match all the elements that had a CSS class applied to them, as is common in jQuery, you had to supply that whole value for the class attribute.  So, in previous versions of the framework if you wanted to find elements that had a CSS class applied to them you had to specify the whole value for the class attribute.  Meaning that if the element has more than only class and you search based on only one class that element would not be returned.  Now you have the ability to match based on any part of the value for the attribute. Below is an example of how to find elements that have the CSS Class “blue” applied to them.

HtmlElementFindParams find = new HtmlElementFindParams();
find.Attributes.Add("class", "blue", MatchMethod.Contains);
ReadOnlyCollection<HtmlElement> elements = page.Elements.FindAll(find);

Assembly name change

  • The assembly name has been changed from “Microsoft.Web.Testing.Light.dll” to “Microsoft.Web.Testing.Lightweight.dll” The namespaces have not changed.

Comments

# Lightweight Test Automation Framework April Release - Asp.Net QA Team - DotNetBurner said on Thursday, April 09, 2009 6:43 PM

DotNetBurner.com - news and articles about .net DotNetBurner

# geff zhang said on Saturday, April 11, 2009 12:43 AM

LightweightTestAutomationFramework是ASP.NETQA团队开发的自动化集成测试框架,并且应用在ASP.NETQA团队的自动化测试产品中,目前最新版本是Apr...

# Jignesh said on Saturday, April 18, 2009 3:02 PM

Hi,

I am evaluating this framework with my application and so far I am not able to use it for the reason mentioned below:

My application has UI framework consisting of frames. Also, lots of UI related common info like height, width, top level navigation links etc is part of top level frame. And this info is being reffered in child frames/pages as "top.variable" or "top.function" etc.

If I use this LTA framework, my top level frame is replaced by a frame from this LTAF frame. Clearly, the info that my app is looking for is not a part of LTA Framework and hence it ends up with lots of script errors.

Changing my app would not be feasible because of the large scope of the changes, probably entire app.

Does anyone has any idea/comment on resolving this issue with minimal changes in LTA Framework itself?

# farmas said on Sunday, April 19, 2009 11:22 PM

@Jignesh: Hi, I started a thread in our forum regarding automation with with frames in LTAF. I replied to your question there, you can view it here: forums.asp.net/.../1412750.aspx

- Federico

# #.think.in said on Monday, April 20, 2009 7:43 AM

#.think.in infoDose #26 (14th Apr - 17th Apr)

# Jerry said on Thursday, May 21, 2009 6:55 AM

I want to get html in a tag <p>. How to?

Please help me!

# farmas said on Thursday, May 21, 2009 10:09 PM

Jerry, I have started a thread in our forum to discuss about this issue here: forums.asp.net/.../1426198.aspx

- Federico

# #.think.in said on Wednesday, May 27, 2009 7:10 AM

#.think.in infoDose #26 (14th Apr - 17th Apr)

Leave a Comment

(required) 
(required) 
(optional)
(required)