Expand my Community achievements bar.

Join us January 15th for an AMA with Champion Achaia Walton, who will be talking about her article on Event-Based Reporting and Measuring Content Groups!
SOLVED

Test the changes in production with dev script without any extension

Avatar

Level 4

How to test the changes in production with dev script without any extension?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor and Adobe Champion

I don't think that's possible... The Prod and Dev scripts are completely different JS files, you need something that can inject itself during the loading of the site and immediately replace the prod script with the dev script if you plan on testing on your Prod Environment. Unless you have a program running on your computer that can intercept and re-write requests?

 

While technically speaking, you can enable Chrome Overwrites, you have to actually manually update the HTML code of every URL to test this way, it's not reliable... you will constantly be bouncing between prod and dev versions of the script as you navigate the site... this also means saving the actual rendered HTML of each page on your computer (so none of the content will even technically load from the queries to retrieve content, it will just show you the version of the page at the moment you edited it). So it's highly recommended not to do this.

 

I use an extension called Resource Override which allows me to redirect any HTTP request to another url... 

 

I can target specific tab urls, or let it run on any site using "*"

Match URL is the URL of the Prod Launch file

Replace URL is the URL of my Dev Launch file

 

I can turn the tab rules on and off all together, or individual rules one at a time. Once I add my rules, I just double check that the Prod file is in fact redirected to my dev file using the Network tab in my browser. Once confirmed, I know that all the code running on my local machine is using my Dev scripts.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor and Adobe Champion

I don't think that's possible... The Prod and Dev scripts are completely different JS files, you need something that can inject itself during the loading of the site and immediately replace the prod script with the dev script if you plan on testing on your Prod Environment. Unless you have a program running on your computer that can intercept and re-write requests?

 

While technically speaking, you can enable Chrome Overwrites, you have to actually manually update the HTML code of every URL to test this way, it's not reliable... you will constantly be bouncing between prod and dev versions of the script as you navigate the site... this also means saving the actual rendered HTML of each page on your computer (so none of the content will even technically load from the queries to retrieve content, it will just show you the version of the page at the moment you edited it). So it's highly recommended not to do this.

 

I use an extension called Resource Override which allows me to redirect any HTTP request to another url... 

 

I can target specific tab urls, or let it run on any site using "*"

Match URL is the URL of the Prod Launch file

Replace URL is the URL of my Dev Launch file

 

I can turn the tab rules on and off all together, or individual rules one at a time. Once I add my rules, I just double check that the Prod file is in fact redirected to my dev file using the Network tab in my browser. Once confirmed, I know that all the code running on my local machine is using my Dev scripts.