1. Create an account in Github
Go to https://github.com/ signup for an account. If you already have account than sign in.
2. Sign in and create a new repository
Create a new repository for your Robot project and remember the repository URI.
3. Git Perspective in Eclipse
Open Eclipse and navigate to Window -> Open Perspective -> Git.
4. Clone Repository in Eclipse
From Git Repository select Clone Repository, provide git repository URI and credential information in Source Repository window. Specify Branch and save it.
5. Share Project in Eclipse
In Eclipse, navigate to Project > Team > Share Project and share newly added repository.
6. Commit and Push from Eclipse
In Eclipse from Git Perspective select files for Staging, provide commit message and click on Commit and Push button.
Sunday, January 19, 2020
Monday, December 30, 2019
Install Java, Eclipse and RED
1. Check if Java already installed in the system
Write from command line
java -version
Output will show java installed version. If not installed than will show 'java' not recognized as internal or external command.
Check for java compiler version if Java is installed. Write from command line
javac -version
Output will show installed Java Compiler version.
2. If Java not installed than download and install it
Go to https://www.oracle.com/technetwork/java/javase/downloads/index.html download it. Click Install now after successfully download the exe file to install it.
3. Setting Environment Variable
Navigate to My computer -> Properties-> Advance System Settings-> Environment Variable-> search for Path in System variable and click on Edit, add java/jdk/bin location and Save it.
4. Check installed Java
Write from command line
java -version
Output will show java installed version.
Write from command line
javac -version
Output will show java compiler installed version.
5. Download Eclipse
Go to https://www.eclipse.org/downloads/ and download Eclipse IDE.
6. Install Eclipse
Click Install now after successfully download the exe file. Select Eclipse IDE for Java developers.
7. Install RED - Robot Framework
Go to Eclipse marketplace and search for RED - Robot Framework and add it to your Eclipse IDE.
Write from command line
java -version
Output will show java installed version. If not installed than will show 'java' not recognized as internal or external command.
Check for java compiler version if Java is installed. Write from command line
javac -version
Output will show installed Java Compiler version.
2. If Java not installed than download and install it
Go to https://www.oracle.com/technetwork/java/javase/downloads/index.html download it. Click Install now after successfully download the exe file to install it.
3. Setting Environment Variable
Navigate to My computer -> Properties-> Advance System Settings-> Environment Variable-> search for Path in System variable and click on Edit, add java/jdk/bin location and Save it.
4. Check installed Java
Write from command line
java -version
Output will show java installed version.
Write from command line
javac -version
Output will show java compiler installed version.
5. Download Eclipse
Go to https://www.eclipse.org/downloads/ and download Eclipse IDE.
6. Install Eclipse
Click Install now after successfully download the exe file. Select Eclipse IDE for Java developers.
7. Install RED - Robot Framework
Go to Eclipse marketplace and search for RED - Robot Framework and add it to your Eclipse IDE.
Install Robot Framework
1. Check prerequisite of Robot Framework
Write from command line
python --version
Output showed installed python version.
Write from command line
pip --version
Output showed installed pip version.
2. Install Robot Framework
Go to https://robotframework.org/ and read instructions.
Write from command line
pip install robotframework
It will download and install Robot Framework.
If required to uninstall already installed Robot Framework.
Write from command line
pip uninstall robotframework
If reinstalled right after uninstalling it than it will be installed from cache library.
To install a fresh copy write from command line
pip install --no-cache-dir robotframework
In order to upgrade installed Robot Framework, write from command line
pip install --upgrade robotframework
In order to install a specific version of Robot Framework, write from command line
pip install robotframework==2.9.2
3. Check installed Robot Framework
Write from command line
pip freeze
Output will show all python library installed list.
Write from command line
pip list
Output will show all python library installed list in a tabular form.
Write from command line
pip show robotframework
Output will show Robot Framework details.
Write from command line
pip check robotframework
Output will show Robot Framework requirement status.
Write from command line
python --version
Output showed installed python version.
Write from command line
pip --version
Output showed installed pip version.
2. Install Robot Framework
Go to https://robotframework.org/ and read instructions.
Write from command line
pip install robotframework
It will download and install Robot Framework.
If required to uninstall already installed Robot Framework.
Write from command line
pip uninstall robotframework
If reinstalled right after uninstalling it than it will be installed from cache library.
To install a fresh copy write from command line
pip install --no-cache-dir robotframework
In order to upgrade installed Robot Framework, write from command line
pip install --upgrade robotframework
In order to install a specific version of Robot Framework, write from command line
pip install robotframework==2.9.2
3. Check installed Robot Framework
Write from command line
pip freeze
Output will show all python library installed list.
Write from command line
pip list
Output will show all python library installed list in a tabular form.
Write from command line
pip show robotframework
Output will show Robot Framework details.
Write from command line
pip check robotframework
Output will show Robot Framework requirement status.
Install Python on Windows
1. Check if Python is already installed
Write from command line
python --version
Shown warning will be, 'python' is not recognized as internal or external command
2. Download Python
From browser got to https://www.python.org/downloads/ and download it.
3. Install Python
Click Install now after successfully download the exe file. When installing it make sure to select Add Python to PATH checkbox.
4. Validate if Python is installed properly
Exit from current command window and open a new one. Write from command line,
python --version
Output should show python installed version.
If python version not shown than check environment variables in PC.
Navigate to My computer -> Properties-> Advance System Settings-> Environment Variable-> search for Path in System variable and click on Edit, add both python and python/script location and Save it.
5. Validate if pip is installed properly
Write from command line
pip --version
Output should show pip installed version (it is automatically installed with python).
If pip version not shown than go to https://pip.pypa.io/en/stable/installing/ and check instructions given there. From command line
python get-pip.py
6. Test installed python
Write from command line write
python
Than enter
2+2
Output should show summation result. To get out python window press Ctrl + z.
7. If required to Uninstall, Repair or Modify installed python
Navigate to previously downloaded python exe file and run it. It should provide three options to Modify, Repair and Uninstall.
Write from command line
python --version
Shown warning will be, 'python' is not recognized as internal or external command
2. Download Python
From browser got to https://www.python.org/downloads/ and download it.
3. Install Python
Click Install now after successfully download the exe file. When installing it make sure to select Add Python to PATH checkbox.
4. Validate if Python is installed properly
Exit from current command window and open a new one. Write from command line,
python --version
Output should show python installed version.
If python version not shown than check environment variables in PC.
Navigate to My computer -> Properties-> Advance System Settings-> Environment Variable-> search for Path in System variable and click on Edit, add both python and python/script location and Save it.
5. Validate if pip is installed properly
Write from command line
pip --version
Output should show pip installed version (it is automatically installed with python).
If pip version not shown than go to https://pip.pypa.io/en/stable/installing/ and check instructions given there. From command line
python get-pip.py
6. Test installed python
Write from command line write
python
Than enter
2+2
Output should show summation result. To get out python window press Ctrl + z.
7. If required to Uninstall, Repair or Modify installed python
Navigate to previously downloaded python exe file and run it. It should provide three options to Modify, Repair and Uninstall.
Tuesday, December 10, 2019
Robot Framework skeleton
- Variable
- scalar
- array type
- array with item name
- Keywords (method or function like)
- Settings
- Setup (test suite and test case)
- Teardown (test suite and test case)
- Tag
- Default Tag
- Set Tag
- Remove Tag
Monday, June 8, 2015
Read and Write Excel file by using Apache POI in Java
Perform following steps first for correct configuration:
Reading a file using Apache POI is very simple and involve following steps:
Writing a file using Apache POI is very simple and involve following steps:
- Download Apache POI from here
- Add Apache POI .jar files in your Java project as External JARs from Build path
- For .xls type Excel file use HSSF and for .xlsx type Excel file use XSSF
Read Excel File:
Reading a file using Apache POI is very simple and involve following steps:
- Create a file with specific location to find it
- Create an Input stream with that file
- Create POI Work book(HSSF/ XSSF) with that Input stream
- Create POI Work sheet(HSSF/ XSSF) with that Work book
- Get number of rows in the file
- Get number of columns in the file
- Create a 2 dimension array to store file data
- Traverse the array and do followings,
- Create HSSF/ XSSF row for each row in the file
- Create HSSF/ XSSF cell for each cell in the file
- Store the cell value in a String variable
- Store the String in respective array cell
Lets have a look at the code doing these steps:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; public class SimpleFileReadWrite { public static void main(String[] args) throws IOException { File excel = new File ("D:\\Credential.xlsx"); FileInputStream fis = new FileInputStream(excel); XSSFWorkbook wb = new XSSFWorkbook(fis); XSSFSheet ws = wb.getSheet("creden"); int rowNum = ws.getLastRowNum() + 1; int colNum = ws.getRow(0).getLastCellNum(); String [][] data = new String [rowNum] [colNum]; for(int i = 0; i <rowNum; i++){ XSSFRow row = ws.getRow(i); for (int j = 0; j < colNum; j++){ XSSFCell cell = row.getCell(j); String value = cell.toString(); data[i][j] = value; System.out.println ("the value is " + value); } } } |
Write Excel File:
Writing a file using Apache POI is very simple and involve following steps:
- Create a file with specific location to create it
- Create an Output stream with that file
- Create POI Work book(HSSF/ XSSF) with that Input stream
- Create POI Work sheet(HSSF/ XSSF) with that Work book with specific name
- Store String values in a 2 dimension array to write in file
- Traverse the array and do followings,
- Create HSSF/ XSSF row for each row in the file
- Create HSSF/ XSSF cell for each cell in the file
- Set cell value with respective array cell
Lets have a look at the code doing these steps(here I am using the same code I used for reading file. So this program read from a .xlsx file, store data in an 2 dimension array and write it in another .xlsx file):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; public class SimpleFileReadWrite { public static void main(String[] args) throws IOException { File excel = new File ("D:\\Credential.xlsx"); FileInputStream fis = new FileInputStream(excel); XSSFWorkbook wb = new XSSFWorkbook(fis); XSSFSheet ws = wb.getSheet("creden"); int rowNum = ws.getLastRowNum() + 1; int colNum = ws.getRow(0).getLastCellNum(); String [][] data = new String [rowNum] [colNum]; for(int i = 0; i <rowNum; i++){ XSSFRow row = ws.getRow(i); for (int j = 0; j < colNum; j++){ XSSFCell cell = row.getCell(j); String value = cell.toString(); data[i][j] = value; System.out.println ("the value is " + value); } } File outexcel = new File ("D:\\Output_excel.xlsx"); FileOutputStream fos = new FileOutputStream(outexcel); XSSFWorkbook owb = new XSSFWorkbook(); XSSFSheet sht = owb.createSheet("New sheet"); for(int i = 0; i <rowNum; i++){ XSSFRow orow = sht.createRow(i); for (int j = 0; j < colNum; j++){ XSSFCell ocell = orow.createCell(j); ocell.setCellValue(data[i][j]); System.out.println ("the value is " + data[i][j]); } } owb.write(fos); fos.flush(); fos.close(); } } |
Friday, February 13, 2015
Record and Run in JMeter for Performance Test
JMeter is an open source desktop application available for all. By using Apache JMeter we can perform performance test on a web application. A very short, simple and quick intro available, if you want to check the link.
In this post we will learn how to record a test scenario and run it in Windows. Follow step by step process as describe below,
In this post we will learn how to record a test scenario and run it in Windows. Follow step by step process as describe below,
- Download Apache JMeter.
- Download Java. And install it.
- Unzip Apache JMeter file. And open jmeter.bat.
- Add users by right clicking on the Test plan. Test plan-> Add-> Threads (Users)-> Thread Group.
- Add Thread group name, Number of threads, Ramp up period and Loop count. Remember in JMeter Thread meaning User. Replace thread word with user. Add User group name, Number of users and others. Ramp up period in sec = Ramp up period/ Number of users. Loop count can be forever also. If you use forever loop than you have manually stop the test.
- In your Mozilla Firefox driver go to Options-> Networks-> Manual proxy. Add localhost in your server field and 8080 in the port number field.
- Add Recording controller.
- Right click on the Thread group. Add-> Logic controller-> Recording controller.
- Perform the test scenario in the browser.
- After finishing the scenario hit the Stop button in HTTP(S) Test Script Recorder of JMeter.
- Observe that all test steps are added in Recording controller under the Thread group as HTTP requests.
- It is a good practice to clear your previous records before saving the test plan. Try to do it every time you save.
- Save your test plan and hit the play button.
- By hitting the play button you are saying to JMeter, run the recorded test for 50 users. 1 user will be added every second. Running the loop 5 times, that will be 50*5 times for all users.
- After test run process is finish check the Summery report for test data.
Please leave a reply, about this article was helpful or not? Suggestions of improvements are also welcome. Thanks for your time.
Tuesday, May 20, 2014
Usability hack
User introduction:
I am a facebook user, I spend quality time here. I really enjoy reading blog posts. My friends have same habits like me. I and my friends share share blog posts from various famous blogs to share common interests and interact with each other. Its a regular practice of my to read posts in blogs and share them in facebook for my friends.
I am a facebook user, I spend quality time here. I really enjoy reading blog posts. My friends have same habits like me. I and my friends share share blog posts from various famous blogs to share common interests and interact with each other. Its a regular practice of my to read posts in blogs and share them in facebook for my friends.
User story:
As an user I should be able to view posts which are shared by my facebook friends, in my facebook news feed. When I click on post link it take me to browser which navigate me to that blog post page.
As an user I should be able to view posts which are shared by my facebook friends, in my facebook news feed. When I click on post link it take me to browser which navigate me to that blog post page.
User expectation:
After I click on post link in my facebook news feed I expect it to open in respected application installed in my phone. For example, Business insider blog post should open in installed application of BI android in my phone. But it takes me to browser and then to that link.
After I click on post link in my facebook news feed I expect it to open in respected application installed in my phone. For example, Business insider blog post should open in installed application of BI android in my phone. But it takes me to browser and then to that link.
User experience findings:
- User uses an Android smart phone
- User have facebook, browser, business insider android applications installed in his/ her phone
- He/ she is a frequent user of internet, smart phone, facebook and business insider
- User goes to blog post from Facebook
- User share posts in Facebook from BI
- User expect better communications between installed applications of his/ her Android phone
- User uses an Android smart phone
- User have facebook, browser, business insider android applications installed in his/ her phone
- He/ she is a frequent user of internet, smart phone, facebook and business insider
- User goes to blog post from Facebook
- User share posts in Facebook from BI
- User expect better communications between installed applications of his/ her Android phone
User experience report:
- User performing a flow as follows,
1. Browsing facebook news feed
2. Going to browse blog post shared in facebook
3. After reading the post in BI user want to share it in facebook
- User don't like to log in between as its his/ her own phone
- If user performing the full flow in browser with all logged in scenario than user is satisfied
- User finding a bottle neck to perform the full flow within installed applications
- The communication between applications in Android phone need to be improved
- Browser is successful to satisfy the user
- User performing a flow as follows,
1. Browsing facebook news feed
2. Going to browse blog post shared in facebook
3. After reading the post in BI user want to share it in facebook
- User don't like to log in between as its his/ her own phone
- If user performing the full flow in browser with all logged in scenario than user is satisfied
- User finding a bottle neck to perform the full flow within installed applications
- The communication between applications in Android phone need to be improved
- Browser is successful to satisfy the user
Sunday, March 23, 2014
Web application testing tool for screen capture
Windows Problem Steps Recorder a very useful tool for web application testing, if you need series of screen shots taken with recorded steps than this is the one you are looking for.
Key features:
- Record your each and every step
- Take screen shot of every step taken
- You can pause and resume your recording any moment
- You can add comment in your steps
- 3 different type review system is available thus gives a nice report to understand
Before you start you must tune the setting according to your need. Go to Information drop down menu. Select Settings from following menu,
From Settings set following things according to your need,
- Path to save your recorded file
- Enable/ Disable screenshots
- Number of maximum screen shots allow to take while recording steps
View your recorded steps. It will store as a .zip file when application will save it. Unzip it and it will open in IE with 3 Review options,
- Review the recorded problem steps
- Review the recorded problem steps as a slide show
- Review the additional details
It is a real time savor. Use it, feel free to drop comment if you are facing some problem to use it. I use it daily and it benefits me a lot, specially for test report. It is one of the nice and free tool available around us.
Tuesday, January 14, 2014
Subscribe to:
Posts (Atom)



















