Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual...

18
Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation [email protected]

Transcript of Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual...

Page 1: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

Testing Azure Applications with Visual

Studio 2010Abhishek Agrawal

Senior Program ManagerVisual Studio

Microsoft [email protected]

Page 2: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.
Page 3: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

Rich support for Premier Platform

Page 4: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

Windows Azure

Page 5: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

Testing is part of the product Lifecycle

Unit-tests

Unit/integrationTests on Daily Build

Exploratory Manual Testing

Automated UITests

Customer Feedback

Page 6: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

I am testing an Azure app, how do I…

• write unit-tests?• write integration tests? • write functional tests?• run tests on local machine?• run tests on build machine?• run tests on Lab Machine?• do manual testing of my application• When do I test against a deployed instance?

Page 7: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

Approach

• Leverage MSTest framework with Mocking frameworks (e.g Typemock Isolator, Rhino Mocks, Moq) to write granular, isolated, independent tests

• Run them from VS and as part of Team Build independent of Azure or Dev Fabric interaction

For unit-testing

Page 8: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

DEMO

Page 9: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

Sample Application• Bidding Web site hosted on Azure. Users can log-in submit new

items for auction and bid on other items.

Page 10: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

Approach• Leverage MSTest framework and Dev Fabric• Invoke instance of your application or service in the

Dev fabric• Write automated tests that will go against the service

end point and validate functionality• Ctrl-F5 the application before running tests from VS

For Integration testing from Visual Studio

• Configure Build Agent as a interactive service• Invoke azure cmd line utility csrun.exe to start the Dev

fabric and Dev Storage and invoke an instance of your application

• Run integration tests as part of Build

For running Integration tests from Team Build

Page 11: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

DEMO

Page 12: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

Approach

• Provide deployable package and scripts to tester to launch the application

• Use MTM to browse and test web front end.

For Manual/Exploratory testing, using Microsoft Test Manager

• Launch application using csrun.exe• Record actions against Web front end and add asserts• To playback tests

• On local machine, launch the app using ctrl-F5 and run the test

For Functional Testing of UI

Page 13: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

DEMO

Page 14: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

Using Dev Fabric vs. Hosted Instance

• Dev Fabric works well in early phase of your project

• Hosted Azure Instance = $ hence needs to be budgeted as part of Testing resource costs

• Dev Fabric has limitations:– Local SQL is different from SQL Azure– Cannot perform Load and performance testing against

Dev Fabric

Page 15: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

Using Dev Fabric vs. Hosted Instance

• Recommendation– Have a $ Budget for hosted instance for testing

– Deploy weekly to Azure once core application is stable

– Have planned bug bash sessions, performance runs against deployed instance

– Use Hosted instance for pre-production validation and getting stakeholder feedback

Page 16: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

Summary

• Use Visual Studio 2010 and Azure SDK to develop and test rich applications

• Leverage existing skill and knowledge from testing on-premise application for testing Azure applications

Page 17: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

ResourcesSoftware Application

Developers

http://msdn.microsoft.com/

Infrastructure Professionals

http://technet.microsoft.com/

msdnindia technetindia @msdnindia @technetindia

Page 18: Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation Abhiag@microsoft.com.

© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and

Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.