Hey y’all, what I get the useful stuffs from software community, I am giving back the community. I consider the community can improve by contributing each part of this world and only if juniors, students and people who need some knowledge can fix their problem fastly. You can not know everything on software even if you have high experience in your field.
Additionally, you don’t have to write all knowledges into your memory. Since there are thousands commands, hundreds tools and a lot of way to solve your issue. When you click to web browser you should find to information. Some of us needs help others. Because of this reason I’d like to share my informations and trials.
Why do we need mobile automation?
Appium is, one of the famous mobile automation tools, which includes IOS and Android applications. If the app is a little this means the app has no micro service technology, doesn’t use multi-layers, and does not need continuous features maybe this no need to automate mobile test cases.
However, if the application has even one of these it should be using an automation life cycle. Unfortunately, even huge apps have not established automation test teams properly. Some of them are still going on the traditional model. Generally, companies, which do not carry out test life-cycle, don’t prefer paying attention to testers. They tend to accuse them after the production bugs. If they take care of manual and automation tests enough, most probably they would be saved prod bugs and a lot of consumer complaints.
Then let’s count some of the advantages of mobile automation:
- Decrease regression time: Regression checks the basic functionality of the application and it has to be executed at least once every two weeks. With one click you can run your regression test and checking the reports that take fail. Normally, for regression testers spend amazing effort, but with automation scripts they need only a proper automation framework and report tool.
- Lower employee cost: This matter is not for maybe huge companies. Since they sustain their reputation they can hire range of tester who have different capacity, skill and experience. But start-ups and small companies have to adapt financial survivor. To reduce employee cost might be vital for those. Both huge and small companies, in terms of reputation or cost, need to automated test scenarios.
- Offers Faster Feedback: When the automation scripts ran, it needs easy reports tools or function. With test reports testers, developers and executives can have strong feedback thus this can help their decision to fix bugs and issues.
What about Appium? What can it provide us?
Appium is the most famous mobile automation tool. It is an open-source tool which means you don’t have to pay for a license. It is a cross-platform tool that can run Android or IOS devices and different operating systems such as Windows, and MacOS. It also supports languages like Java, Ruby, Python, etc.
Appium can execute automated test scripts whether an application code written the Flutter, Kotlin, or Swift.
Let’s start using Appium. What will we do first?
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
1.To install Node.js → Go to https://nodejs.org/en/download link.
Click and download it. And set up. You need node.js for a lot of easy terminal(cmd) command. This module gives you an installation package.
2.a.Open your Mac terminal — >To do this click both command + space and write there “terminal”
2.b.Open your CMD prompt on Windows → Windows key + R and write “cmd” and click enter.
Run this command:
npm install -g appium
If you want to install appium 2.0 beta version you can run this command:
npm install -g appium@next
Then you would install appium 2 beta version.
**Without “@next” in command, you would download appium 1st version.
Additionally, If you want to GUI for Appium you can go to this link →
3.Dowload Java 1.8 JDK or higher version. Go to → https://www.oracle.com/tr/java/technologies/javase/javase8-archive-downloads.html link.
4.Download Maven → https://maven.apache.org/download.cgi
5.Download Android Stuio →https://developer.android.com/studio
Open Android Studio and go to this settings:
Download these 👆 ones.
6.You need an IDE. You can choose Intelij IDEA.
If you are a student or you want to pay license money you can download the ultimate version. If you want to use the free version you need to download Community Edition.
7.Download Appium Inspector to inspect elements→ https://github.com/appium/appium-inspector/releases
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
All installations are done. Congratulations. Now you need to give Java and Android SDK paths to use them.
1.a.Mac → Open terminal and if you are using Bash Terminal you can command: vim ~/.bash_profile and export below👇.
- click ESC and write “:wq”
- To save these, run the command: source ~/.bash_profile
1.b.Mac zsh-shell->Open terminal and if you are using Zsh-shell run the command : nano ~/.zshrc
and export same paths:
- click ESC and write “:wq”
- To save these, run this command: source ~/.zshrc
2.Windows giving path: Open the Start menu and search for “ Environment Variables” then click NEW in System Variables
Variable Name 1: JAVA_HOME
Variable Name 2: MAVEN_HOME
Variable Name 3: ANDROID_HOME
To find Java, Android, and Maven files on your pc, please open your cmd or windows power shell and run the command:
where java
where mvn
Android sdk will be most probably there: C:\Users\YourUsername\AppData\Local\Android\Sdk
But if it is not there then open Android Studio>Settings>Android SDK
To check whether you give a true path or not, run the command(for Mac and Windows):
java -version
mvn -version
Well, you have completed all installations for Appium. Now you can start writing your test scripts. Good luck :)