Forum Discussion
Testing an updated web part, on a live SharePoint site, without affecting the existing version
- Nov 28, 2017
The Site collection app catalog should help when it becomes available, but until then you can deploy a Test version of the App to the app catalog and your cdn and deploy the test version to your test site.
in package-solution.json change the solution name to test-yourappname and the id to a new guid and the zipped package name to solution/test-yourappname. This will make the app unique.
in write-manifests.json change the cdnbasepath to a new folder where you will deploy you deploy your test code so that it does not interfere with the production code.
for each of your webparts in the webpart.manifest.json change the Id to a new guid. You cant have two webparts in a tenat with the same id.
then gulp clean; gulp bundle --ship, gulp package-solution --ship. This will create a new sppkg file for your test app , with a different name (test-yourappname) that references the different cdn location you specified in write-manifests.json.
note: for each of these files, I keep a .production and a .test version in my project so I can just copy the contents from either file when I am ready to deploy. It would be awesome if we could have gulp do that for us!
then upload the test sppkg to your app catalog (solution/test-yourappname.sppkj) and deploy the files in temp deploy to the folder you specified in write-manifests.json to your cdn. You can then deploy your test app to your test site without interfering with production. You can even have the two versions running side-by-side in the same site collection,
Its a bit of work, but it has been working consistently for me for months now.
Why don't you use a tool to create a test tenant and copy the items to it so you can do a test before releasing it on a production tenant.
- Alan TraffordNov 27, 2017Brass Contributor
Hi Deleted
I don't have a test tenant (I did have an Office 365 Developer account, but it's expired), but I do have a test site collection. However, web parts are installed at the tenant level. I know site collection app catalogs are on the way, but I don't think they are released yet.
- AnonymousNov 27, 2017
Hi Alan,
but you could create a trail to test it in the tenant with real data copied.
just create a trial account here you can also test your scenario for the new app.
- Alan TraffordNov 27, 2017Brass Contributor
Hi Paul
I could create a trial, but I'd also like to know how to do it by changing values against the web part.