0

I am trying to setup Test Automation process to be executed on multiple Under Test Environments acting on intermediate proxy. See below picture

enter image description here

Existing test automation process is based on data-driven testing and it contains urls provided by manual testers from production analysis (e.g. bugs, new features, etc...).

This test automation process can be executed on various testing environment (e.g. pre-production and production) depending various factors decided at run time.

I don't want to have one data-driven scenario for environment because I prefer to avoid multiple scenarios maintenance. Perhaps I am thinking to resolve with intermediate proxy. In my idea this proxy will be part of TA setup and switch traffic toward only one environment for run.

I am studying Squid as possible solution but I have not clear if:

  1. My idea can work

  2. Squid is the correct tool or maybe there is something that fits better

  3. It's preferable to have:

    • one proxy instance/environment
    • one proxy instance and TA setup changes dynamically destination environment.

Regards

  • What exactly is different between each environment under test? Is it just a different URL between the pre-production and production environments? What else makes each environment unique? – gomisha Aug 17 '18 at 20:55
  • The two environments contains two different feature set. The pre-production environment contains the build that will be placed in production (e.g. new feature, bug fixes, etc...) – Vincenzo Marrazzo Aug 17 '18 at 22:03
  • OK, but are the tests different depending on the environment? If not, what makes the tests unique for each environment? If there are new features in the pre-production environment, then wouldn't you want to test for those new features when you deploy it to production? If yes, then I don't see why you can't just have a simple configuration file that points to which environment to use for testing - either the pre-production or production environment. – gomisha Aug 17 '18 at 22:18
  • Test case are executed in same manner on both environments. For the new feature you are right because it's better to test directly in production. Related bug fixes, test scenario runs on pre-production to ensure bugs resolution so possibility to switch environment at run time is handy. Except scenario file with data-driven tests (provided by manual tester) there isn't a configuration file. Until now to ensure that test server executes tests on right environment we overwrite hosts file but I don't like this solution. For that reason I am evaluating an alternative with proxy. – Vincenzo Marrazzo Aug 17 '18 at 22:36
  • So why not just use a configuration file that points to the right environment to use for the tests? Much simpler than configuring proxy and you can easily update that configuration file to point to pre-production and then to production (assuming everything passed in pre-production). – gomisha Aug 22 '18 at 02:48
  • I must agree with you. I have tried with browsermob proxy and reached complexity isn't good. – Vincenzo Marrazzo Aug 23 '18 at 06:34

1 Answers1

0

Based on our discussion in the question comments, I would use a simple configuration file to store the URL for pre-production and production environments (instead of complicated things with a proxy). That way, you can easily point your tests to run against different environments and add any other environment specific configuration data.

gomisha
  • 2,587
  • 3
  • 25
  • 33