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
Add project to solution.
Right-click on solution explorer and Enable Nuget Package Restore.
Go to “default/Constants.cs”. Replace your test URL web in “WebAbsoluteUrl” variable.
Put your test code in “impl/testcode” folder.
Write some tests and add it to “impl/tests” folder.
Go to JsTests.cs and copy or replace SampleServiceTest method
“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.
Write your test file name instead SampleTest.js
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.