Skip to content
| Marketplace
Sign in
Visual Studio>Templates>Sharepoint Js test project template
Sharepoint Js test project template

Sharepoint Js test project template

Boris Zhurkin

|
625 installs
| (0) | Free
Project provide javascript unit test for Sharepoint Solutions.
Download

This extension provides the project template for JavaScript testing in SharePoint environment. JavaScript files are deployedautomatically on SharePoint Server. Then special page runs  on Selenium web driver, jasmine tests run, and results are returned to Visual Studio.

GETTING STARTED

  1. Add project to solution.
  2. Right-click on solution explorer and Enable Nuget Package Restore.
  3. Go to “default/Constants.cs”. Replace your test URL web in “WebAbsoluteUrl” variable.
  4. Put your test code in “impl/testcode” folder.
  5. Write some tests and add it to “impl/tests” folder.
  6. Go to JsTests.cs and copy or replace  SampleServiceTest method
    1. “additionalScripts” variable is a string array of script names from “impl/testcode”, which will tested. Script’s order corresponds to order in which they will be loaded later.
    2. Write your test file name instead SampleTest.js
  7. Run test.

You can reduce time test’s work, if you change “updateAllScrits” variable to false after first run. But if you change Javascript test file name, you will need set “updateAllScrits” variable value to true, because test page name depend on test file name.

LINKS

This is a little guide how to use: https://boreckii.wordpress.com/2015/01/21/sharepoint-and-javascript-testing/
More about SpMeta2: http://subpointsolutions.com/spmeta2/getting-started

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft