udvid din test portefølje med coded ui test og cloud load test

39
#CampusDays Udvid din test portefølje med Coded UI test og Cloud Load test VS20011 Peter Lindberg - Consultant @ Alterate [email protected] @peterlindbergdk www.linkedin.com/in/peterlindbergdk www.alterate.dk

Upload: peter-lindberg

Post on 13-Jul-2015

348 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Udvid din test portefølje med coded ui test og cloud load test

#CampusDays

Udvid din test portefølje med Coded UI test og Cloud Load testVS20011

Peter Lindberg - Consultant @ Alterate

[email protected]

@peterlindbergdk

www.linkedin.com/in/peterlindbergdk

www.alterate.dk

Page 2: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Topics

Test automation

Microsoft Test Manager and manual tests

Coded UI Test

Load Test in the cloud with Visual Studio Online

Page 3: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Why test?

We all make mistakes!

But also:

• Are we meeting the requirements and expectations?

• Does the hardware support the application?

• Does it work as expected?

The sooner the defects are discovered – the cheaper they are to fix

Page 4: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Why automate tests?

Cost reduction!

• Manual test is expensive

• Let manual testers spend the time on value adding tests• New features

• Exploratory testing

• “Time to market” – higher release cadence

• Safety as developer

Page 5: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Automated

UI Test

Integration

Test

Unit Test

Exploratory

testing

Page 6: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Page 7: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Microsoft Test Manager and manual tests

Page 8: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Visual Studio Application Lifecycle Management

Page 9: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Microsoft Test Manager (MTM)

Separate application

Fully integrated with Team Foundation Server• Test artifacts are Work Items in TFS

• Links to Product Backlog Items, Bugs etc.

• Queries

• Reporting

• Ties directly in to the developer world

Page 10: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Microsoft Test Manager (MTM)

A fully-instrumented, configurable test runner captures detailed records of steps performed, behaviors observed, and the status of each test step. Pause testing to report a bug, even if it’s not directly related to the current test. High-fidelity defect reports go directly to the development team, including all the technical data needed to reproduce and resolve the error. Record tests for later playback to speed test sessions and enable automation. (visualstudio.com)

Page 11: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

What’s in it for the developers?

“captures detailed records of steps performed, behaviors observed, and the status of each test step”

“Pause testing to report a bug, even if it’s not directly related to the current test”

“High-fidelity defect reports go directly to the development team, including all the technical data needed to reproduce and resolve the error”

“Record tests for later playback to speed test sessions and enable automation”

Page 12: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

MTM Work Item Structure

Page 13: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Demo

Page 14: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Coded UI tests

Page 15: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

What are Coded UI Tests?

Automated tests interacting with the application through the user interface

For example used for testing

• Input validations

• Calculations

• “Shopping cart” functionality

• UI Elements

• Navigation

• ….

Page 16: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Supported configurations and platforms

Configurations

• Windows 7, Windows 8, Windows Server 2008 R2

• x86 and x64

• .NET 2.0, 3.0, 3.5, 4.0 and 4.5

Platforms

• Windows Phone Apps - (Only WinRT-XAML based Phone apps are supported)

• Windows Store Apps - (Only XAML-based Store apps are supported)

• Windows Forms + WPF

• IE 8, 9 and 10 - (9 and 10 only supported on the desktop)

• Chrome (recording not supported, only playback)

• Silverlight 5 (only supported with unsupported plugin)

• SharePoint, Dynamics web client – Fully supported

Page 17: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Page 18: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Test Automation

Test

Execution

Test

Script

Page 19: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Which tests to automate?

Is it often used functionality?

Does the UI change often?

Is the test code easy or difficult to maintain?

How often is the test expected to be run?

Page 20: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Coded UI test features

• Fully integrated into Visual Studio ALM

• Automatic code generation

• “Intelligent” Intent Aware Recording and Resilient Playback

• Execute on build server

• C# / VB.NET

Page 21: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Generate Coded UI Tests

• Automate steps from MTM action recordings

• Coded UI Test Builder

• Write them yourself in C# / VB.NET (advanced)

Page 22: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

The generated code

TestMethod

Page 23: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

UIMap

Page 24: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Coded UI Test Editor

Page 25: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Coded UI Test Editor

• Change names of test methods and UI elements

• Split steps in to new methods

• Move generated code to UIMap partial class for customizing

• Add pauses

• View and change properties

• Remove unwanted steps (duplicates etc.)

Page 26: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Demo

Page 27: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Load Test in the cloud with Visual Studio Online

Page 28: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Page 29: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

What do we want to achieve with load tests?

• Will the planned platform support the expected load and peak loads?

• Will simultaneous users cause problems

• Server load (max. CPU / memory consumption etc.)

• When does it break and how?

Planning is key! Dialogue with Product Owner / stakeholder etc.

What are targets and objectives?

What are the success & acceptance criteria?

Concrete and measurable!!

There’s a big difference between 1 and 5 seconds when a web site load…

Page 30: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

How?Generate

traffic to

application

Does it

perform as

expected?

Recreate the

performance

problems

Fix the

performance

problems

Page 31: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Page 32: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

So when should I start planning and execute load teste?

Start early!

=

Save time

Page 33: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

What can be included in load tests?

• Web test

• Unit tests

• Coded UI (possible – but not recommended)

Customize!

• Coded Web Performance test

Page 34: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Page 35: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

To the Cloud!

• Load tests can be executed from the cloud with Visual Studio Online

• MSDN subscribers have 15,000 virtual user minutes included pr. month

• No need to set up a big test rig / infrastructure “on premises”

• Setup in Visual Studio – execute in Azure

• Visual Studio connected to Visual Studio Online

Page 36: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Visual Studio

Load test

web service

Result

database

Controller

Test agent pool

Agent Agent Agent

Agent Agent Agent

Page 37: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Demo

Page 38: Udvid din test portefølje med coded ui test og cloud load test

#C

am

pusD

ays

Q&A#Ask me about everything!

Join me at the Microsoft Booth the next 30 minutes @Meet The Experts

Dont forget to: Evaluate this session!

Page 39: Udvid din test portefølje med coded ui test og cloud load test

EVENT SPONSORER

EXPO SPONSORER

TRACK SPONSORER