Tuesday, May 19, 2015
Monday, May 18, 2015
Test Case Execution Time Slow Issue:
Issues:Test case execution time is aggrandizing continuously. For this reason, it needs to do something new.
Solution:
Kill your browser, after every test case execution.
Sleep time decreasing.
Sleep time decreasing is not always helpful. So, you can kill your browser and make a new call in every test case execution.
Kill your browser in @afterMethod as like below:
@AfterMethod()
public void methodClose() throws Exception {
setDriverAppiumValNull();
}
protected AppiumDriver driverAppium;
public void setDriverAppiumValNull() {
if(driverAppium != null) {
driverAppium.quit();
driverAppium = null;
}
}
“if(driverAppium != null)” - This condition checking helps you to NullPointerException.
Tuesday, April 7, 2015
iOS: Find your UDID
http://whatsmyudid.com/
#Corporate_rules_for_happy_life 1. Trust nobody. 2. What happens in office, remain in office. Never take office gossips to home and vice versa. 3. Enter office on time, leave on time. Your desktop is not helping improvement in your health. 4. Never make GF/BF and/or brother/sister in office. It will always backfire. 5. Expect nothing. If somebody helps, feel thankful. If not, you will learn to know things on your own. 6. Never rush for position. If you get promoted, congrats. If not, it doesn't matter. You will always be remembered for your knowledge and politeness, not for your designation. 7. Never run behind office stuff. You have better things to do in life. 8. Avoid taking everything on your ego. Your salary matters. You are being paid. Use your assets to get happiness. 9. It doesn't matter how people treat you. Be humble. You are not everyone's cup of tea. 10. In the end nothing matters except family, friends, home, and Inner peace. Collected from Abu Sadat Md Saleheen
#Corporate_rules_for_happy_life 1. Trust nobody. 2. What happens in office, remain in office. Never take office gossips to home and vice versa. 3. Enter office on time, leave on time. Your desktop is not helping improvement in your health. 4. Never make GF/BF and/or brother/sister in office. It will always backfire. 5. Expect nothing. If somebody helps, feel thankful. If not, you will learn to know things on your own. 6. Never rush for position. If you get promoted, congrats. If not, it doesn't matter. You will always be remembered for your knowledge and politeness, not for your designation. 7. Never run behind office stuff. You have better things to do in life. 8. Avoid taking everything on your ego. Your salary matters. You are being paid. Use your assets to get happiness. 9. It doesn't matter how people treat you. Be humble. You are not everyone's cup of tea. 10. In the end nothing matters except family, friends, home, and Inner peace. Collected from Abu Sadat Md Saleheen
Monday, March 30, 2015
How to perform Negative Testing?
How to perform Negative Testing?
Ans:
Objectives:
Failure Message will be shown.
Problems/
Issues:
·
Implementation is not done properly.
·
Success message is shown on that specific case.
Solution/
Checking procedure:
·
On that case, first check the success message
has shown or not. If success message is shown, then the failure message is not
exists.
Code:
Part1:
public boolean
checkFileBigSizeAlertExists() throws
NumberFormatException, IOException {
try {
waitForElement(successMsgOfEmpUpdate, Integer.valueOf(PropertyLoader.loadProperty("implicit_timeout_sec_120")));
if (driverW.findElement(By.cssSelector(".page-con.page-con-ajax
.alert.alert-success")) != null) {
return false;
}
else {
return true;
}
} catch
(NoSuchElementException e) {
return true;
}
}
Part2:
boolean
bigSizeAlertExists = employeesPage.checkFileBigSizeAlertExists();
Assert.assertEquals(bigSizeAlertExists,
true, "Profile picture with extra size
succuessfully uploaded");
Monday, March 23, 2015
Make a Maven Project
Make a Maven Project:
Step - 1:
Java
path set as
JAVA_HOME = C:\Program
Files\Java\jdk1.7.0_51
PATH = ;%JAVA_HOME%\bin;
Step - 2:
First
extract the apache-maven-3.2.5-bin.tar.gz file.
Then go to "Environment Setting". Make
a path to bin folder of maven.
PATH = ;C:\apache-maven\bin;
Step - 3:
Then restart the PC and check in command prompt as
mvn -v
It
will give as below:
C:\Users\USER>mvn -v
Apache Maven 3.2.5
(12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-15T02:29:23+09:00)
Maven home: C:\apache-maven\bin\..
Java version: 1.7.0_51, vendor: Oracle
Corporation
Java home: C:\Program
Files\Java\jdk1.7.0_51\jre
Default locale: en_US, platform
encoding: MS932
OS name: "windows 7", version:
"6.1", arch: "amd64", family: "windows"
C:\Users\USER>
Step - 4:
Next
open the command prompt. Then go to project folder.
My
folder is
E:\workspace\test
Then
run the command.
mvn eclipse:eclipse
Map: Map inside Map
Map inside Map:
Base.java:
Initialization:
public
static Map<String, Map<String, String>> roles = new
HashMap<>();
public
static String SCHOOL = "school";
public
static String HOSPITAL = "hospital";
Call from method:
this.createRoleMap();
Implementation:
private void createRoleMap() {
Map<String,
String> hospital = new HashMap<>();
hospital.put("admin",
"Admin");
hospital.put("physician",
"Physician");
hospital.put("nurse",
"Nurse");
hospital.put("fieldtechnician",
"Field Technician");
hospital.put("staff",
"Nurse");
roles.put(HOSPITAL,
hospital);
Map<String,
String> school = new HashMap<>();
school.put("admin",
"Admin");
school.put("physician",
"Staff Member");
school.put("nurse",
"Staff Member");
school.put("fieldtechnician",
"Staff Member");
school.put("staff",
"Staff Member");
roles.put(SCHOOL,
school);
}
Wednesday, February 25, 2015
PostgreSQL DB dump
Type following command from command prompt and get dump.
【Command】
pg_dump -U postgres --inserts --encoding=SJIS dbname > [filname].log
【Command】
pg_dump -U postgres --inserts --encoding=SJIS dbname > [filname].log
Subscribe to:
Posts (Atom)