Test framework using appium

Variable management

  1. All variables must be place in the json/xml/yaml file
  2. Configuration manager must be written to load application variables and environment variables
  3. PII data and other sensitive data should not be checked into the git repo
  4. To fix sensitive data issue, you must create a config file (say config.json) containing variables with masked data
  5. You should also create other config file (say dev.config.json) This file will contain same variables as mentioned in config.json but it will also contain actual values. This file will not be checked into git. You should add this file in .gitignore so that git would not track it. That way you can avoid putting sensitive data in git. But in case you have already checked in the file containing sensitive data in git, you must remove it from git permanently by following instructions given at remove sensitive data from git
  6. When you are running the code locally, dev.config.json will be used to access variables
  7. When you are running the code in cloud, config.json will be used but values will be populated dynamically. e.g. In Azure devops, values will be populated from the azure variables using File transform task. In other CI servers, similar task will be used to update the config.json file with actual values
  8. We also want to hide certain sensitive variable values in the cloud log. To do this, you need to use secure variables concept. When you use secure variables, values will be printed like ****

Logger library

  1. We should not use Console.Writeline to output the logs
  2. Logging Library must be used
  3. Advantage of using logging library is that it brings consistency to the code and we can also filter log messages. We can also redirect logs to console, files, databases etc.
  4. Log4j and Log4net are the most widely used logging framework in Java and .net respectively

Test Report

  1. Maven Surefire plugin can generate the report for you
  2. You can also create the report manually
  3. Gradle can also generate report
  4. Cucumber also provides built in report

Web development and Automation testing

solutions delivered!!