Using different Test data file for a test case depending on environment

Hello,

I’d like to have the option to run my tests with different test data depending on the environment I’m in, as they are slightly different.

My current setup: Test suite + Test Cases each with 1 test data (excel file). I run checks (based off global variables) to determine the environment and adjust the domain URL accordingly.

If I add a second data file to a test case, is there a way I can script it to pick a specific test data file during execution time?

Thanks!

use different test suites based on environment.
yes there is an overhead in synchronizing test cases, but this is only way (i was able to find) to set different data sources