Tuesday, May 31, 2016

Install Maven on Linux or Unix system by command line

Steps to install Maven on Linux or Unix machine:

1. Open Maven binaries from link
2. Pick the latest one for 
Eg. http://mirror.olnevhost.net/pub/apache/maven/binaries/apache-maven-3.2.2-bin.tar.gz
3. Navigate to /usr/local/maven Type command 
  $ wget http://mirror.olnevhost.net/pub/apache/maven/binaries/apache-maven-3.2.2-bin.tar.gz
4. Type command to extract the tar file. 
   $ tar xvf apache-maven-3.2.2-bin.tar.gz
5. Add environment variable-
   $ export M2_HOME=/usr/local/maven/apache-maven-3.2.2
$ export M2=$M2_HOME/bin
$ export PATH=$M2:$PATH
6. Check if Maven is install by below command -
$ mvn -version

[EDIT-Install straight forward with single command]
sudo apt install maven


Thursday, March 17, 2016

Demo Practice website for Selenium Automation Testing

Here are some demo sites for learning Selenium Automation Testing using Selenium IDE or Selenium RC (Selenium Remote control) or Selenium Webdriver.

E-commerce website - http://store.demoqa.com/
Basic fields demo portal - http://demoqa.com/
Automation demo web page practice - http://toolsqa.com/automation-practice-form/
Switch window - http://toolsqa.com/automation-practice-switch-windows/
Handling browsers alerts - http://toolsqa.com/handling-alerts-using-selenium-webdriver/
iFrame practice - http://toolsqa.com/iframe-practice-page/

Wednesday, March 2, 2016

Useful Unix or Linux command on single post

Get process id of all the running program on Unix or Linux system.
ps ax | grep java

OUTPUT:
22491 pts/0    S+     0:00 grep --color=auto java
27209 ?        S      0:00 sudo nohup java
27210 ?        Sl     2:58 java

Kill process using process id (PDID) in unix or linux:
sudo kill -9 27210

Below command will fetch count of files in a particular director in Unix or Linux system?


ls -l | grep -v ^l | wc -l

Read CSV from S3

 import csv def count_records(csv_file):     record_count = 0     first_line = None     last_line = None     # Open the CSV file and read it...