Coder Social home page Coder Social logo

spo.webtest's Introduction

SharePoint Online WebTest Starter Kit

Background

When I start to use Visual Studio Web Performance Test to do automate test to my SharePoint tenant, I face a problem. The VsWebTest capture Guids and unable to detect dynamic content properly. The main issue especially happens during Authentication process. This problem makes my test project is not reusable for other tenant, and I have to records the steps and recreate the steps from begining everytime I need to create a test.

Solution

The solution is to decode Authentication process and store in common SpoLogin.webtest. Then I can include the SpoLogin.webtest in the begining of every future test for SharePoint. The SpoLogin.webtest will handle authentication process, and provide authentication cookie for the rest of the test.

Known Issue

  1. Login using Microsoft Live is now supported through Coded Web Performance Test

Usage

  1. Declarative SpoLogin.WebTest (Only support AAD Login)
    Create new webtest using Web Performane test recording, after finishing the recording, you can replace the authentication part using SpoLogin.WebTest. Right click on the new web test, and select "Add Call to a Web Test".

  2. Coded Web Test (Support AAD Login and Federated Login such as Windows Live)
    Create a new webtest class that inherits from Microsoft.VisualStudio.TestTools.WebTesting.WebTest. Decorate the new class with [IncludeCodedWebTest("Spo.WebTest.SpoLogin", @"SpoLogin.cs")] Implement abstract method GetRequestEnumerator() and call SpoLogin from the method.

Example

  1. ExampleWebTest - shows how to use SpoLogin in coded web test.

Context Parameters

  1. Tenant - SharePoint online tenant name for example "libinuko" for libinuko.sharepoint.com
  2. UserName - Full email address of the username. For example [email protected]
  3. UserPassword - You know this.

Issues

  1. Log the issue or contact me directly.

spo.webtest's People

Contributors

cakriwut avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.