Archive for the ‘Custom Software Development’ Category

Innovation in Visual Studio 2010 for Automated Testing

Monday, June 21st, 2010

A big innovation in Visual Studio 10 is the opportunity to wait for a UITestControl object to be opened or enabled before the rest of the test continues with executing. It can be very important if we test a project on a few different environments. In the previous versions, we used loops for checking the availability of the object, or we just made the process sleep for a while. Now, we can do the same with the following methods:

UITestControl::WaitForControlExist Method

public: bool WaitForControlExist()

 

Return Value is Type: System::Boolean. It is true if this control exists before the time-out, otherwise, it is false.

 

UITestControl::WaitForControlExist Method (Int32)

public: bool WaitForControlExist(int millisecondsTimeout)

Parameter is millisecondsTimeout, Type: System::Int32 and represents the number of milliseconds before time-out.

Return Value is Type: System::Boolean. It is true if this control exists before the time-out, otherwise, it is false.

 

UITestControl::WaitForControlEnabled Method

public bool WaitForControlEnabled()

Return value is Type: System.Boolean. It is true if this control is enabled before the time-out, otherwise, it is false.

 

public bool WaitForControlEnabled(int millisecondsTimeout)

 

Parameter is millisecondsTimeout, Type: System::Int32 and represents the number of milliseconds before time-out.

 

Return value is Type: System.Int32. It is true if this control is enabled before the time-out, otherwise, it is false.

 

Suppressing Messages in FxCop

Thursday, May 20th, 2010

FxCop is a free static code analysis tool from Microsoft that checks .NET managed code assemblies for conformance to Microsoft’s .NET Framework Design Guidelines. It will ensure that the specified rules are used in the source code.

FxCop analyzes the compiled object code, not the original source code, and searches for more than 200 different possible coding standards violations.

Sometimes it is needed to automatically remove FxCop related “SuppressMessage” attributes when they are no longer needed.

If you’re using Visual Studio Team System, then FxCop is completely integrated and when you exclude messages it automatically applies the new SuppressMessage attributes to the appropriate location in code.

If you’re using Visual Studio Professional edition, then you have to use the external FxCop.

It turns out you have to enable your project to recognize the SuppressMessage attribute by FIRST adding a condition compilation symbol.

To include this symbol do the following:

For C# projects:
- In Solution Explorer, right-click your project and choose Properties
- In the Properties window, choose the Build tab
- In the Conditional compilation symbols text box enter CODE_ANALYSIS

The next step you have to do is to right-click the error message in FxCop UI and select “Copy As” – “SuppressMessage” (or “Module-level SupressMessage”). Then you can simply paste the attribute into your code at the appropriate location.

How to Upgrade a VS Beta 2 Coded UI Test Project to VS 2010 RC

Friday, April 30th, 2010

The new Visual Studio 2010 RC brings significant changes in the domain of the coded UI tests. You can realize that if you try to build a test project in this new environment as you probably get more than 1000 errors. There are a few errors that seem to happen a few hundred times each:

-’Microsoft.VisualStudio.TestTools.UITesting.UITestControlProperties’ is inaccessible due to its protection level.
- The name ‘HtmlProperties’ does not exist in the current context
- The name ‘UITestControlProperties’ does not exist in the current context
- The name ‘WinProperties’ does not exist in the current context

However, you can upgrade your project with an automatic upgrade script to move your automation:

  1. Launch the Visual Studio Command Prompt from Start Menu > All Programs> Microsoft Visual Studio 2010> Visual Studio Tools
  2. Run the script

    UITestUpgrade.exe < folder to upgrade>

    - The upgrade tool will fix all the changes listed below.
    - All the folders under the specified folder(s) is searched recursively and all projects under it upgraded.
    - If a project is under source control, the upgrade tool will do check out and make changes.
    - Tool will create backup folder with all contents of the specified folder

VSS Nested Projects Linked By Dexterity

Monday, April 19th, 2010

Working with Share and Branch options in VSS for Dexterity projects sometimes requires working with nested projects like on the picture below:

If we try to connect to the nested project through Dexterity, we will find ourselves in a situation that we cannot see the nested project. However, there is a way to load it, but there is no way to see it in the Projects window. Look at the following text.

Open the Dexterity project. Follow the path File -> Options -> Source Control. Click the  ellipsis near the Project Name. We are not able to see the nested projects.

Now, close the window Projects and enter the whole path Project/Project v.0.1.0 in the text field near the project name.

If we click the  ellipsis near the Project Name, the window Projects will open and we will be able to see the same list of projects as earlier. If we click the button Validate Connection, we will receive the following message:

But, this time, we do not follow this message and give up from loading data from this project on VSS. If we enter the proper name of a project as we have already done, the Dexterity will recognize it and load data from the nested project despite the message which warns us that we are on the wrong way.

Upgrade VS Beta 2 Coded UI Test Project to VS 2010 RC

Tuesday, April 6th, 2010

The new Visual Studio 2010 RC brings significant changes in the domain of the coded UI tests. You can realize that if you try to build a test project in this new environment as you probably get more than 1000 errors. A few errors seem to happen a few hundred times each:

  • Microsoft.VisualStudio.TestTools.UITesting.UITestControlProperties’ is inaccessible due to its protection level.
  • The name ‘HtmlProperties’ does not exist in the current context.
  • The name ‘UITestControlProperties’ does not exist in the current context.
  • The name ‘WinProperties’ does not exist in the current context.

