# One test case that works on 2 identical websites

**URL:** <https://forum.katalon.com/t/one-test-case-that-works-on-2-identical-websites/32275>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [August 28, 2019, 2:06pm UTC](https://forum.katalon.com/t/one-test-case-that-works-on-2-identical-websites/32275 "2019-08-28T14:06:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Funkey](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/funkey/32/8068_2.png) [@Funkey](https://forum.katalon.com/u/Funkey)\
**Post date:** [August 28, 2019, 2:06pm UTC](https://forum.katalon.com/t/one-test-case-that-works-on-2-identical-websites/32275/1 "2019-08-28T14:06:40Z")

</div>

Quite new here so if I am posting in the wrong place please tell me so I can correct my mistake!

Anyway, I have 2 identical websites which both need automatic testing. Both websites have a different website address. I have one test case which I put in a test suite that I am running through a console. I am constantly switching the website address, which gets quite tedious after awhile (since I have to constantly generate a new script). So I am feeling I am doing something very wrong here.

If you have any advice on how to do this or any other tips that might help, that would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Nilau](https://avatars.discourse-cdn.com/v4/letter/n/bb73d2/32.png) [@Nilau](https://forum.katalon.com/u/Nilau)\
**Post date:** [August 28, 2019, 2:17pm UTC](https://forum.katalon.com/t/one-test-case-that-works-on-2-identical-websites/32275/2 "2019-08-28T14:17:20Z")

</div>

Not so sure about your question but i’ll assume a similar setup as mine.  
You have your website on 2 environment, one for development and one for release (public) for example. They are identical but only the url change.

I would say, add a global variable to the profile you are using, for example a variable named “url”. Use variable named “url” as the reference in your test case when you open the browser or navigate to the url.

Then, when you start your tests suite from the Test Suite in command line, you can define the variable you have set up since it’s Global. Use the parameter -g\_url=“your url” to execute the test on another website.

Another work around is to have different execution profile, one for each website.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [August 28, 2019, 2:34pm UTC](https://forum.katalon.com/t/one-test-case-that-works-on-2-identical-websites/32275/3 "2019-08-28T14:34:22Z")

</div>

If you want to just compare 2 identical websites to find any visual difference, the following is my proposal.

> [@Visual Testing in Katalon Studio](http://forum.katalon.com/t/visual-testing-in-katalon-studio/13361):
>
> I have created a project at [GitHub - kazurayam/VisualTestingInKatalonStudio: This is a Katalon Studio project which performs 2 ways of screenshot-comparison testing for WebUI in full automation. Twins mode compares 2 host names at a time. Chronos mode compares the current view of a AUT to the previous one. You can make your own Katalon Studio project capable of the same screenshot-comparison. approach. Instruction provided.](https://github.com/kazurayam/VisualTestingInKatalonStudio) Please refer to this Github repository for running codes and descript…

---

<div class="post-metadata">

**Author:** ![Funkey](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/funkey/32/8068_2.png) [@Funkey](https://forum.katalon.com/u/Funkey)\
**Post date:** [August 28, 2019, 2:45pm UTC](https://forum.katalon.com/t/one-test-case-that-works-on-2-identical-websites/32275/4 "2019-08-28T14:45:25Z")

</div>

Thank you so much! This was exactly what I needed. I really appreciate it.
