screenshots icon indicating copy to clipboard operation
screenshots copied to clipboard

Passing language specific parameters to the test driver file

Open amitkot opened this issue 5 years ago • 1 comments

I want to use screenshots for preparing App Store and Play Store screenshots of my app. My app supports multiple languages and I use different "demo" accounts for each language's screenshots. I have a test file that currently includes the test user/password for the screenshots.

What I currently do is duplicate the screenshots.yaml, the app.dart and app_test.dart files for each language.

It would be great if I could provide the user/password data as parameters to the test. As environment variables, perhaps. I such an implementation, each "language" option in the screenshots.yaml file could support additional environment variables that the test could read while running.

BTW, I haven't tried reading environment variables from the test dart files, so I'm not sure this implementation suggestion would work.

amitkot avatar Feb 02 '20 10:02 amitkot

Not sure if I'm following. A single app can have multiple languages. Screenshots will enable each language and take screenshots. No need for different accounts for each language.

mmcc007 avatar Mar 23 '20 06:03 mmcc007