However, you can upgrade your project with an automatic upgrade script to move your automation:

  1. Launch the Visual Studio Command Prompt from Start Menu > All Programs> Microsoft Visual Studio 2010> Visual Studio Tools
  2. Run the script

UITestUpgrade.exe < folder to upgrade>

The upgrade tool will fix all of the changes listed below:

  • All of the folders under the specified folder(s) is searched recursively and all projects under it upgraded.
  • If a project is under source control, the upgrade tool will perform a check out and make changes.
  • Tool will create a backup folder with all contents of the specified folder.

Visual Studio 2010 RC – What’s new in Coded UI Test

Friday, April 2nd, 2010

The Release Candidate (RC) version of Visual Studio 2010 has been released by Microsoft and is now available for download. From a tester’s point of view, Visual Studio 2010 Beta is a revolutionary step from Microsoft with a bunch of new stuff in Coded UI test for automation testers.

Visual Studio 2010 RC made some significant improvements of which I chose following:

Pause playback to wait for certain event

This capability was not available in VS 2010 Beta 2 and it was noticeably lacking. For example, it was impossible to wait for the form, message, progress bar to disappear etc.

This was accomplished with a modification of the UITestControl class. In the RC, you can use the appropriate UITestControl methods from the list.

1. WaitForControlReady() – This waits for the control to be ready to accept mouse/keyboard input.
2. WaitForControlEnabled() – This waits for the control to be enabled.
3. WaitForControlExist() – This waits for the control to exist on the UI.
4. WaitForControlNotExist() – This waits until the control ceases to exist on the UI.
5. WaitForControlPropertyEqual(string propertyName, object propertyValue) – This waits for the specified property of the control to have the given value.
6. WaitForControlPropertyNotEqual(string propertyName, object propertyValue) – This waits for the specified property of the control to not have the given value.
7. WaitForControlCondition(Predicate conditionEvaluator) – This waits until the specified predicate returns true.

 

(more…)

The Benefits of Offshore Development and Local Project Management: Diversified Engineers

Monday, March 22nd, 2010

Continuing our series, The Benefits of Offshore Development and Local Project Management, we would now like to discuss the benefit of access to a diversified team of highly skilled professionals.

When you utilize Merit Solutions Development Services, you have direct access to a highly-skilled team with proven technical, functional and domain expertise. Our 15+ software engineers work under 4 separate Team Leaders (Technical Team Lead, Development Team Lead, QA Team Lead, and SharePoint / CRM Team Lead). Each Belgrade-based Team Lead is managed in a very hands-on way by our US-based Director of Development, a top-notch programmer from Serbia who was instrumental in structuring our development division. In most cases, a project will blend consultants and engineers from the U.S. (analysis) with team members in Belgrade (design, coding, testing). So, our overall costs include a blend of both of these engineering locations. As mentioned before, each software engineer is English fluent, and capable of communicating directly with all of our clients.

This direct access to developers leverages our strong project management expertise, reducing the risks of miscommunication and ensuring the highest possible software development quality.

The Benefits of Offshore Development and Local Project Management: Scalable Resources

Friday, March 5th, 2010

Last week, we started this series to emphasize the benefits of offshore development combined with local project management. (View the first article for benefits related to our office locations.) We call it a Hybrid Development Model, which allows us to deliver the highest quality development services to our clients at a fraction of the cost by providing the cost benefits of off-shore development services, while affording them the convenience and peace of mind of working directly with a US-based firm.

This week, we have a new benefit: scalable resources.

The Merit Solutions Development Team is composed of English-speaking and University-educated software engineers, so there is no loss in translation that is typical of other offshore development services. Our engineers have multiple skills, which allows us to utilize certain resources only when they are needed. This not only enables us to consistently deliver high quality services for large customizations, but also to effectively perform the smaller projects that often come up in Microsoft Dynamics customers’ environments.  We can scale down because there is very low overhead associated with project management and communication burdens compared to typical outsourced development.

The Benefits of Offshore Development and Local Project Management

Friday, February 26th, 2010

Over the coming months, we will be writing a series of articles detailing the benefits of our Offshore Development combined with Local Project Management.

To start this series, here are 2 benefits specific to our office locations:

  1. Since our development lab is located in Eastern Europe, we actually consider it ‘near shore’. The 7-hour time difference gives us enough daily overlap to collaborate efficiently across teams. There are three hours naturally overlapping in the business day, and it is easy to stretch it to five or six hours. This gives us no ‘drop off’ in collaboration between team members at different locations. And with both teams utilizing the same processes and systems, we have been able to develop a proven methodology that works.
  2. With a software development lab in Eastern Europe, we are able to take advantage of a less penetrated market. It is a non-traditional region for outsourcing as compared to India or China, which enables us to consistently hire and retain the top 5% of talent. Our relationships with the US Commercial Service and local Embassies enable us to obtain visas when we need to get our developers to the US as projects sometimes demand. As contrasted to other offshore development organizations in India and China, this provides a productivity advantage, and can substantially reduce project risk.

Be sure to check back in the future for more benefits of Offshore Development and Local Project Management.

Visual Studio 2010 and .NET Framework 4 Release Candidate Available

Wednesday, February 10th, 2010

Visual Studio 2010 and .NET Framework 4 RC (Release Candidate) were made available to all MSDN subscribers on February 8.

The rest of the world will have a chance do get it on Wednesday, February 10th. This version also includes a go-live license.

For more information on the RC, visit Jason Zander’s Weblog.

Happy coding!