In this video, we will do 2 process automation examples with Open Source technologies:
- High-Code Process Automation with Java
- Low-Code Process Automation with Jmeter (WDS)
Before starting, You can check these 4 webinar docs at https://testingbootcamp.com
- DevOps and Test Automation with Jenkins
- Performance Testing with JMeter
- S2E1 — Selenium 4.0 with Java step by step
- S2E2 — Mobile Test Automation with Appium 2.0 and Java
We will get the cryptocurrency prices from markets and will write to MySQL DB until the whole operation has failed. If the operation has failed Java code or Jmeter will send Email and Discord notifications after that process will be stopped until we check it manually to be sure that it’s working again. The following picture describes the whole process automation
Example Apps to collect the needed data are here:
- Get data from Paribu Ticker API with Rest Assured -> https://www.paribu.com/ticker
- Get Data from BTCTurk Ticker API with Rest Assured -> https://api.btcturk.com/api/v2/ticker
- Get Data from Binance Ticker API with Rest Assured -> https://api.binance.com/api/v3/ticker/24hr
- Get Data from CoinmarketCap Android App with Appium 2.0 -> https://apk.coinmarketcap.com/downloads/coinMarketCap-latest.apk
- Get Data from CoinmarketCap Website with Selenium 4.0 -> https://coinmarketcap.com/currencies/bitcoin/
MySQL Database Creation
Before starting the project let’s create a MySQL DB scheme with the needed initial Data with this file “coin_test_DB_Creation_Scripts.sql” on this repository.
1. High-Code Process Automation with Java
Requirements:
- IntelliJ IDEA CE Installation -> https://www.jetbrains.com/idea/download
- Java JDK 11 -> https://www.oracle.com/tr/java/technologies/javase/jdk11-archive-downloads.html
- Appium Server v2.0.0-beta.25 or later installation -> https://appium.io/
- Appium Inspector v2022.1.2 or later installation -> https://github.com/appium/appium-inspector
- Android Emulator (via Android Studio) -> https://developer.android.com/studio
- MySQL Database with an admin user. -> https://dev.mysql.com/downloads/mysql/
- Jenkins 2.0+ Installation (Plugins: BlueOcean, Discord, Extended Email) -> https://www.jenkins.io/
Getting Started with JAVA Project
- Open Java Maven project with IntelliJ IDEA
- Set your DatabaseManager.java file with your MySQL Database connection credentials
- Download the latest CoinMarketCap APK from its website and set “appium:app” capability’s value on “PlatformManager.java” file
- Start Appium server from your Terminal or Command Prompt “Appium &”
- To check the Automation on your computer, right click on the TestNG suite XML files and run or execute the following commands.
- cd ${JAVA_PROJECT_DIRECTORY} mvn clean test -Dsurefire.suiteXmlFiles=src/test/java/suites/APIGroup.xml mvn clean test -Dsurefire.suiteXmlFiles=src/test/java/suites/WebGroup.xml mvn clean test -Dsurefire.suiteXmlFiles=src/test/java/suites/MobileGroup.xml
- Manually trigger your Jenkins Pipeline Job to check the whole process automation. Sample Groovy script is the “jenkins-pipeline-script.groovy” file.
2. Low-Code Process Automation with Jmeter
Requirements:
- Java JRE or JDK installation -> https://www.oracle.com/tr/java/technologies/javase/jdk11-archive-downloads.html
- Apache Jmeter Binary -> https://jmeter.apache.org/download_jmeter.cgi
- Jmeter Plugins Manager (JAR file) -> https://jmeter-plugins.org/wiki/PluginsManager/
- MySQL Java Connector (JAR file) -> https://dev.mysql.com/downloads/connector/j/
- ChromeDriver file -> https://chromedriver.chromium.org/
- MySQL Community Server -> https://dev.mysql.com/downloads/mysql/
- MySQL Workbench installation -> https://dev.mysql.com/downloads/workbench/
Getting Started with JMeter Project
- Download Jmeter Plugins Manager and MySQL Connector JAR files and then copy to the following locations. ${JMETER_INSTALLATION_PATH}/lib/ext/jmeter-plugins-manager-${VERSION}.jar ${JMETER_INSTALLATION_PATH}/lib/mysql-connector-java-${VERSION}.jar
- Start Jmeter and Click File->Open than select “jmeter_test-crypto.jmx” file ${JMETER_INSTALLATION_PATH}/bin/Jmeter or Jmeter.bat(for Windows)
- SET your SMTP Server Settings or Discord API Hook URL. For Gmail SMTP Server usage, please allow less secure apps to use your Gmail address on this link https://myaccount.google.com/lesssecureapps
- SET your MySQL Server Connection Information on “JDBC.MySQL” section.
- SET your chromeDriver file location on the “Chrome Driver Config” section.
3. What is next?
Once you have collected enough data, you can start analyzing it and even create your own application. To be sure if you need AI support, you must first determine what you expect from AI and make sure it needs to be analyzed in a human-like way.
GITHUB REPOSITORY: