diff --git a/JavaCore5.iml b/JavaCore5.iml new file mode 100644 index 0000000..bf139e5 --- /dev/null +++ b/JavaCore5.iml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/chromedriver b/chromedriver new file mode 100755 index 0000000..10b8fc0 Binary files /dev/null and b/chromedriver differ diff --git a/geckodriver b/geckodriver new file mode 100755 index 0000000..4a2671f Binary files /dev/null and b/geckodriver differ diff --git a/msedgedriver b/msedgedriver new file mode 100755 index 0000000..9db8b54 Binary files /dev/null and b/msedgedriver differ diff --git a/operadriver b/operadriver new file mode 100755 index 0000000..07ca049 Binary files /dev/null and b/operadriver differ diff --git a/screenshots_my/loginTest22.png b/screenshots_my/loginTest22.png new file mode 100644 index 0000000..24ba308 Binary files /dev/null and b/screenshots_my/loginTest22.png differ diff --git a/src/main/java/App.java b/src/main/java/App.java deleted file mode 100644 index 97adf19..0000000 --- a/src/main/java/App.java +++ /dev/null @@ -1,8 +0,0 @@ -public class App { - public static void main(String[] args) { - System.out.println("Hello, world"); - System.out.println("Hello students"); - - - } -} diff --git a/src/main/java/homework10/App.java b/src/main/java/homework10/App.java new file mode 100644 index 0000000..0a48e3a --- /dev/null +++ b/src/main/java/homework10/App.java @@ -0,0 +1,48 @@ +package homework10; + +public class App { + public static void main(String[] args) { + Cellphone iphone = new Cellphone("iPhone", "X", "retina", 4, 128); + Cellphone samsung = new Cellphone(); + + samsung.setBrand("Samsung"); + samsung.setDisplay("OLED"); + samsung.setMemory(64); + samsung.setModel("Galaxy S10"); + samsung.setRAM(6); + + iphone.printCellphone(); + samsung.printCellphone(); + + + CivilPlane airbus = new CivilPlane("Airbus", "A320", 250, 10000); + + CivilPlane boeing = new CivilPlane(); + boeing.setBrand("Boeing"); + boeing.setModel("727"); + boeing.setDistance_of_flight(11000); + boeing.setNumber_of_passengers(260); + + airbus.printPlane(); + boeing.printPlane(); + + + Resources[] resourcesUS = {Resources.GOLD, Resources.LAND, Resources.OIL}; + Country usa = new Country("United States of America", "USA", 320000000, "Democracy", resourcesUS); + usa.setMain_resources(resourcesUS); + usa.countryInfo(); + + Resources[] resourcesCH = {Resources.PLATINUM, Resources.GAS, Resources.ALUMINUM, Resources.SILVER}; + Country china = new Country(); + china.setFull_name("People's Republic of China"); + china.setAbbreviation("PRC"); + china.setPolitical_system("Communism"); + china.setPopulation(1500000000); + china.setMain_resources(resourcesCH); + + china.countryInfo(); + + } + + +} diff --git a/src/main/java/homework10/Cellphone.java b/src/main/java/homework10/Cellphone.java new file mode 100644 index 0000000..85c7e00 --- /dev/null +++ b/src/main/java/homework10/Cellphone.java @@ -0,0 +1,71 @@ +package homework10; + + +public class Cellphone { + private String brand; + private String model; + private String display; + private int RAM; + private int memory; + + public String getBrand() { + return brand; + } + + public String getModel() { + return model; + } + + public String getDisplay() { + return display; + } + + public int getRAM() { + return RAM; + } + + public int getMemory() { + return memory; + } + + public void setBrand(String brand) { + this.brand = brand; + } + + public void setModel(String model) { + this.model = model; + } + + public void setDisplay(String display) { + this.display = display; + } + + public void setRAM(int RAM) { + this.RAM = RAM; + } + + public void setMemory(int memory) { + this.memory = memory; + } + + public Cellphone() { + } + + public Cellphone(String b, String m, String d, int ram, int me) { + this.brand = b; + this.model = m; + this.display = d; + this.RAM = ram; + this.memory = me; + + } + + public void printCellphone() { + System.out.println("Cellphone: " + + "Brand- " + brand + + ", Model- " + model + + ", Display type- " + display + + ", RAM- " + RAM + "Gb" + + ", Memory- " + memory +"Gb"); + } +} diff --git a/src/main/java/homework10/CivilPlane.java b/src/main/java/homework10/CivilPlane.java new file mode 100644 index 0000000..cb6592d --- /dev/null +++ b/src/main/java/homework10/CivilPlane.java @@ -0,0 +1,58 @@ +package homework10; + +public class CivilPlane { + private String brand; + private String model; + private int number_of_passengers; + private int distance_of_flight; + + public String getBrand() { + return brand; + } + + public String getModel() { + return model; + } + + public int getNumber_of_passengers() { + return number_of_passengers; + } + + public int getDistance_of_flight() { + return distance_of_flight; + } + + public void setBrand(String brand) { + this.brand = brand; + } + + public void setModel(String model) { + this.model = model; + } + + public void setNumber_of_passengers(int number_of_passengers) { + this.number_of_passengers = number_of_passengers; + } + + public void setDistance_of_flight(int distance_of_flight) { + this.distance_of_flight = distance_of_flight; + } + + public CivilPlane(String brand, String model, int number_of_passengers, int distance_of_flight) { + this.brand = brand; + this.model = model; + this.number_of_passengers = number_of_passengers; + this.distance_of_flight = distance_of_flight; + } + + public CivilPlane() { + } + + public void printPlane() { + System.out.println("Civil Plane: " + + "Brand- " + brand + + ", Model- " + model + + ", Number of passengers= " + number_of_passengers + + ", Distance of flight= " + distance_of_flight + "ml"); + } +} diff --git a/src/main/java/homework10/Country.java b/src/main/java/homework10/Country.java new file mode 100644 index 0000000..1c79f56 --- /dev/null +++ b/src/main/java/homework10/Country.java @@ -0,0 +1,80 @@ +package homework10; + +import java.util.Arrays; + +public class Country { + private String full_name; + private String abbreviation; + private int population; + private String political_system; + private Resources[] main_resourсes; + + public String getFull_name() { + return full_name; + } + + public String getAbbreviation() { + return abbreviation; + } + + public int getPopulation() { + return population; + } + + public String getPolitical_system() { + return political_system; + } + + + public void setFull_name(String full_name) { + this.full_name = full_name; + } + + public void setAbbreviation(String abbreviation) { + this.abbreviation = abbreviation; + } + + public void setPopulation(int population) { + this.population = population; + } + + public void setPolitical_system(String political_system) { + this.political_system = political_system; + } + + public void setMain_resources(Resources[] main_resourсes) { + this.main_resourсes = main_resourсes; + } + + public Resources[] getMain_resourсes() { + return main_resourсes; + } + + public void setMain_resourсes(Resources[] main_resourсes) { + this.main_resourсes = main_resourсes;} + + + public Country(String full_name, String abbreviation, int population, String political_system, Resources[] main_resourсes) { + this.full_name = full_name; + this.abbreviation = abbreviation; + this.population = population; + this.political_system = political_system; + this.main_resourсes = main_resourсes; + } + + public Country() { + } + + public void countryInfo() { + System.out.println("Country: " + + "Name- " + full_name + + ", Abbreviation- " + abbreviation + + ", Population= " + population + + ", Political system- " + political_system + + ", Main resourсes- " + Arrays.toString(main_resourсes)); + + } + +} + + diff --git a/src/main/java/homework10/Resources.java b/src/main/java/homework10/Resources.java new file mode 100644 index 0000000..096e85f --- /dev/null +++ b/src/main/java/homework10/Resources.java @@ -0,0 +1,13 @@ +package homework10; + +public enum Resources { + GOLD, + WOOD, + LAND, + SILVER, + TITANIUM, + PLATINUM, + ALUMINUM, + OIL, + GAS +} diff --git a/src/main/java/homework11/Animal.java b/src/main/java/homework11/Animal.java new file mode 100644 index 0000000..84ce488 --- /dev/null +++ b/src/main/java/homework11/Animal.java @@ -0,0 +1,58 @@ +package homework11; + +import org.w3c.dom.ranges.RangeException; + +public class Animal { + protected String name; + protected double age; + protected Color color; + protected Food[] food; + + public Animal(String name, double age, Color color, Food[] food) { + if (age < 0.1) { + throw new RangeException((short) 404, "Wrong age"); + } + this.name = name; + this.age = age; + this.color = color; + this.food = food; + } + + public Animal() { + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public double getAge() { + return age; + } + + public void setAge(double age) { + if (age < 0.1) { + throw new RangeException((short) 404, "Wrong age"); + } + this.age = age; + } + + public Color getColor() { + return color; + } + + public void setColor(Color color) { + this.color = color; + } + + public Food[] getFood(Food[] food) { + return food; + } + + public void setFood(Food[] food) { + this.food = food; + } +} diff --git a/src/main/java/homework11/App.java b/src/main/java/homework11/App.java new file mode 100644 index 0000000..77f8a7b --- /dev/null +++ b/src/main/java/homework11/App.java @@ -0,0 +1,28 @@ +package homework11; + +import java.util.Arrays; + +public class App { + public static void main(String[] args) { + + Food[] cat_food = {Food.FISH, Food.DAIRY, Food.WET_FOOD}; + + Cat barsik = new Cat(); + barsik.setCat_breed("British"); + barsik.setName("Barsik"); + barsik.setAge(4.5); + barsik.setColor(Color.BLUE); + barsik.setFood(cat_food); + + System.out.println("CAT"); + System.out.println("Name is " + barsik.getName()); + System.out.println("Age= "+barsik.getAge()); + System.out.println("Breed is "+barsik.getCat_breed()); + System.out.println("Color is "+barsik.getColor()); + System.out.println("Diet- " +Arrays.toString(barsik.getFood(cat_food))); + + Food[] dog_food = {Food.MEAT, Food.DRY_FOOD, Food.VEGGIE}; + Dog barbos = new Dog("Barbos", 1.6, Color.GOLD, dog_food, "Labrador"); + barbos.dogInfo(); + } +} diff --git a/src/main/java/homework11/Cat.java b/src/main/java/homework11/Cat.java new file mode 100644 index 0000000..25924e0 --- /dev/null +++ b/src/main/java/homework11/Cat.java @@ -0,0 +1,32 @@ +package homework11; + +import java.util.Arrays; + +public class Cat extends Animal { + private String cat_breed; + + public Cat(String name, int age, Color color, Food[] food, String cat_breed) { + super(name, age, color, food); + this.cat_breed = cat_breed; + } + + public Cat() { + } + + public String getCat_breed() { + return cat_breed; + } + + public void setCat_breed(String cat_breed) { + this.cat_breed = cat_breed; + } + + public void catInfo() { + System.out.println("\nCAT" + + "\nBreed is " + cat_breed + + "\nName is " + name + + "\nAge= " + age + " years" + + "\nColor is " + color + + "\nFood= " + Arrays.toString(food)); + } +} diff --git a/src/main/java/homework11/Color.java b/src/main/java/homework11/Color.java new file mode 100644 index 0000000..271de11 --- /dev/null +++ b/src/main/java/homework11/Color.java @@ -0,0 +1,13 @@ +package homework11; + +public enum Color { + WHITE, + BROWN, + DARK, + BLONDE, + MIXED, + GOLD, + GINGER, + SILVER, + BLUE +} diff --git a/src/main/java/homework11/Dog.java b/src/main/java/homework11/Dog.java new file mode 100644 index 0000000..f43390a --- /dev/null +++ b/src/main/java/homework11/Dog.java @@ -0,0 +1,30 @@ +package homework11; + +import java.util.Arrays; + +public class Dog extends Animal { + private String dog_breed; + + public Dog(String name, double age, Color color, Food[] food, String dog_breed) { + super(name, age, color, food); + this.dog_breed = dog_breed; + } + + public String getDog_breed() { + return dog_breed; + } + + public void setDog_breed(String dog_breed) { + this.dog_breed = dog_breed; + } + + public void dogInfo() { + System.out.println("\nDOG" + + "\nBreed is " + dog_breed + + "\nName is " + name + + "\nAge= " + age + " years"+ + "\nColor is " + color + + "\nDiet- " + Arrays.toString(food)); + + } +} \ No newline at end of file diff --git a/src/main/java/homework11/Food.java b/src/main/java/homework11/Food.java new file mode 100644 index 0000000..d3e1576 --- /dev/null +++ b/src/main/java/homework11/Food.java @@ -0,0 +1,10 @@ +package homework11; + +public enum Food { + FISH, + MEAT, + VEGGIE, + DAIRY, + DRY_FOOD, + WET_FOOD +} diff --git a/src/main/java/homework12/App.java b/src/main/java/homework12/App.java new file mode 100644 index 0000000..70434dc --- /dev/null +++ b/src/main/java/homework12/App.java @@ -0,0 +1,30 @@ +package homework12; + +import javax.swing.plaf.TableHeaderUI; + +public class App { + public static void main(String[] args) { + Three_quarter_Inch_steel_pipe heater1 = new Gas_water_heater("Samsung", "tankless", 10000); + ((Gas_water_heater) heater1).heatersInfo(); + heater1.thread_diameter(); + heater1.thread_length(); + System.out.println("--------------------"); + Three_quarter_Inch_steel_pipe heater2 = new Gas_water_heater("GE", "with tank", 20000 ); + ((Gas_water_heater)heater2).heatersInfo(); + heater2.thread_diameter(); + heater2.thread_length(); + System.out.println("--------------------"); + + Three_quarter_Inch_steel_pipe radiator1 = new Cast_iron_section_radiator("AG", "China", 7); + ((Cast_iron_section_radiator)radiator1).radiatorInfo(); + radiator1.thread_diameter(); + radiator1.thread_length(); + System.out.println("--------------------"); + + Three_quarter_Inch_steel_pipe radiator2 =new Cast_iron_section_radiator("DC", "USA", 10); + ((Cast_iron_section_radiator)radiator2).radiatorInfo(); + radiator2.thread_diameter(); + radiator2.thread_length(); + System.out.println("--------------------"); + } +} diff --git a/src/main/java/homework12/Cast_iron_section_radiator.java b/src/main/java/homework12/Cast_iron_section_radiator.java new file mode 100644 index 0000000..05c0af0 --- /dev/null +++ b/src/main/java/homework12/Cast_iron_section_radiator.java @@ -0,0 +1,28 @@ +package homework12; + +public class Cast_iron_section_radiator implements Three_quarter_Inch_steel_pipe { +private String brand; +private String made_in; +private int number_of_sections; + + public Cast_iron_section_radiator(String brand, String made_in, int number_of_sections) { + this.brand = brand; + this.made_in = made_in; + this.number_of_sections = number_of_sections; + } + + public void thread_diameter() { + System.out.println("Recommended steam inlet/outlet size - 3/4 inch"); + } + + public void thread_length() { + System.out.println("Do not tighten until it stops (no more than 3/4 inch)"); + } + + public void radiatorInfo() { + System.out.println("\nCast iron section radiator" + + "\nBrand is " + brand + + "\nMade in " + made_in + + "\nNumber of sections= " + number_of_sections); + } +} diff --git a/src/main/java/homework12/Gas_water_heater.java b/src/main/java/homework12/Gas_water_heater.java new file mode 100644 index 0000000..8f8496a --- /dev/null +++ b/src/main/java/homework12/Gas_water_heater.java @@ -0,0 +1,29 @@ +package homework12; + +public class Gas_water_heater implements Three_quarter_Inch_steel_pipe { +private String brand_name; +private String type; +private int power; + + public Gas_water_heater(String brand_name, String type, int power) { + this.brand_name = brand_name; + this.type = type; + this.power = power; + } + + public void thread_diameter() { + System.out.println("Gas pipe thread diameter for success connection should be no more than 3/4 inch"); + } + + public void thread_length() { + System.out.println("Lenght of thread for 3/4 inch gas pipe should be no more than 1 inch"); + + } + + public void heatersInfo() { + System.out.println( "\nGas water heater" + + "\nBrand name is " + this.brand_name + + "\nType is " + this.type + + "\nPower= " + this.power + " BTU"); + } +} diff --git a/src/main/java/homework12/Three_quarter_Inch_steel_pipe.java b/src/main/java/homework12/Three_quarter_Inch_steel_pipe.java new file mode 100644 index 0000000..d5d8954 --- /dev/null +++ b/src/main/java/homework12/Three_quarter_Inch_steel_pipe.java @@ -0,0 +1,6 @@ +package homework12; + +public interface Three_quarter_Inch_steel_pipe { +void thread_diameter (); +void thread_length (); +} diff --git a/src/main/java/homework14/Address.java b/src/main/java/homework14/Address.java new file mode 100644 index 0000000..4c516e4 --- /dev/null +++ b/src/main/java/homework14/Address.java @@ -0,0 +1,64 @@ +package homework14; + +public class Address { + + private String streetAddress; + private String town; + private String state; + private int zip; + + public Address(String streetAddress, String town, String state, int zip) { + this.streetAddress = streetAddress; + this.town = town; + this.state = state; + this.zip = zip; + } + + public Address() { + } + + public String getStreetAddress() { + return streetAddress; + } + + public void setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + } + + public String getTown() { + return town; + } + + public void setTown(String town) { + this.town = town; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public int getZip() { + return zip; + } + + public void setZip(int zip) { + this.zip = zip; + } + + @Override + public String toString() { + return streetAddress+", " +town+", " + state+", " + zip; + } + + public void addressInfo() { + System.out.println(" Street Address - " + streetAddress + + "Town is " + town+ + "State is " + state+ + "Zip is " + zip); + + } +} diff --git a/src/main/java/homework14/App.java b/src/main/java/homework14/App.java new file mode 100644 index 0000000..1ccfca9 --- /dev/null +++ b/src/main/java/homework14/App.java @@ -0,0 +1,52 @@ +package homework14; + +import lesson14.Colors; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class App { + public static void main(String[] args) { + Address address1 = new Address("882 East 14 St", "Brooklyn", "NY", 11230); + List insurance = new ArrayList<>(); + insurance.add(Insurance_Companies.FIDELIS); + insurance.add(Insurance_Companies.UNITEDHEALTHCARE); + insurance.add(Insurance_Companies.HCSC); + + System.out.println("-----LIST OF DOCTORS-----"); + List stGeorge_doctors = new ArrayList(); + stGeorge_doctors.add(new Doctor("Paul", "Johnson", Position.CARDIOLOGIST)); + stGeorge_doctors.add(new Doctor("William", "Hunt", Position.DENTIST)); + stGeorge_doctors.add(new Doctor("Abbraham", "Lebowski", Position.PHYSICIAN)); + stGeorge_doctors.add((new Doctor("Kevin", "Andersson", Position.DERMATOLOGIST))); + stGeorge_doctors.forEach(x -> x.printDoctors()); + + System.out.println(" "); + System.out.println("------LIST OF ROOMS------"); + Map rooms = new HashMap<>(); + + rooms.put(1, Position.ALLERGIST); + rooms.put(2, Position.CARDIOLOGIST); + rooms.put(3, Position.DENTIST); + rooms.put(4, Position.ONCOLOGIST); + rooms.put(5, Position.PEDIATRICIANS); + rooms.put(6, Position.PHYSIATRISTS); + rooms.put(7, Position.RADIOLOGIST); + rooms.put(8, Position.OPHTHALMOLOGIST); + + for (Map.Entry set : rooms.entrySet()) { + System.out.println(" "); + System.out.print("#"); + System.out.print(set.getKey()); + System.out.print(" "); + System.out.print(set.getValue()); + System.out.print(" "); + + + } + Hospital stGeorge = new Hospital("St.George Hospital", address1, stGeorge_doctors, rooms, insurance); + stGeorge.printInfo(); + } +} diff --git a/src/main/java/homework14/Doctor.java b/src/main/java/homework14/Doctor.java new file mode 100644 index 0000000..4685011 --- /dev/null +++ b/src/main/java/homework14/Doctor.java @@ -0,0 +1,60 @@ +package homework14; + +public class Doctor { + private String name; + private String lastName; + private Position position; + + public Doctor(String name, String lastName, Position position) { + this.name = name; + this.lastName = lastName; + this.position = position; + } + + public Doctor() { + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public Position getPosition() { + return position; + } + + public void setPosition(Position position) { + this.position = position; + } + + @Override + public String toString() { + return "\n "+ + "\nDOCTOR:" + + "\nName: " + name + + "\nLast name: " + lastName + + "\nPosition: " + position+ + "\n_______________________"; + } + + public void printDoctors() { + System.out.println( + "\nName is " + name + + "\nLast name is " + lastName + + "\nPosition is " + position+ + "\n_________________________"); + + + } +} diff --git a/src/main/java/homework14/Hospital.java b/src/main/java/homework14/Hospital.java new file mode 100644 index 0000000..5db485f --- /dev/null +++ b/src/main/java/homework14/Hospital.java @@ -0,0 +1,42 @@ +package homework14; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class Hospital { + + private String hospitalName; + private Address address; + private List doctors; + private Map rooms; + private List acceptedInsurance; + + + public Hospital(String hospitalName, Address address, List doctors, Map rooms, List acceptedInsurance) { + this.hospitalName = hospitalName; + this.address = address; + this.doctors = doctors; + this.rooms = rooms; + this.acceptedInsurance = acceptedInsurance; + } + + public Hospital() { + } + + public void printInfo() { + System.out.println( + "\n " + + "\n------HOSPITAL DESCRIPTION------" + + "\n " + + "\n- Hospital name: " + hospitalName + + "\n- Address: " + address + + "\n- List of doctors: " + doctors + + "\n " + + "\n- List of rooms: " + rooms + + "\n- Accepted Insurance Plans: " + acceptedInsurance); + + } +} + diff --git a/src/main/java/homework14/Insurance_Companies.java b/src/main/java/homework14/Insurance_Companies.java new file mode 100644 index 0000000..6555f42 --- /dev/null +++ b/src/main/java/homework14/Insurance_Companies.java @@ -0,0 +1,11 @@ +package homework14; + +public enum Insurance_Companies { + FIDELIS, + UNITEDHEALTHCARE, + CIGNA, + WELLCARE, + HEALTHFIRST, + HCSC, + HUMANA +} diff --git a/src/main/java/homework14/Position.java b/src/main/java/homework14/Position.java new file mode 100644 index 0000000..36042c4 --- /dev/null +++ b/src/main/java/homework14/Position.java @@ -0,0 +1,15 @@ +package homework14; + +public enum Position { + CARDIOLOGIST, + ALLERGIST, + DERMATOLOGIST, + PHYSICIAN, + NEUROLOGIST, + ONCOLOGIST, + OPHTHALMOLOGIST, + PEDIATRICIANS, + PHYSIATRISTS, + RADIOLOGIST, + DENTIST +} diff --git a/src/main/java/homework5/home.java b/src/main/java/homework5/home.java new file mode 100644 index 0000000..117fd5b --- /dev/null +++ b/src/main/java/homework5/home.java @@ -0,0 +1,7 @@ +package homework5; + +public class home { + public static void main(String[] args) { + System.out.println("Hey, whats up! "); + } +} diff --git a/src/main/java/homework6/HomeWork.java b/src/main/java/homework6/HomeWork.java new file mode 100644 index 0000000..17234e6 --- /dev/null +++ b/src/main/java/homework6/HomeWork.java @@ -0,0 +1,39 @@ +package homework6; + +public class HomeWork { + public static void main(String[] args) { + + //Task displaying + + sum(5, 6); + + int xx = sum1(200, 300); + System.out.println(xx); + + boolean yy = isEven(99); + System.out.println(yy); + } +//Task 1 + + public static void sum(int a, int b) { + int x = a + b; + System.out.println(x); + } +//Task 2 + + public static int sum1(int c, int d) { + int result = c + d; + return result; + } + + //Task 3 + + public static boolean isEven(int number) { + if (number % 2 == 0) { + return true; + } else { + return false; + } + + } +} diff --git a/src/main/java/homework7/HomeWork.java b/src/main/java/homework7/HomeWork.java new file mode 100644 index 0000000..1e7be9e --- /dev/null +++ b/src/main/java/homework7/HomeWork.java @@ -0,0 +1,71 @@ +package homework7; + +import java.util.Arrays; + +public class HomeWork { + + public static void main(String[] args) { + + int[] arr = {2, 3, 5, 6, 7, 8}; + int sumArray = sum(arr); + System.out.println(" "); + System.out.println("Answer 1:"); + System.out.println(sum(arr)); + System.out.println("---------"); + System.out.println(" "); + + int[] arr1 = {3, 9, 1, 8, 4, 8, 5}; + System.out.println("Answer 2:"); + sort(arr1); + System.out.println("---------"); + System.out.println(" "); + + int[] arr2 = {3, 9, 1, 8, 4, 8, 5}; + System.out.println("Answer 2:"); + System.out.println("Max number is " + max(arr2)); + System.out.println("Min number is " + min(arr2)); + System.out.println("---------"); + + } + + //Task 1 + public static int sum(int[] arr) { + int sum = 0; + for (int v : arr) { + sum += v; + } + return sum; + } + + //Task 2 + private static void sort(int[] arr1) { + Arrays.sort(arr1); + for (int v : arr1) { + System.out.println(v); + } + } + + //Task 3 + public static int max(int[] arr2) { + int max = arr2[0]; + for (int v : arr2) { + if (v > max) { + max = v; + } + } + return max; + } + + public static int min(int[] arr2) { + int min = arr2[0]; + for (int v : arr2) { + if (v < min) { + min = v; + } + return min; + } + return min; + } +} + + diff --git a/src/main/java/homework8/FilmTypes.java b/src/main/java/homework8/FilmTypes.java new file mode 100644 index 0000000..61b5b92 --- /dev/null +++ b/src/main/java/homework8/FilmTypes.java @@ -0,0 +1,15 @@ +package homework8; + +import javax.sql.rowset.serial.SerialException; + +public enum FilmTypes { + COMEDY, + ACTION, + HORROR, + THRILLER, + TVSERIES, + DRAMA, + HISTORICAL, + FANTASTIC, + FANTASY +} diff --git a/src/main/java/homework8/GameTypes.java b/src/main/java/homework8/GameTypes.java new file mode 100644 index 0000000..d37b544 --- /dev/null +++ b/src/main/java/homework8/GameTypes.java @@ -0,0 +1,12 @@ +package homework8; + +public enum GameTypes { + STRATEGY, + ACTION, + RPG, + SIMULATOR, + SPORT, + INDIE, + MMO, + QUEST +} diff --git a/src/main/java/homework8/HomeWork.java b/src/main/java/homework8/HomeWork.java new file mode 100644 index 0000000..b4614cf --- /dev/null +++ b/src/main/java/homework8/HomeWork.java @@ -0,0 +1,22 @@ +package homework8; + +public class HomeWork { + public static void main(String[] args) { + FilmTypes Titanic = FilmTypes.DRAMA; + FilmTypes Lord_of_the_rings = FilmTypes.FANTASY; + FilmTypes Terminator = FilmTypes.ACTION; + FilmTypes[] Popular = {Terminator, Titanic, Lord_of_the_rings}; + for (FilmTypes v: Popular) + System.out.println(v); + + GameTypes FarCry = GameTypes.ACTION; + GameTypes FIFA = GameTypes.SPORT; + GameTypes NFS = GameTypes.SIMULATOR; + GameTypes Diablo = GameTypes.RPG; + GameTypes[] Best_Games_Genres = {GameTypes.ACTION, GameTypes.RPG, GameTypes.STRATEGY}; + for (GameTypes v: Best_Games_Genres) + System.out.println(v); + + } + +} diff --git a/src/main/java/homework9/AC.java b/src/main/java/homework9/AC.java new file mode 100644 index 0000000..5fbea3c --- /dev/null +++ b/src/main/java/homework9/AC.java @@ -0,0 +1,19 @@ +package homework9; + +public class AC { + public String brand; + public String model; + public int BTU; + public String control_type; + public int warranty; + public String installation_type; + + public void Print_AC_info (){ + System.out.println("AC brand name- "+ brand); + System.out.println("AC model name- "+model); + System.out.println("AC BTU- "+BTU); + System.out.println("AC control type- "+control_type); + System.out.println("AC Warranty- "+warranty +" years"); + System.out.println("AC installation type- "+installation_type); + } +} diff --git a/src/main/java/homework9/App.java b/src/main/java/homework9/App.java new file mode 100644 index 0000000..a28bc41 --- /dev/null +++ b/src/main/java/homework9/App.java @@ -0,0 +1,67 @@ +package homework9; + +public class App { + public static void main(String[] args) { + Patient john = new Patient(); + + john.name = "John"; + john.surname = "Williams"; + john.yearofbirth = 1975; + john.pcp_doctor = "Dr.Lebowski"; + john.health_condition = "good"; + + john.last_visit(); + + Patient dazy = new Patient(); + + dazy.name = "Dazy"; + dazy.surname = "McLaren"; + dazy.yearofbirth = 1992; + dazy.pcp_doctor = "Dr.Karther"; + dazy.health_condition = "passably"; + + dazy.last_visit(); + + Customer nick = new Customer(); + nick.fullname = "Nick Kurtz"; + nick.date_of_birth = "06/02/85"; + nick.years_as_a_customer = 6; + nick.profit = 167567.70; + + nick.customers_data(); + + nick.ptintInfo(); + + Customer clare = new Customer(); + clare.fullname = "Clare Crawley"; + clare.date_of_birth = "01/24/61"; + clare.years_as_a_customer = 3; + clare.profit = 285765.90; + + clare.customers_data(); + + clare.ptintInfo(); + + AC samsung = new AC(); + samsung.brand = "Samsung"; + samsung.model = "MLB71"; + samsung.warranty = 3; + samsung.installation_type = "On the wall"; + samsung.control_type = "auto/manual/remote"; + samsung.BTU = 12000; + + samsung.Print_AC_info(); + + AC lg = new AC(); + lg.brand = "LG Electronics"; + lg.model ="DC11"; + lg.warranty = 5; + lg.installation_type = "Into the window"; + lg.control_type = "auto/remote"; + lg.BTU = 10000; + + lg.Print_AC_info(); + + + } +} diff --git a/src/main/java/homework9/Customer.java b/src/main/java/homework9/Customer.java new file mode 100644 index 0000000..1cda963 --- /dev/null +++ b/src/main/java/homework9/Customer.java @@ -0,0 +1,20 @@ +package homework9; + +public class Customer { + public String fullname; + public int years_as_a_customer; + public double profit; + public String date_of_birth; + + public void customers_data(){ + System.out.println("Value customer " + fullname + " (" +date_of_birth+ ") with us for " +years_as_a_customer +" years and he/she brought us profit of " + profit +"$"); + } + + public void ptintInfo() { + System.out.println("Customer: " + + "Full name='" + fullname + '\'' + + ", Years as a customer=" + years_as_a_customer + + ", Profit=" + profit + "$"+ + ", Date of birth='" + date_of_birth + '\'' ); + } +} diff --git a/src/main/java/homework9/Patient.java b/src/main/java/homework9/Patient.java new file mode 100644 index 0000000..aa36cb0 --- /dev/null +++ b/src/main/java/homework9/Patient.java @@ -0,0 +1,18 @@ +package homework9; + +import java.util.Date; + +public class Patient { + public String name; + public String surname; + public int yearofbirth; + public String pcp_doctor; + public String health_condition; + + + public void last_visit(){ + Date d1 = new Date(); + System.out.println("Patient "+ name +" " + surname +" last visit was on " +d1 +" to " +pcp_doctor+ " and the patient's current health condition is "+health_condition); + } + +} diff --git a/src/main/java/hw66/First.java b/src/main/java/hw66/First.java new file mode 100644 index 0000000..1103320 --- /dev/null +++ b/src/main/java/hw66/First.java @@ -0,0 +1,7 @@ +package hw66; + +public class First { + public static void main(String[] args) { + System.out.println("Hello Aiaz"); + } +} diff --git a/src/main/java/hw7/hw.java b/src/main/java/hw7/hw.java deleted file mode 100644 index efeab13..0000000 --- a/src/main/java/hw7/hw.java +++ /dev/null @@ -1,36 +0,0 @@ -package hw7; - -import lesson8.Direction; - -import java.util.Arrays; - -public class hw { - public static void main(String[] args) { - // Ex 1 - int[] arr = {2,3,5,6,7,8}; - int sumOfArray = sum(arr); - System.out.println(sumOfArray); - - // Ex2 - sort(arr); - - int x; - Direction home = Direction.EAST; - } - - private static void sort(int[] arr1) { - Arrays.sort(arr1); - for (int v : arr1) { - System.out.println(v); - } - - } - - private static int sum(int[] arr1) { - int sum = 0; - for(int v: arr1){ - sum+=v; - } - return sum; - } -} diff --git a/src/main/java/tasks_for_interview/Algorithm.java b/src/main/java/tasks_for_interview/Algorithm.java new file mode 100644 index 0000000..bb1536b --- /dev/null +++ b/src/main/java/tasks_for_interview/Algorithm.java @@ -0,0 +1,226 @@ +package tasks_for_interview; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class Algorithm { + public static void main(String[] args) { + System.out.println("Algorithms"); + ///FizzBuzz + + for (var i = 1; i < 100; i++) { + fizzBuzz(i); + fizzBuzz1(i); + fizzBuzz2(i); + } + ///GetRemainder + int remainder = getRemainder(30,6); + System.out.println("Remainder= "+remainder); + + int remainder1 = getRemainder1(30,7); + System.out.println("Remainder= "+remainder1); + + ///Swap 2 variables + int a=10; + int b=20; + + a = a+b; + b = a-b; + a = a-b; + + System.out.println(a); + System.out.println(b); + + ///Lucky string or number (tyuiuyt) + + String str = "tyuiuyt"; + if(isLucky(str)){ + System.out.println(str+" is Lucky!"); + } else { + System.out.println(str+" isn't Lucky!"); + } + + ///Reverse sentences + final String sentence = "Today is a good day"; + reverseSentence(sentence); + + // Повторяющиеся числа в array + int[] array = {5,5,6,7,8,9,6,0,5,9,2,3,1}; + printRepited(array); + + //Anagram + String str1 = "Thing"; + String str2 = "Night"; + + boolean check = isAnagram(str1, str2); + System.out.println(check); + + //Разделение поискового запроса + String xx = "https://www.google.com/search?rlz=1C5CHFA_enUS908US908&sxsrf=ALeKk03MX5pstSrmFY2r3lUOJm9vqpximA%3A1601598639474&ei=r3R2X4WkHLK0ytMPwpiV4Ak&q=java&oq=java&gs_lcp=CgZwc3ktYWIQAzIECAAQRzIECAAQRzIECAAQRzIECAAQRzIECAAQRzIECAAQRzIECAAQRzIECAAQR1AAWABg9cUCaABwAngAgAEAiAEAkgEAmAEAqgEHZ3dzLXdpesgBCMABAQ&sclient=psy-ab&ved=0ahUKEwjFt-nv05TsAhUymnIEHUJMBZwQ4dUDCA0&uact=5"; + String[] spl = xx.split("\\?"); + String params = spl[1]; + String[] pr = params.split("&"); + for (String v: pr){ + System.out.println(v.split("=")[0]+": "+v.split("=")[1]); + } + + //FizzBuzz.version2 + int zz = 100; + fizzbuzz(zz); + } + + //FizzBuzz.version2.Decision. + private static void fizzbuzz(int zz) { + for (int i=0; i(); + for (int i=0; i System.out.println(x)); + } + + ///Reverse sentences. Decision. + private static void reverseSentence(String sentence) { + var words = sentence.split(" "); + var reverse = ""; + for (var i=words.length-1; i>=0; i--){ + reverse+=words[i]+" ";} + System.out.println(reverse); + } + + //Lucky string or number (tyuiuyt). Decision. + + private static boolean isLucky(String str) { + String reverse = ""; + for (var i = str.length() - 1; i >= 0; i--) { + reverse += str.charAt(i); + } + for (var i = 0; i < str.length()/2; i++) { + if (str.charAt(i) != reverse.charAt(i)) { + return false; + } + } + return true; + } + + + // GetRemainder version 1 + private static int getRemainder(int a, int b) { + boolean cond = true; + if(a fluentWait; + + @BeforeClass + public void runFirst() { + token = "Bearer " + TokenHelper_my.get(); +} + @BeforeMethod + public void sturtUp() throws NoSuchMethodException { + driver = BrowserFabric_my.getDriver(BrowserType_my.CHROME); + Playlist createPlaylist = TestDataGenerator.createPlaylistRequest(); + Response response = given() + .baseUri("https://koelapp.testpro.io/") + .basePath("api/playlist") + .header("Content-Type","application/json") + .header("Authorization",token) + .body(createPlaylist) + .when() + .post() + .then() + .statusCode(200) + .extract() + .response(); + JsonPath jsonPath = response.jsonPath(); + Playlist responsePlaylist = jsonPath.getObject("$",Playlist.class); + Assert.assertEquals(createPlaylist.getName(),responsePlaylist.getName()); + playlistId=responsePlaylist.getId()+""; + } + @AfterMethod + public void tearDown(){ + String token = "Bearer "+ TokenHelper_my.get(); + given() + .baseUri("https://koelapp.testpro.io/api/playlist/"+playlistId) + .header("Authorization", token) + .when() + .delete(); + driver.quit(); + } + @Test + + public void renamePlaylistTest() throws InterruptedException { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn("koeluser06@testpro.io","te$t$tudent"); + String newName = TestDataGenerator_my.randomString(8); + mainPage.renamePlaylist(playlistId, newName); + Assert.assertTrue(mainPage.isPlaylistExist1(playlistId, newName)); + } + + } diff --git a/src/test/java/apiPlusSelenium_my/Playlist_my.java b/src/test/java/apiPlusSelenium_my/Playlist_my.java new file mode 100644 index 0000000..19dc125 --- /dev/null +++ b/src/test/java/apiPlusSelenium_my/Playlist_my.java @@ -0,0 +1,46 @@ +package apiPlusSelenium_my; + +import enums_my.BrowserType_my; +import helpers_my.BrowserFabric_my; +import helpers_my.TestDataGenerator_my; +import helpers_my.TokenHelper_my; +import koel_PageObjects_My.LoginPage_my; +import koel_PageObjects_My.MainPage_my; +import org.openqa.selenium.WebDriver; +import org.testng.Assert; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import static io.restassured.RestAssured.given; + +public class Playlist_my { + private WebDriver driver; + private String playlistId; + + @BeforeMethod + public void sturtUp() throws NoSuchMethodException { + driver = BrowserFabric_my.getDriver(BrowserType_my.CHROME); + } + @AfterMethod + public void tearDown(){ + String token = "Bearer "+ TokenHelper_my.get(); + given() + .baseUri("https://koelapp.testpro.io/api/playlist/"+playlistId) + .header("Authorization", token) + .when() + .delete(); + driver.quit(); + } + @Test + + public void createPlaylist() { + String name = TestDataGenerator_my.randomString(8); + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn("koeluser06@testpro.io","te$t$tudent"); + playlistId = mainPage.createPlaylist(name); + Assert.assertTrue(mainPage.isPlaylistExist1(playlistId, name)); + + } +} diff --git a/src/test/java/enums_my/BrowserType_my.java b/src/test/java/enums_my/BrowserType_my.java new file mode 100644 index 0000000..1ee45dd --- /dev/null +++ b/src/test/java/enums_my/BrowserType_my.java @@ -0,0 +1,8 @@ +package enums_my; + +public enum BrowserType_my { + CHROME, + FIREFOX, + EDGE, + OPERA +} diff --git a/src/test/java/helpers_my/BrowserFabric_my.java b/src/test/java/helpers_my/BrowserFabric_my.java new file mode 100644 index 0000000..4ee9864 --- /dev/null +++ b/src/test/java/helpers_my/BrowserFabric_my.java @@ -0,0 +1,62 @@ +package helpers_my; + +import enums_my.BrowserType_my; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.chrome.ChromeDriver; +import org.openqa.selenium.chrome.ChromeOptions; +import org.openqa.selenium.edge.EdgeDriver; +import org.openqa.selenium.edge.EdgeOptions; +import org.openqa.selenium.firefox.FirefoxDriver; +import org.openqa.selenium.firefox.FirefoxOptions; +import org.openqa.selenium.opera.OperaDriver; +import org.openqa.selenium.opera.OperaOptions; + + +public class BrowserFabric_my { + public static WebDriver getDriver(BrowserType_my browserTypeMy) throws NoSuchMethodException { + switch (browserTypeMy) { + + case CHROME: + return getChromeDriver(); + case FIREFOX: + return getFirefoxDriver(); + case EDGE: + return getEdgeDriver(); + case OPERA: + return getOperaDriver(); + + default: + throw new NoSuchMethodException("Browser not exist"); + } + } + + + private static WebDriver getOperaDriver() { + System.setProperty("webdriver.opera.driver", "operadriver"); + OperaOptions options = new OperaOptions(); + options.addArguments("headless"); + return new OperaDriver(); + } + + private static WebDriver getEdgeDriver() { + System.setProperty("webdriver.edge.driver", "msedgedriver"); + EdgeOptions options = new EdgeOptions(); + return new EdgeDriver(); + } + + private static WebDriver getFirefoxDriver() { + FirefoxOptions options = new FirefoxOptions(); + options.addArguments("--headless"); + options.addArguments("--width=1000"); + options.addArguments("--height=600"); + System.setProperty("webdriver.gecko.driver", "geckodriver"); + return new FirefoxDriver(options); + } + + private static WebDriver getChromeDriver() { + ChromeOptions options = new ChromeOptions(); + options.addArguments("window-size=1400,1000"); + System.setProperty("webdriver.chrome.driver", "chromedriver"); + return new ChromeDriver(options); + } +} diff --git a/src/test/java/helpers_my/DataKoel.java b/src/test/java/helpers_my/DataKoel.java new file mode 100644 index 0000000..4c5bc98 --- /dev/null +++ b/src/test/java/helpers_my/DataKoel.java @@ -0,0 +1,27 @@ +package helpers_my; + +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; +import models.Data; +import models_my.DataKoelResponse; +import models_my.TokenKoel; + +import static io.restassured.RestAssured.given; + +public class DataKoel { + public static DataKoelResponse get(){ + String token = TokenHelper_my.get(); + var response = given() + .baseUri("https://koelapp.testpro.io/") + .basePath("api/data") + .header("Authorization", "Bearer "+token) + .when() + .get() + .then() + .statusCode(200) + .extract() + .response(); + JsonPath jsonPath = response.jsonPath(); + return jsonPath.getObject("$", DataKoelResponse.class); + } +} diff --git a/src/test/java/helpers_my/DbAdapter_my.java b/src/test/java/helpers_my/DbAdapter_my.java new file mode 100644 index 0000000..912ac7c --- /dev/null +++ b/src/test/java/helpers_my/DbAdapter_my.java @@ -0,0 +1,5 @@ +package helpers_my; + +public class DbAdapter_my { + +} diff --git a/src/test/java/helpers_my/GetScreenshot.java b/src/test/java/helpers_my/GetScreenshot.java new file mode 100644 index 0000000..be0ff65 --- /dev/null +++ b/src/test/java/helpers_my/GetScreenshot.java @@ -0,0 +1,21 @@ +package helpers_my; + +import org.apache.commons.io.FileUtils; +import org.openqa.selenium.OutputType; +import org.openqa.selenium.TakesScreenshot; +import org.openqa.selenium.WebDriver; + +import java.io.File; +import java.io.IOException; + +public class GetScreenshot { + public static void capture(WebDriver driver, String filename){ + try{ + TakesScreenshot takesScreenshot = (TakesScreenshot)driver; + File file = takesScreenshot.getScreenshotAs(OutputType.FILE); + FileUtils.copyFile(file, new File("./screenshots_my/" + filename + ".png")); + } catch (IOException exception) { + System.out.println("File write error "+exception.getMessage()); + } + } +} diff --git a/src/test/java/helpers_my/TestDataGenerator_my.java b/src/test/java/helpers_my/TestDataGenerator_my.java new file mode 100644 index 0000000..1697878 --- /dev/null +++ b/src/test/java/helpers_my/TestDataGenerator_my.java @@ -0,0 +1,35 @@ +package helpers_my; + +import models_my.Category_my; +import models_my.PetRequest_my; +import models_my.PlaylistKoel; +import models_my.Tag; +import org.apache.commons.lang3.RandomStringUtils; + +import java.util.Random; + +public class TestDataGenerator_my { + public static String randomString(int length) { + boolean useLetters = true; + boolean useNumbers = false; + return RandomStringUtils.random(length, useLetters, useNumbers); + + } + + public static PetRequest_my postRandomPet() { + Random rand = new Random(); + Category_my cat = new Category_my(rand.nextInt(100), randomString(10)); + String[] photoUrl = {randomString(12)}; + Tag tag = new Tag(rand.nextInt(50), randomString(8)); + Tag[] tags = {tag}; + return new PetRequest_my(cat, randomString(11), photoUrl, tags, randomString(5)); + } + + public static PlaylistKoel createPlaylistRequest() { + return new PlaylistKoel(randomString(9)); + } + + public static PlaylistKoel renamePlaylistRequest() { + return new PlaylistKoel(randomString(10)); + } +} diff --git a/src/test/java/helpers_my/TokenHelper_my.java b/src/test/java/helpers_my/TokenHelper_my.java new file mode 100644 index 0000000..1fc7de7 --- /dev/null +++ b/src/test/java/helpers_my/TokenHelper_my.java @@ -0,0 +1,30 @@ +package helpers_my; + +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; +import models_my.CredentialsKoel; +import models_my.TokenKoel; + +import static io.restassured.RestAssured.given; + +public class TokenHelper_my { + public static String get(){ + var credentials = new CredentialsKoel("koeluser06@testpro.io", "te$t$tudent"); + Response response = given() + .baseUri("https://koelapp.testpro.io/") + .basePath("api/me") + .header("Content-Type", "application/json") + .header("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjM3LCJpc3MiOiJodHRwczovL2tvZWxhcHAudGVzdHByby5pby9hcGkvbWUiLCJpYXQiOjE2MDIxMDg3ODcsImV4cCI6MTYwMjcxMzU4NywibmJmIjoxNjAyMTA4Nzg3LCJqdGkiOiI3UUM1ZUh4ZllaYkV4RkpDIn0.FGUeAHrxJmaXhS2wj1g2lDQsV-yZOLA3r-sCgupwTzM") + .body(credentials) + .when() + .post() + .then() + .statusCode(200) + .extract() + .response(); + JsonPath jsonPath = response.jsonPath(); + TokenKoel tokenResponse = jsonPath.getObject("$", TokenKoel.class); +// String token = jsonPath.getString("token"); + return tokenResponse.getToken(); + } +} diff --git a/src/test/java/koel_PageObjects_My/BasePage_my.java b/src/test/java/koel_PageObjects_My/BasePage_my.java new file mode 100644 index 0000000..09878fe --- /dev/null +++ b/src/test/java/koel_PageObjects_My/BasePage_my.java @@ -0,0 +1,28 @@ +package koel_PageObjects_My; + +import org.openqa.selenium.*; +import org.openqa.selenium.support.ui.FluentWait; +import org.openqa.selenium.support.ui.WebDriverWait; + +import java.time.Duration; + +public class BasePage_my { + protected WebDriver driver; + protected FluentWait fluentWait; + protected WebDriverWait wait; + + public BasePage_my(WebDriver driver) { + this.driver = driver; + fluentWait = new FluentWait<>(driver); + fluentWait.withTimeout(Duration.ofSeconds(5)); + fluentWait.pollingEvery(Duration.ofMillis(5)); + fluentWait.ignoring(ElementClickInterceptedException.class); + fluentWait.ignoring(ElementNotVisibleException.class); + fluentWait.ignoring(NoSuchElementException.class); + fluentWait.ignoring(NoSuchWindowException.class); + fluentWait.ignoring(TimeoutException.class); + + + wait = new WebDriverWait (driver, 5); + } +} diff --git a/src/test/java/koel_PageObjects_My/LoginPage_my.java b/src/test/java/koel_PageObjects_My/LoginPage_my.java new file mode 100644 index 0000000..a0fdc8c --- /dev/null +++ b/src/test/java/koel_PageObjects_My/LoginPage_my.java @@ -0,0 +1,35 @@ +package koel_PageObjects_My; + +import org.openqa.selenium.*; + +public class LoginPage_my extends BasePage_my { + + public LoginPage_my(WebDriver driver) { + super(driver); + } + + private WebElement getEmail() { + fluentWait.until(x -> x.findElement(By.cssSelector("[type='email']"))); + return driver.findElement(By.cssSelector("[type='email']")); + } + + private WebElement getPassword() { + return driver.findElement(By.cssSelector("[type='password']")); + } + + private WebElement getLogInButton() { + return driver.findElement(By.cssSelector("[type='submit']")); + } + + public void open() { + driver.get("https://koelapp.testpro.io/"); + } + + public MainPage_my logIn (String email, String passwort) { + getEmail().sendKeys(email); + getPassword().sendKeys(passwort); + getLogInButton().click(); + return new MainPage_my(driver); + + } +} diff --git a/src/test/java/koel_PageObjects_My/MainPage_my.java b/src/test/java/koel_PageObjects_My/MainPage_my.java new file mode 100644 index 0000000..a09d36b --- /dev/null +++ b/src/test/java/koel_PageObjects_My/MainPage_my.java @@ -0,0 +1,112 @@ +package koel_PageObjects_My; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.openqa.selenium.*; +import org.openqa.selenium.interactions.Actions; +import org.openqa.selenium.support.ui.ExpectedConditions; + +import java.util.List; + +public class MainPage_my extends BasePage_my { + private static Logger logger = LogManager.getLogger(MainPage_my.class); + + public MainPage_my(WebDriver driver) { + super(driver); + } + + + private WebElement getPlusButton() { + wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(".fa-plus-circle"))); + WebElement button = driver.findElement((By.cssSelector(".fa-plus-circle"))); + Actions action1 = new Actions(driver); + action1.moveToElement(button).perform(); + return button; + } + + private WebElement getNewPlaylistField() { + wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[contains(@placeholder, 'to save')]"))); + return driver.findElement(By.xpath("//*[contains(@placeholder, 'to save')]")); + } + + public String createPlaylist(String name) { + logger.info("create playlist method started"); + getPlusButton().click(); + getNewPlaylistField().sendKeys(name); + logger.info("ENTER pressed"); + getNewPlaylistField().sendKeys(Keys.ENTER); + wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@class='success show']"))); + return driver.getCurrentUrl().split("/")[5]; + } +// With custom wait: + +// public String createPlaylist(String name) { +// ********************************************************* +// for(int i=0; i<20; i++){ +// try{ +// getPlusButton().click(); +// break; +// } catch (ElementClickInterceptedException ignored){ +// +// } +// } +// ********************************************************* +// getNewPlaylistField().sendKeys(name); +// getNewPlaylistField().sendKeys(Keys.ENTER); +// wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@class='success show']"))); +// return driver.getCurrentUrl().split("/")[5]; +// } + + public void renamePlaylist(String playlistId, String newName) { + for(int i=0; i<20; i++){ + try { + logger.info("search for plus button"); + getPlusButton().click(); + logger.warn("Just try warn level "+i); + break; + } catch (ElementClickInterceptedException xx) { + logger.error("Plus button not found - one more retry"); + } + } + JavascriptExecutor js = (JavascriptExecutor) driver; + WebElement element = driver.findElement(By.xpath("//*[@href='#!/playlist/" + playlistId + "']")); + js.executeScript("arguments[0].scrollIntoView();", element); + Actions actions = new Actions(driver); + actions.doubleClick(element).perform(); + wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//*[@class='playlist playlist editing']/*[last()]"))); + WebElement inputField = driver.findElement(By.xpath("//*[@class='playlist playlist editing']/*[last()]")); + actions.doubleClick(inputField).perform(); + inputField.sendKeys(newName); + inputField.sendKeys(Keys.ENTER); + } + + public boolean isPlaylistExist1(String playlistId, String newName) { + List list = driver.findElements(By.xpath("//*[@href='#!/playlist/" + playlistId + "']")); + return list.size() > 0 && list.get(0).getText().equals(newName); + } + + public boolean isPlaylistExist(String id, String playlistId) { + List list = driver.findElements(By.xpath("//*[@href='#!/playlist/" + playlistId + "']")); + return list.size() > 0; + } + +// public boolean isPlaylistExist1(String playlistId, String newName){ +// WebElement element = driver.findElement(By.xpath("//*[@href='#!/playlist/" + playlistId + "']")); +// Actions actions = new Actions(driver); +// actions.doubleClick(element).perform(); +// wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@class='playlist playlist editing']/a"))); +// WebElement field = driver.findElement(By.xpath("//*[@class='playlist playlist editing']/a")); +// field.getText().contains(newName); +// return isPlaylistExist1(playlistId,newName); +// } + + public boolean plusButton() { + try { + fluentWait.until(x -> x.findElement(By.xpath("//*[@id='playlists']/h1/i"))); + + } catch (TimeoutException error) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/src/test/java/koel_PageTests_My/BaseTest_my.java b/src/test/java/koel_PageTests_My/BaseTest_my.java new file mode 100644 index 0000000..db96e8a --- /dev/null +++ b/src/test/java/koel_PageTests_My/BaseTest_my.java @@ -0,0 +1,43 @@ +package koel_PageTests_My; + +import enums_my.BrowserType_my; +import helpers_my.BrowserFabric_my; +import helpers_my.GetScreenshot; +import org.openqa.selenium.WebDriver; +import org.testng.ITestResult; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Parameters; + +public class BaseTest_my { + protected WebDriver driver; + protected String username; + protected String password; + int tt = 0; + + @Parameters ({"username", "password", "browser"}) + + @BeforeMethod + public void beforeEveryTest(String email, String password, String browser) throws NoSuchMethodException { + this.username = email; + this.password = password; +// BrowserType_my browserType_my; +// if (browser.equals("Chrome")){ +// browserType_my=BrowserType_my.CHROME; +// } else { +// browserType_my=BrowserType_my.FIREFOX; +// } + BrowserType_my browserType_my = browser.equals("Chrome") ? BrowserType_my.CHROME : BrowserType_my.FIREFOX; + + driver = BrowserFabric_my.getDriver(browserType_my); + } + + @AfterMethod + public void tearDown(ITestResult iTestResult) throws InterruptedException { + if(iTestResult.getStatus()==iTestResult.FAILURE){ + GetScreenshot.capture(driver, iTestResult.getName()); + } + Thread.sleep(5000); + driver.quit(); + } +} diff --git a/src/test/java/koel_PageTests_My/LoginTest_my.java b/src/test/java/koel_PageTests_My/LoginTest_my.java new file mode 100644 index 0000000..2da9006 --- /dev/null +++ b/src/test/java/koel_PageTests_My/LoginTest_my.java @@ -0,0 +1,85 @@ +package koel_PageTests_My; + +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import org.testng.Assert; +import org.testng.annotations.Test; +import koel_PageObjects_My.LoginPage_my; +import koel_PageObjects_My.MainPage_my; + + +public class LoginTest_my extends BaseTest_my { + + @Test + + public void loginTest1() { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn(username,password); + Assert.assertTrue(mainPage.plusButton()); + } + + @Test (enabled = false) + //TODO later + + public void negativeLoginTest1() { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn("koeluser06@testpro.io","te$t$tuden"); + Assert.assertFalse(mainPage.plusButton()); + } + + @Test + + public void loginTest2() { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn(username,password); + Assert.assertTrue(mainPage.plusButton()); + } + + @Test + + public void negativeLoginTest2() { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn("koeluser06@testpro.io","te$t$tuden"); + Assert.assertFalse(mainPage.plusButton()); + } + @Test + + public void loginTest3() { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn(username,password); + Assert.assertTrue(mainPage.plusButton()); + } + + @Test + + public void negativeLoginTest3() { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn("koeluser06@testpro.io","te$t$tuden"); + Assert.assertFalse(mainPage.plusButton()); + } + + @Test + + public void loginTest4() { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn(username,password); + Assert.assertTrue(mainPage.plusButton()); + } + + @Test + + public void negativeLoginTest4() { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn("koeluser06@testpro.io","te$t$tuden"); + Assert.assertFalse(mainPage.plusButton()); + } + +} diff --git a/src/test/java/koel_PageTests_My/LoginTest_my1.java b/src/test/java/koel_PageTests_My/LoginTest_my1.java new file mode 100644 index 0000000..a5d243c --- /dev/null +++ b/src/test/java/koel_PageTests_My/LoginTest_my1.java @@ -0,0 +1,82 @@ +package koel_PageTests_My; + +import koel_PageObjects_My.LoginPage_my; +import koel_PageObjects_My.MainPage_my; +import org.testng.Assert; +import org.testng.annotations.Test; + + +public class LoginTest_my1 extends BaseTest_my { + + @Test + + public void loginTest11() { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn(username,password); + Assert.assertTrue(mainPage.plusButton()); + } + + @Test + + public void negativeLoginTest11() { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn("koeluser06@testpro.io","te$t$tuden"); + Assert.assertFalse(mainPage.plusButton()); + } + + @Test + + public void loginTest22() { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn(username,password+"1"); + Assert.assertTrue(mainPage.plusButton()); + } + + @Test + + public void negativeLoginTest22() { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn("koeluser06@testpro.io","te$t$tuden"); + Assert.assertFalse(mainPage.plusButton()); + } + @Test + + public void loginTest33() { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn(username,password); + Assert.assertTrue(mainPage.plusButton()); + } + + @Test + + public void negativeLoginTest33() { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn("koeluser06@testpro.io","te$t$tuden"); + Assert.assertFalse(mainPage.plusButton()); + } + + @Test + + public void loginTest44() { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn(username,password); + Assert.assertTrue(mainPage.plusButton()); + } + + @Test + + public void negativeLoginTest44() { + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn("koeluser06@testpro.io","te$t$tuden"); + Assert.assertFalse(mainPage.plusButton()); + } + +} diff --git a/src/test/java/koel_PageTests_My/PlaylistTest_my.java b/src/test/java/koel_PageTests_My/PlaylistTest_my.java new file mode 100644 index 0000000..f202518 --- /dev/null +++ b/src/test/java/koel_PageTests_My/PlaylistTest_my.java @@ -0,0 +1,64 @@ +package koel_PageTests_My; + + +import helpers_my.TestDataGenerator_my; +import org.testng.Assert; +import org.testng.annotations.Test; +import koel_PageObjects_My.LoginPage_my; +import koel_PageObjects_My.MainPage_my; + + +public class PlaylistTest_my extends BaseTest_my { + + @Test + + public void createPlaylistTest1() { + String name = TestDataGenerator_my.randomString(8); + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn(username,password); + String playlistId = mainPage.createPlaylist(name); + Assert.assertTrue(mainPage.isPlaylistExist(playlistId, playlistId)); + + } + + @Test + + public void renamePlaylistTest1() { + String name = TestDataGenerator_my.randomString(8); + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn(username,password); + String playlistId = mainPage.createPlaylist(name); + String newName = TestDataGenerator_my.randomString(8); + mainPage.renamePlaylist(playlistId, newName); + Assert.assertTrue(mainPage.isPlaylistExist1(playlistId, newName)); + + } + + @Test + + public void createPlaylistTest2() { + String name = TestDataGenerator_my.randomString(8); + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn(username,password); + String playlistId = mainPage.createPlaylist(name); + Assert.assertTrue(mainPage.isPlaylistExist(playlistId, playlistId)); + + } + + @Test + + public void renamePlaylistTest2() { + String name = TestDataGenerator_my.randomString(8); + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn(username,password); + String playlistId = mainPage.createPlaylist(name); + String newName = TestDataGenerator_my.randomString(8); + mainPage.renamePlaylist(playlistId, newName); + Assert.assertTrue(mainPage.isPlaylistExist1(playlistId, newName)); + + } +} diff --git a/src/test/java/koel_PageTests_My/PlaylistTest_my1.java b/src/test/java/koel_PageTests_My/PlaylistTest_my1.java new file mode 100644 index 0000000..6883cd5 --- /dev/null +++ b/src/test/java/koel_PageTests_My/PlaylistTest_my1.java @@ -0,0 +1,71 @@ +package koel_PageTests_My; + + +import helpers_my.TestDataGenerator_my; +import koel_PageObjects_My.LoginPage_my; +import koel_PageObjects_My.MainPage_my; +import listeners_my.RetryAnalyzer_my; +import org.testng.Assert; +import org.testng.annotations.Test; + + +public class PlaylistTest_my1 extends BaseTest_my { + + @Test + + public void createPlaylistTest11() { + String name = TestDataGenerator_my.randomString(8); + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn(username,password); + String playlistId = mainPage.createPlaylist(name); + Assert.assertTrue(mainPage.isPlaylistExist(playlistId, playlistId)); + + } + + @Test (retryAnalyzer = RetryAnalyzer_my.class) + + public void renamePlaylistTest11() { + String name = TestDataGenerator_my.randomString(8); + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn(username,password); + String playlistId = mainPage.createPlaylist(name); + String newName = TestDataGenerator_my.randomString(8); + mainPage.renamePlaylist(playlistId, newName); + boolean xx = false; + if(tt==2){ + xx = true; + } + tt++; + Assert.assertTrue(xx); + + + } + + @Test + + public void createPlaylistTest22() { + String name = TestDataGenerator_my.randomString(8); + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn(username,password); + String playlistId = mainPage.createPlaylist(name); + Assert.assertTrue(mainPage.isPlaylistExist(playlistId, playlistId)); + + } + + @Test + + public void renamePlaylistTest22() { + String name = TestDataGenerator_my.randomString(8); + LoginPage_my loginPage = new LoginPage_my(driver); + loginPage.open(); + MainPage_my mainPage = loginPage.logIn(username,password); + String playlistId = mainPage.createPlaylist(name); + String newName = TestDataGenerator_my.randomString(8); + mainPage.renamePlaylist(playlistId, newName); + Assert.assertTrue(mainPage.isPlaylistExist1(playlistId, newName)); + + } +} diff --git a/src/test/java/listeners_my/Listeners_my.java b/src/test/java/listeners_my/Listeners_my.java new file mode 100644 index 0000000..48629d3 --- /dev/null +++ b/src/test/java/listeners_my/Listeners_my.java @@ -0,0 +1,43 @@ +package listeners_my; + +import org.testng.ITestContext; +import org.testng.ITestListener; +import org.testng.ITestResult; + +public class Listeners_my implements ITestListener { + @Override + public void onTestStart(ITestResult iTestResult) { + System.out.println("Test "+iTestResult.getName()); + } + + @Override + public void onTestSuccess(ITestResult iTestResult) { + + } + + @Override + public void onTestFailure(ITestResult iTestResult) { + + } + + @Override + public void onTestSkipped(ITestResult iTestResult) { + System.out.println("Test is skipped "+iTestResult.getName()); + + } + + @Override + public void onTestFailedButWithinSuccessPercentage(ITestResult iTestResult) { + System.out.println("Retry for test "+iTestResult.getName()); + } + + @Override + public void onStart(ITestContext iTestContext) { + + } + + @Override + public void onFinish(ITestContext iTestContext) { + + } +} diff --git a/src/test/java/listeners_my/RetryAnalyzer_my.java b/src/test/java/listeners_my/RetryAnalyzer_my.java new file mode 100644 index 0000000..ab35c8b --- /dev/null +++ b/src/test/java/listeners_my/RetryAnalyzer_my.java @@ -0,0 +1,20 @@ +package listeners_my; + +import org.testng.IRetryAnalyzer; +import org.testng.ITestResult; + +public class RetryAnalyzer_my implements IRetryAnalyzer { + private int retryCount = 0; + private static final int maxRetryCount = 3; + + @Override + public boolean retry(ITestResult result) { + if (retryCount < maxRetryCount) { + retryCount++; + return true; + } + return false; + } + + +} diff --git a/src/test/java/models_my/Album.java b/src/test/java/models_my/Album.java new file mode 100644 index 0000000..b3e4bfe --- /dev/null +++ b/src/test/java/models_my/Album.java @@ -0,0 +1,7 @@ +package models_my; + +public class Album { + public int id; + public int artist_id; + public String name; +} diff --git a/src/test/java/models_my/Artist.java b/src/test/java/models_my/Artist.java new file mode 100644 index 0000000..a2dd775 --- /dev/null +++ b/src/test/java/models_my/Artist.java @@ -0,0 +1,11 @@ +package models_my; + +public class Artist { + public int id; + public String name; + + public Artist(int id, String name) { + this.id = id; + this.name = name; + } +} diff --git a/src/test/java/models_my/Category_my.java b/src/test/java/models_my/Category_my.java new file mode 100644 index 0000000..6a0c32a --- /dev/null +++ b/src/test/java/models_my/Category_my.java @@ -0,0 +1,19 @@ +package models_my; + +public class Category_my { + private int id; + private String name; + + public int getCategory_id() { + return id; + } + + public Category_my(int id, String name) { + this.id = id; + this.name = name; + } + + public String getCategory_name() { + return name; + } +} diff --git a/src/test/java/models_my/CredentialsKoel.java b/src/test/java/models_my/CredentialsKoel.java new file mode 100644 index 0000000..bfcdf84 --- /dev/null +++ b/src/test/java/models_my/CredentialsKoel.java @@ -0,0 +1,11 @@ +package models_my; + +public class CredentialsKoel { + private String email; + private String password; + + public CredentialsKoel(String email, String password) { + this.email = email; + this.password = password; + } +} diff --git a/src/test/java/models_my/CurrentUser.java b/src/test/java/models_my/CurrentUser.java new file mode 100644 index 0000000..921feac --- /dev/null +++ b/src/test/java/models_my/CurrentUser.java @@ -0,0 +1,9 @@ +package models_my; + +public class CurrentUser { + public int id; + public String name; + public String email; + public boolean is_admin; + public Preferences[] preferences; +} diff --git a/src/test/java/models_my/DataKoelResponse.java b/src/test/java/models_my/DataKoelResponse.java new file mode 100644 index 0000000..b6c7215 --- /dev/null +++ b/src/test/java/models_my/DataKoelResponse.java @@ -0,0 +1,27 @@ +package models_my; + +public class DataKoelResponse { + + private Album[] albums; + private boolean allowDownload; + private Artist[] artists; + private String cdnUrl; + private CurrentUser currentUser; + private String currentVersion; + private Interaction[] interactions; + private String latestVersion; + private Playlist[] playlists; + private String[] recentlyPlayed; + private Settings[] settings; + private Song[] songs; + private boolean supportsTranscoding; + private boolean useLastfm; + private boolean useYouTube; + private boolean useiTunes; + private Users[] users; + + public Playlist[] getPlaylists() { + return playlists; + } + +} diff --git a/src/test/java/models_my/Interaction.java b/src/test/java/models_my/Interaction.java new file mode 100644 index 0000000..ad8f9af --- /dev/null +++ b/src/test/java/models_my/Interaction.java @@ -0,0 +1,7 @@ +package models_my; + +public class Interaction { + public String song_id; + public boolean liked; + public int play_count; +} diff --git a/src/test/java/models_my/PetRequest_my.java b/src/test/java/models_my/PetRequest_my.java new file mode 100644 index 0000000..9d55abf --- /dev/null +++ b/src/test/java/models_my/PetRequest_my.java @@ -0,0 +1,43 @@ +package models_my; + +public class PetRequest_my { + private long id; + private Category_my category; + private String name; + private String[] photoUrls; + + public long getId() { + return id; + } + + public Category_my getCategory() { + return category; + } + + public String getName() { + return name; + } + + public String[] getPhotoUrls() { + return photoUrls; + } + + public Tag[] getTags() { + return tags; + } + + public String getStatus() { + return status; + } + + private Tag[] tags; + private String status; + + public PetRequest_my(Category_my category, String name, String[] photoUrls, Tag[] tags, String status) { + this.category = category; + this.name = name; + this.photoUrls = photoUrls; + this.tags = tags; + this.status = status; + } +} diff --git a/src/test/java/models_my/PetResponse_my.java b/src/test/java/models_my/PetResponse_my.java new file mode 100644 index 0000000..cca3748 --- /dev/null +++ b/src/test/java/models_my/PetResponse_my.java @@ -0,0 +1,34 @@ +package models_my; + +public class PetResponse_my { + private long id; + private Category_my category; + private String name; + private String[] photoUrls; + private Tag[] tags; + private String status; + + public long getId() { + return id; + } + + public Category_my getCategory() { + return category; + } + + public String getName() { + return name; + } + + public String[] getPhotoUrls() { + return photoUrls; + } + + public Tag[] getTags() { + return tags; + } + + public String getStatus() { + return status; + } +} diff --git a/src/test/java/models_my/Playlist.java b/src/test/java/models_my/Playlist.java new file mode 100644 index 0000000..6b18c0f --- /dev/null +++ b/src/test/java/models_my/Playlist.java @@ -0,0 +1,18 @@ +package models_my; + +public class Playlist { + private String name; + private int id; + + public Playlist(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public int getId() { + return id; + } +} diff --git a/src/test/java/models_my/PlaylistKoel.java b/src/test/java/models_my/PlaylistKoel.java new file mode 100644 index 0000000..be00cf3 --- /dev/null +++ b/src/test/java/models_my/PlaylistKoel.java @@ -0,0 +1,18 @@ +package models_my; + +public class PlaylistKoel { + private String name; + private int id; + + public String getName() { + return name; + } + + public int getId() { + return id; + } + + public PlaylistKoel(String name) { + this.name = name; + } +} diff --git a/src/test/java/models_my/Preferences.java b/src/test/java/models_my/Preferences.java new file mode 100644 index 0000000..09821f6 --- /dev/null +++ b/src/test/java/models_my/Preferences.java @@ -0,0 +1,5 @@ +package models_my; + +public class Preferences { + public String lastfm_session_key; +} diff --git a/src/test/java/models_my/Settings.java b/src/test/java/models_my/Settings.java new file mode 100644 index 0000000..cf54c86 --- /dev/null +++ b/src/test/java/models_my/Settings.java @@ -0,0 +1,5 @@ +package models_my; + +public class Settings { + public String media_path; +} diff --git a/src/test/java/models_my/Song.java b/src/test/java/models_my/Song.java new file mode 100644 index 0000000..2526b96 --- /dev/null +++ b/src/test/java/models_my/Song.java @@ -0,0 +1,12 @@ +package models_my; + +public class Song { + public String id; + public int album_id; + public int artist_id; + public String title; + public String created_at; + public int disc; + public int track; + public double length; +} diff --git a/src/test/java/models_my/Tag.java b/src/test/java/models_my/Tag.java new file mode 100644 index 0000000..58af587 --- /dev/null +++ b/src/test/java/models_my/Tag.java @@ -0,0 +1,19 @@ +package models_my; + +public class Tag { + private int id; + private String name; + + public int getTag_id() { + return id; + } + + public Tag(int id, String name) { + this.id = id; + this.name = name; + } + + public String getTag_name() { + return name; + } +} diff --git a/src/test/java/models_my/TokenKoel.java b/src/test/java/models_my/TokenKoel.java new file mode 100644 index 0000000..ac5811c --- /dev/null +++ b/src/test/java/models_my/TokenKoel.java @@ -0,0 +1,9 @@ +package models_my; + +public class TokenKoel { + private String token; + + public String getToken() { + return token; + } +} diff --git a/src/test/java/models_my/Users.java b/src/test/java/models_my/Users.java new file mode 100644 index 0000000..d83d920 --- /dev/null +++ b/src/test/java/models_my/Users.java @@ -0,0 +1,8 @@ +package models_my; + +public class Users { + public int id; + public String name; + public String email; + public boolean is_admin; +} diff --git a/src/test/java/pageTests/BaseTest.java b/src/test/java/pageTests/BaseTest.java index 2d61c0e..13c92b3 100644 --- a/src/test/java/pageTests/BaseTest.java +++ b/src/test/java/pageTests/BaseTest.java @@ -1,40 +1,21 @@ -package pageTests; - -import enums.BrowserType; -import helper.BrowserFabric; -import helper.GetScreenShot; -import org.openqa.selenium.WebDriver; -import org.testng.ITestResult; -import org.testng.annotations.AfterMethod; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Parameters; - -public class BaseTest { - protected WebDriver driver; - protected String username; - protected String password; - int tt=0; - - @Parameters({"username","password","browser"}) - @BeforeMethod - public void startUp(String email, String password, String browser) throws NoSuchMethodException { - username = email; - this.password=password; -// BrowserType browserType; -// if(browser.equals("Chrome")){ -// browserType=BrowserType.CHROME; -// } else { -// browserType=BrowserType.FIREFOX; -// } - BrowserType browserType = browser.equals("Chrome") ? BrowserType.CHROME : BrowserType.FIREFOX; - driver = BrowserFabric.getDriver(browserType); - } - @AfterMethod - public void tearDown(ITestResult iTestResult) throws InterruptedException { - if(iTestResult.getStatus()==iTestResult.FAILURE){ - GetScreenShot.capture(driver,iTestResult.getName()); - } - Thread.sleep(5000); - driver.quit(); - } -} \ No newline at end of file +//package pageTests; +// +//import enums.BrowserType; +//import helper.BrowserFabric; +//import org.openqa.selenium.WebDriver; +//import org.testng.annotations.AfterMethod; +//import org.testng.annotations.BeforeMethod; +// +//public class BaseTest { +// protected WebDriver driver; +// +// @BeforeMethod +// public void startUp() throws NoSuchMethodException { +// driver = BrowserFabric.getDriver(BrowserType.FIREFOX); +// } +// @AfterMethod +// public void teatDown() throws InterruptedException { +// Thread.sleep(5000); +// driver.quit(); +// } +//} \ No newline at end of file diff --git a/src/test/java/pageTests/LoginTest.java b/src/test/java/pageTests/LoginTest.java index c1ae997..510be4c 100644 --- a/src/test/java/pageTests/LoginTest.java +++ b/src/test/java/pageTests/LoginTest.java @@ -1,52 +1,41 @@ -package pageTests; - -import org.testng.Assert; -import org.testng.annotations.Test; -import pageObjects.LoginPage; -import pageObjects.MainPage; - -public class LoginTest extends BaseTest { - @Test - public void loginTest(){ - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,password); - Assert.assertTrue(mainPage.isLogoutButton()); - } - @Test(enabled=false) - // TODO Update test later - public void wrongLoginTest(){ - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,"88888888"); - Assert.assertFalse(mainPage.isLogoutButton()); - } - @Test - public void loginTest1(){ - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,password); - Assert.assertTrue(mainPage.isLogoutButton()); - } - @Test - public void wrongLoginTest1(){ - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,"88888888"); - Assert.assertFalse(mainPage.isLogoutButton()); - } - @Test - public void loginTest2(){ - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,password); - Assert.assertTrue(mainPage.isLogoutButton()); - } - @Test - public void wrongLoginTest2(){ - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,"88888888"); - Assert.assertFalse(mainPage.isLogoutButton()); - } -} +//package pageTests; +// +//import org.openqa.selenium.WebDriver; +//import org.openqa.selenium.chrome.ChromeDriver; +//import org.testng.Assert; +//import org.testng.annotations.AfterMethod; +//import org.testng.annotations.BeforeMethod; +//import org.testng.annotations.Test; +//import pageObjects.LoginPage; +//import pageObjects.MainPage; +// +// +//public class LoginTest { +// private WebDriver driver; +// +// @BeforeMethod +// public void startUp(){ +// System.setProperty("webdriver.chrome.driver","chromedriver.exe"); +// driver = new ChromeDriver(); +// +// } +// @AfterMethod +// public void teatDown() throws InterruptedException { +// Thread.sleep(5000); +// driver.quit(); +// } +// @Test +// public void loginTest(){ +// LoginPage loginPage = new LoginPage(driver); +// loginPage.open(); +// MainPage mainPage = loginPage.logIn("koeluser06@testpro.io","te$t$tudent"); +// Assert.assertTrue(mainPage.isLogoutButton()); +// } +// @Test +// public void wrongLoginTest(){ +// LoginPage loginPage = new LoginPage(driver); +// loginPage.open(); +// MainPage mainPage = loginPage.logIn("koeluser06@testpro.io","88888888"); +// Assert.assertFalse(mainPage.isLogoutButton()); +// } +//} diff --git a/src/test/java/pageTests/LoginTest2.java b/src/test/java/pageTests/LoginTest2.java index 8076e96..483cba7 100644 --- a/src/test/java/pageTests/LoginTest2.java +++ b/src/test/java/pageTests/LoginTest2.java @@ -1,51 +1,51 @@ -package pageTests; - -import org.testng.Assert; -import org.testng.annotations.Test; -import pageObjects.LoginPage; -import pageObjects.MainPage; - -public class LoginTest2 extends BaseTest { - @Test - public void loginTestx(){ - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,password); - Assert.assertTrue(mainPage.isLogoutButton()); - } - @Test - public void wrongLoginTestx(){ - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,"88888888"); - Assert.assertFalse(mainPage.isLogoutButton()); - } - @Test - public void loginTest1x(){ - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,password+"1"); - Assert.assertTrue(mainPage.isLogoutButton()); - } - @Test - public void wrongLoginTest1x(){ - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,"88888888"); - Assert.assertFalse(mainPage.isLogoutButton()); - } - @Test - public void loginTest2x(){ - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,password); - Assert.assertTrue(mainPage.isLogoutButton()); - } - @Test - public void wrongLoginTest2x(){ - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,"88888888"); - Assert.assertFalse(mainPage.isLogoutButton()); - } -} +//package pageTests; +// +//import org.testng.Assert; +//import org.testng.annotations.Test; +//import pageObjects.LoginPage; +//import pageObjects.MainPage; +// +//public class LoginTest2 extends BaseTest { +// @Test +// public void loginTestx(){ +// LoginPage loginPage = new LoginPage(driver); +// loginPage.open(); +// MainPage mainPage = loginPage.logIn(username,password); +// Assert.assertTrue(mainPage.isLogoutButton()); +// } +// @Test +// public void wrongLoginTestx(){ +// LoginPage loginPage = new LoginPage(driver); +// loginPage.open(); +// MainPage mainPage = loginPage.logIn(username,"88888888"); +// Assert.assertFalse(mainPage.isLogoutButton()); +// } +// @Test +// public void loginTest1x(){ +// LoginPage loginPage = new LoginPage(driver); +// loginPage.open(); +// MainPage mainPage = loginPage.logIn(username,password+"1"); +// Assert.assertTrue(mainPage.isLogoutButton()); +// } +// @Test +// public void wrongLoginTest1x(){ +// LoginPage loginPage = new LoginPage(driver); +// loginPage.open(); +// MainPage mainPage = loginPage.logIn(username,"88888888"); +// Assert.assertFalse(mainPage.isLogoutButton()); +// } +// @Test +// public void loginTest2x(){ +// LoginPage loginPage = new LoginPage(driver); +// loginPage.open(); +// MainPage mainPage = loginPage.logIn(username,password); +// Assert.assertTrue(mainPage.isLogoutButton()); +// } +// @Test +// public void wrongLoginTest2x(){ +// LoginPage loginPage = new LoginPage(driver); +// loginPage.open(); +// MainPage mainPage = loginPage.logIn(username,"88888888"); +// Assert.assertFalse(mainPage.isLogoutButton()); +// } +//} diff --git a/src/test/java/pageTests/PlaylistTest.java b/src/test/java/pageTests/PlaylistTest.java index e162039..7c92423 100644 --- a/src/test/java/pageTests/PlaylistTest.java +++ b/src/test/java/pageTests/PlaylistTest.java @@ -1,56 +1,56 @@ -package pageTests; - -import helper.TestDataGenerator; -import org.testng.Assert; -import org.testng.annotations.Test; -import pageObjects.LoginPage; -import pageObjects.MainPage; - - -public class PlaylistTest extends BaseTest{ - - @Test - public void createPlaylistTest(){ - String name = TestDataGenerator.randomString(8); - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,password); - String playlistId = mainPage.createPlaylist(name); - Assert.assertTrue(mainPage.isPlaylistExist(playlistId, name)); - } - @Test - public void renamePlaylistTest(){ - String name = TestDataGenerator.randomString(8); - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,password); - String playlistId = mainPage.createPlaylist(name); - - String newName = TestDataGenerator.randomString(8); - mainPage.renamePlaylist(playlistId, newName); - - Assert.assertTrue(mainPage.isPlaylistExist(playlistId, newName)); - } - @Test - public void createPlaylistTest1(){ - String name = TestDataGenerator.randomString(8); - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,password); - String playlistId = mainPage.createPlaylist(name); - Assert.assertTrue(mainPage.isPlaylistExist(playlistId, name)); - } - @Test - public void renamePlaylistTest2(){ - String name = TestDataGenerator.randomString(8); - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,password); - String playlistId = mainPage.createPlaylist(name); - - String newName = TestDataGenerator.randomString(8); - mainPage.renamePlaylist(playlistId, newName); - - Assert.assertTrue(mainPage.isPlaylistExist(playlistId, newName)); - } -} +//package pageTests; +// +//import helper.TestDataGenerator; +//import org.testng.Assert; +//import org.testng.annotations.Test; +//import pageObjects.LoginPage; +//import pageObjects.MainPage; +// +// +//public class PlaylistTest extends BaseTest{ +// +// @Test +// public void createPlaylistTest(){ +// String name = TestDataGenerator.randomString(8); +// LoginPage loginPage = new LoginPage(driver); +// loginPage.open(); +// MainPage mainPage = loginPage.logIn(username,password); +// String playlistId = mainPage.createPlaylist(name); +// Assert.assertTrue(mainPage.isPlaylistExist(playlistId, name)); +// } +// @Test +// public void renamePlaylistTest(){ +// String name = TestDataGenerator.randomString(8); +// LoginPage loginPage = new LoginPage(driver); +// loginPage.open(); +// MainPage mainPage = loginPage.logIn(username,password); +// String playlistId = mainPage.createPlaylist(name); +// +// String newName = TestDataGenerator.randomString(8); +// mainPage.renamePlaylist(playlistId, newName); +// +// Assert.assertTrue(mainPage.isPlaylistExist(playlistId, newName)); +// } +// @Test +// public void createPlaylistTest1(){ +// String name = TestDataGenerator.randomString(8); +// LoginPage loginPage = new LoginPage(driver); +// loginPage.open(); +// MainPage mainPage = loginPage.logIn(username,password); +// String playlistId = mainPage.createPlaylist(name); +// Assert.assertTrue(mainPage.isPlaylistExist(playlistId, name)); +// } +// @Test +// public void renamePlaylistTest2(){ +// String name = TestDataGenerator.randomString(8); +// LoginPage loginPage = new LoginPage(driver); +// loginPage.open(); +// MainPage mainPage = loginPage.logIn(username,password); +// String playlistId = mainPage.createPlaylist(name); +// +// String newName = TestDataGenerator.randomString(8); +// mainPage.renamePlaylist(playlistId, newName); +// +// Assert.assertTrue(mainPage.isPlaylistExist(playlistId, newName)); +// } +//} diff --git a/src/test/java/pageTests/PlaylistTest2.java b/src/test/java/pageTests/PlaylistTest2.java index 4947a53..9b02a93 100644 --- a/src/test/java/pageTests/PlaylistTest2.java +++ b/src/test/java/pageTests/PlaylistTest2.java @@ -1,63 +1,63 @@ -package pageTests; - -import helper.TestDataGenerator; -import listeners.RetryAnalyzer; -import org.testng.Assert; -import org.testng.annotations.Test; -import pageObjects.LoginPage; -import pageObjects.MainPage; - - -public class PlaylistTest2 extends BaseTest{ - - @Test - public void createPlaylistTestx(){ - String name = TestDataGenerator.randomString(8); - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,password); - String playlistId = mainPage.createPlaylist(name); - Assert.assertTrue(mainPage.isPlaylistExist(playlistId, name)); - } - @Test - public void renamePlaylistTestx(){ - String name = TestDataGenerator.randomString(8); - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,password); - String playlistId = mainPage.createPlaylist(name); - - String newName = TestDataGenerator.randomString(8); - mainPage.renamePlaylist(playlistId, newName); - - Assert.assertTrue(mainPage.isPlaylistExist(playlistId, newName)); - } - @Test(retryAnalyzer = RetryAnalyzer.class) - public void createPlaylistTest1x(){ - String name = TestDataGenerator.randomString(8); - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,password); - String playlistId = mainPage.createPlaylist(name); - boolean xx = false; - if(tt==2){ - xx=true; - } - tt++; - Assert.assertTrue(xx); - - } - @Test - public void renamePlaylistTest2x(){ - String name = TestDataGenerator.randomString(8); - LoginPage loginPage = new LoginPage(driver); - loginPage.open(); - MainPage mainPage = loginPage.logIn(username,password); - String playlistId = mainPage.createPlaylist(name); - - String newName = TestDataGenerator.randomString(8); - mainPage.renamePlaylist(playlistId, newName); - - Assert.assertTrue(mainPage.isPlaylistExist(playlistId, newName)); - } -} +//package pageTests; +// +//import helper.TestDataGenerator; +//import listeners.RetryAnalyzer; +//import org.testng.Assert; +//import org.testng.annotations.Test; +//import pageObjects.LoginPage; +//import pageObjects.MainPage; +// +// +//public class PlaylistTest2 extends BaseTest{ +// +// @Test +// public void createPlaylistTestx(){ +// String name = TestDataGenerator.randomString(8); +// LoginPage loginPage = new LoginPage(driver); +// loginPage.open(); +// MainPage mainPage = loginPage.logIn(username,password); +// String playlistId = mainPage.createPlaylist(name); +// Assert.assertTrue(mainPage.isPlaylistExist(playlistId, name)); +// } +// @Test +// public void renamePlaylistTestx(){ +// String name = TestDataGenerator.randomString(8); +// LoginPage loginPage = new LoginPage(driver); +// loginPage.open(); +// MainPage mainPage = loginPage.logIn(username,password); +// String playlistId = mainPage.createPlaylist(name); +// +// String newName = TestDataGenerator.randomString(8); +// mainPage.renamePlaylist(playlistId, newName); +// +// Assert.assertTrue(mainPage.isPlaylistExist(playlistId, newName)); +// } +// @Test(retryAnalyzer = RetryAnalyzer.class) +// public void createPlaylistTest1x(){ +// String name = TestDataGenerator.randomString(8); +// LoginPage loginPage = new LoginPage(driver); +// loginPage.open(); +// MainPage mainPage = loginPage.logIn(username,password); +// String playlistId = mainPage.createPlaylist(name); +// boolean xx = false; +// if(tt==2){ +// xx=true; +// } +// tt++; +// Assert.assertTrue(xx); +// +// } +// @Test +// public void renamePlaylistTest2x(){ +// String name = TestDataGenerator.randomString(8); +// LoginPage loginPage = new LoginPage(driver); +// loginPage.open(); +// MainPage mainPage = loginPage.logIn(username,password); +// String playlistId = mainPage.createPlaylist(name); +// +// String newName = TestDataGenerator.randomString(8); +// mainPage.renamePlaylist(playlistId, newName); +// +// Assert.assertTrue(mainPage.isPlaylistExist(playlistId, newName)); +// } +//} diff --git a/src/test/java/petStoreTestApi_my/CreatePet_my.java b/src/test/java/petStoreTestApi_my/CreatePet_my.java new file mode 100644 index 0000000..9ffcd82 --- /dev/null +++ b/src/test/java/petStoreTestApi_my/CreatePet_my.java @@ -0,0 +1,51 @@ +package petStoreTestApi_my; + +import helpers_my.TestDataGenerator_my; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; +import models_my.PetRequest_my; +import models_my.PetResponse_my; +import org.openqa.selenium.json.Json; +import org.testng.Assert; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.Test; + +import static io.restassured.RestAssured.given; + +public class CreatePet_my { + private long petId; + @AfterMethod + public void tearDown(){ + Response response = given() + .baseUri("https://petstore.swagger.io/v2/pet/"+petId) + .when() + .delete(); + } + @Test + public void createPet(){ + PetRequest_my petRequest = TestDataGenerator_my.postRandomPet(); + Response response = given() + .baseUri("https://petstore.swagger.io/v2/pet") + .header("Content-Type", "application/json") + .body(petRequest) + .when() + .post() + .then() + .statusCode(200) + .extract() + .response(); + JsonPath jsonPath = response.jsonPath(); + PetResponse_my petResponse = jsonPath.getObject("$", PetResponse_my.class); + System.out.println(petResponse.getId()); + petId = petResponse.getId(); + Assert.assertEquals(petRequest.getStatus(),petResponse.getStatus()); + Assert.assertEquals(petRequest.getName(),petResponse.getName()); + Assert.assertEquals(petRequest.getCategory().getCategory_id(),petResponse.getCategory().getCategory_id()); + + + String nameResponse = jsonPath.getObject("name", String.class); + System.out.println(nameResponse); + String nameResponse1 = jsonPath.getString("name"); + System.out.println(nameResponse1); + } +} diff --git a/src/test/java/petStoreTestApi_my/GetPet_my.java b/src/test/java/petStoreTestApi_my/GetPet_my.java new file mode 100644 index 0000000..2c2798e --- /dev/null +++ b/src/test/java/petStoreTestApi_my/GetPet_my.java @@ -0,0 +1,46 @@ +package petStoreTestApi_my; + +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; +import models_my.PetResponse_my; +import org.testng.Assert; +import org.testng.annotations.Test; +import static io.restassured.RestAssured.given; + +public class GetPet_my { + @Test + public void getPetById_PetReturned(){ + //Var 1 + Response response = given() + .baseUri("https://petstore.swagger.io/v2") + .basePath("/pet/1111") + .when() + .get() + .then() + .statusCode(200) + .extract() + .response(); + JsonPath body = response.jsonPath(); +// System.out.println(body.prettify()); + + PetResponse_my mouse = body.getObject("$", PetResponse_my.class); + Assert.assertEquals(mouse.getName(), "Mickey"); + Assert.assertEquals(mouse.getStatus(), "available"); + Assert.assertEquals(mouse.getId(), 1111); + Assert.assertEquals(mouse.getCategory().getCategory_name(), "Mouse"); + Assert.assertEquals(mouse.getCategory().getCategory_id(), 26); + +//String body = response.asString(); +// Assert.assertTrue(body.contains("Mickey")); + +// System.out.println(response.asString()); + //Var 2 +// given() +// .baseUri("https://petstore.swagger.io/v2") +// .basePath("/pet/1001") +// .when() +// .get() +// .then() +// .statusCode(200); + } +} diff --git a/src/test/java/simpleTest/GoogleSearch.java b/src/test/java/simpleTest/GoogleSearch.java index 9907e97..afa0cdb 100644 --- a/src/test/java/simpleTest/GoogleSearch.java +++ b/src/test/java/simpleTest/GoogleSearch.java @@ -12,7 +12,7 @@ public class GoogleSearch { @Test public void searchJavaInGoogle_ResultReturned() { // Arrange - System.setProperty("webdriver.chrome.driver","chromedriver.exe"); + System.setProperty("webdriver.chrome.driver","chromedriver"); WebDriver driver = new ChromeDriver(); driver.get("https://www.google.com"); @@ -40,7 +40,7 @@ public void searchJavaInGoogle_ResultReturned() { @Test public void searchJavaInGoogleUsingSearchButton_ResultReturned() { // Arrange - System.setProperty("webdriver.chrome.driver","chromedriver.exe"); + System.setProperty("webdriver.chrome.driver","chromedriver"); WebDriver driver = new ChromeDriver(); driver.get("https://www.google.com"); diff --git a/src/test/java/simpleTest/KoelApp_my.java b/src/test/java/simpleTest/KoelApp_my.java new file mode 100644 index 0000000..dbdf4a2 --- /dev/null +++ b/src/test/java/simpleTest/KoelApp_my.java @@ -0,0 +1,56 @@ +package simpleTest; + +import org.openqa.selenium.*; +import org.openqa.selenium.chrome.ChromeDriver; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.FluentWait; +import org.openqa.selenium.support.ui.WebDriverWait; +import org.testng.Assert; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import java.time.Duration; + +public class KoelApp_my { + private WebDriver driver; + private FluentWait fluentWait; + + @BeforeMethod + public void beforeEveryTest() { + System.setProperty("webdriver.chrome.driver", "chromedriver"); + driver = new ChromeDriver(); + //************************ + fluentWait = new FluentWait(driver) + .withTimeout(Duration.ofSeconds(20)) + .pollingEvery(Duration.ofMillis(10)) + .ignoring(ElementNotVisibleException.class) + .ignoring(NoSuchElementException.class); + //************************ + driver.get("https://koelapp.testpro.io/"); + } + @AfterMethod + public void teatDown() throws InterruptedException { + Thread.sleep(5000); + driver.quit(); + } + + @Test + + public void loginKoel(){ + fluentWait.until(x->x.findElement(By.cssSelector("[type='email']"))); + WebElement emailAddress = driver.findElement(By.cssSelector("[type='email']")); + WebElement password = driver.findElement(By.cssSelector("[type='password']")); + WebElement logInButton = driver.findElement(By.cssSelector("[type='submit']")); + emailAddress.sendKeys("koeluser06@testpro.io"); + password.sendKeys("te$t$tudent"); + logInButton.click(); + + fluentWait.until(x->x.findElement(By.cssSelector(".logout"))); + WebElement logOutButton = driver.findElement(By.cssSelector(".logout")); + Assert.assertTrue(logOutButton.isDisplayed()); + } + + + } + diff --git a/src/test/java/simpleTest/KoelApp_negativeLogin.java b/src/test/java/simpleTest/KoelApp_negativeLogin.java new file mode 100644 index 0000000..4ddb4de --- /dev/null +++ b/src/test/java/simpleTest/KoelApp_negativeLogin.java @@ -0,0 +1,55 @@ +package simpleTest; + +import org.openqa.selenium.*; +import org.openqa.selenium.chrome.ChromeDriver; +import org.openqa.selenium.support.ui.FluentWait; +import org.testng.Assert; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import java.time.Duration; + +public class KoelApp_negativeLogin { + private WebDriver driver; + private FluentWait fluentWait; + + @BeforeMethod + public void beforeEveryTest() { + System.setProperty("webdriver.chrome.driver", "chromedriver"); + driver = new ChromeDriver(); + fluentWait = new FluentWait(driver) + .withTimeout(Duration.ofSeconds(20)) + .pollingEvery(Duration.ofMillis(10)) + .ignoring(ElementNotVisibleException.class) + .ignoring(NoSuchElementException.class); + driver.get("https://koelapp.testpro.io/"); + } + + @AfterMethod + public void teatDown() throws InterruptedException { + Thread.sleep(5000); + driver.quit(); + } + + @Test + + public void loginKoelApp_NegativeTest() { + fluentWait.until(x -> x.findElement(By.cssSelector("[type='email']"))); + WebElement emailAddress = driver.findElement(By.cssSelector("[type='email']")); + WebElement password = driver.findElement(By.cssSelector("[type='password']")); + WebElement logInButton = driver.findElement(By.cssSelector("[type='submit']")); + emailAddress.sendKeys("koeluser06@testpro.io"); + password.sendKeys("te$t$tuden"); + logInButton.click(); + + fluentWait.until(x -> x.findElement(By.cssSelector(".error"))); + WebElement error = driver.findElement(By.cssSelector(".error")); + Assert.assertTrue(error.isDisplayed()); + +// 2-nd decision: +// Assert.assertTrue(driver.findElement(By.cssSelector(".error")).isDisplayed()); + } + + +} diff --git a/src/test/java/simpleTest/Search_my.java b/src/test/java/simpleTest/Search_my.java new file mode 100644 index 0000000..3a6f5be --- /dev/null +++ b/src/test/java/simpleTest/Search_my.java @@ -0,0 +1,74 @@ +package simpleTest; + +import org.openqa.selenium.By; +import org.openqa.selenium.Keys; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.chrome.ChromeDriver; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class Search_my { + @Test + public void searchJavaInGoogle_ResultReturned() { + + //Arrange + System.setProperty("webdriver.chrome.driver","chromedriver"); + WebDriver driver = new ChromeDriver(); + + driver.get("https://www.google.com"); + + //Act + WebElement searchField = driver.findElement(By.cssSelector("[name='q']")); + searchField.sendKeys("Java"); + searchField.sendKeys(Keys.ENTER); + + //Assert + try { + Assert.assertEquals(driver.getTitle(), "Java - Поиск в Google"); + }catch (AssertionError vv){ + driver.quit(); + throw new AssertionError(vv.getMessage()); + } + + + + + try{ + Thread.sleep(5000); + }catch (InterruptedException ignored){} + + driver.quit(); + } + @Test + public void searchJavaInGoogleUsingSearchButton_ResultReturned() { + //Arrange + System.setProperty("webdriver.chrome.driver","chromedriver"); + WebDriver driver = new ChromeDriver(); + + driver.get("https://www.google.com"); + + //Act + WebElement searchField = driver.findElement(By.cssSelector("[name='q']")); + searchField.sendKeys("Java"); + WebElement searchButton = driver.findElement(By.cssSelector("[data-ved='0ahUKEwjxgsjuu8nrAhVShOAKHSgWDgUQ4dUDCAk']")); + searchButton.click(); + + //Assert + try { + Assert.assertEquals(driver.getTitle(), "Java - Поиск в Google"); + }catch (AssertionError vv){ + driver.quit(); + throw new AssertionError(vv.getMessage()); + } + + + + + try{ + Thread.sleep(5000); + }catch (InterruptedException ignored){} + + driver.quit(); + } + } diff --git a/src/test/java/simpleTest/Udemy_my.java b/src/test/java/simpleTest/Udemy_my.java new file mode 100644 index 0000000..b3d7a77 --- /dev/null +++ b/src/test/java/simpleTest/Udemy_my.java @@ -0,0 +1,70 @@ +package simpleTest; + +import org.openqa.selenium.By; +import org.openqa.selenium.Keys; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.chrome.ChromeDriver; +import org.testng.Assert; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +public class Udemy_my { + private WebDriver driver; + @BeforeMethod + public void beforeEveryTest() { + System.setProperty("webdriver.chrome.driver", "chromedriver"); + driver = new ChromeDriver(); + driver.get("https://www.udemy.com"); + } + @AfterMethod + public void afterEachTest() throws InterruptedException { + Thread.sleep(4000); + driver.quit(); + } + @Test + public void searchJavaInUdemy_ResultReturned() throws InterruptedException { + + //Act + WebElement searchField = driver.findElement(By.xpath("(//input)[2]")); + searchField.sendKeys("Java"); + Thread.sleep(3000); + WebElement searchButton = driver.findElement(By.xpath("//*[@class='udlite-search-form-autocomplete-input-group udlite-form-group']/*[last()]")); + searchButton.click(); + Thread.sleep(3000); + WebElement result = driver.findElement(By.xpath("//*[@class='udlite-heading-md filter-panel--item-count--2JGx3']")); + + //Assert + Assert.assertTrue(result.getText().contains("10 000")); + + } + @Test + + public void loginPageUdemyOpen_ResultReturned() throws InterruptedException { + + //Act + + WebElement loginButton = driver.findElement(By.xpath("//*[@data-purpose='header-login']")); + loginButton.click(); + Thread.sleep(3000); + + //Assert + WebElement loginMessage = driver.findElement(By.id("auth-to-udemy-title")); + Assert.assertEquals(loginMessage.getText(), "Log In to Your Udemy Account!"); + + + + } + @Test + + public void signUpPageOpen_ResultReturned() throws InterruptedException { + + WebElement signUpButton = driver.findElement(By.cssSelector("[data-purpose='header-signup']")); + signUpButton.click(); + Thread.sleep(3000); + + WebElement signUpMessage = driver.findElement(By.id("auth-to-udemy-title")); + Assert.assertEquals(signUpMessage.getText(), "Sign Up and Start Learning!"); + } +} diff --git a/src/test/java/simpleTest/Udemy_my_synch_expl.java b/src/test/java/simpleTest/Udemy_my_synch_expl.java new file mode 100644 index 0000000..d6f8268 --- /dev/null +++ b/src/test/java/simpleTest/Udemy_my_synch_expl.java @@ -0,0 +1,76 @@ +package simpleTest; + +import org.openqa.selenium.By; +import org.openqa.selenium.Keys; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.chrome.ChromeDriver; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; +import org.testng.Assert; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +public class Udemy_my_synch_expl { + private WebDriver driver; + //************************ + private WebDriverWait wait; + //************************ + @BeforeMethod + public void beforeEveryTest() { + System.setProperty("webdriver.chrome.driver", "chromedriver"); + driver = new ChromeDriver(); + //************************ + wait = new WebDriverWait(driver, 20); + //************************ + driver.get("https://www.udemy.com"); + } + @AfterMethod + public void afterEachTest() throws InterruptedException { + Thread.sleep(4000); + driver.quit(); + } + @Test + public void searchJavaInUdemy_ResultReturned() throws InterruptedException { + wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("(//input)[2]"))); + + WebElement searchField = driver.findElement(By.xpath("(//input)[2]")); + searchField.sendKeys("Java"); + wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@class='udlite-search-form-autocomplete-input-group udlite-form-group']/*[last()]"))); + WebElement searchButton = driver.findElement(By.xpath("//*[@class='udlite-search-form-autocomplete-input-group udlite-form-group']/*[last()]")); + searchButton.click(); + + wait.until(ExpectedConditions.textToBe(By.tagName("h1"), "10,000 results for “java”")); + + WebElement result = driver.findElement(By.tagName("h1")); + Assert.assertTrue(result.getText().contains("10,000")); + + } + @Test + + public void loginPageUdemyOpen_ResultReturned() throws InterruptedException { + + //Act + + WebElement loginButton = driver.findElement(By.xpath("//*[@data-purpose='header-login']")); + loginButton.click(); + + //Assert + WebElement loginMessage = driver.findElement(By.id("auth-to-udemy-title")); + Assert.assertEquals(loginMessage.getText(), "Log In to Your Udemy Account!"); + + + + } + @Test + + public void signUpPageOpen_ResultReturned() throws InterruptedException { + + WebElement signUpButton = driver.findElement(By.cssSelector("[data-purpose='header-signup']")); + signUpButton.click(); + + WebElement signUpMessage = driver.findElement(By.id("auth-to-udemy-title")); + Assert.assertEquals(signUpMessage.getText(), "Sign Up and Start Learning!"); + } +} \ No newline at end of file diff --git a/src/test/java/simpleTest/Udemy_my_synch_expl1.java b/src/test/java/simpleTest/Udemy_my_synch_expl1.java new file mode 100644 index 0000000..094618e --- /dev/null +++ b/src/test/java/simpleTest/Udemy_my_synch_expl1.java @@ -0,0 +1,82 @@ +package simpleTest; + +import org.openqa.selenium.*; +import org.openqa.selenium.chrome.ChromeDriver; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.FluentWait; +import org.openqa.selenium.support.ui.WebDriverWait; +import org.testng.Assert; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import java.time.Duration; + +public class Udemy_my_synch_expl1 { + private WebDriver driver; + //************************ + private FluentWait fluentWait; + //************************ + @BeforeMethod + public void beforeEveryTest() { + System.setProperty("webdriver.chrome.driver", "chromedriver"); + driver = new ChromeDriver(); + //************************ + fluentWait = new FluentWait (driver) + .withTimeout(Duration.ofSeconds(20)) + .pollingEvery(Duration.ofMillis(10)) + .ignoring(ElementNotVisibleException.class) + .ignoring(NoSuchElementException.class); + //************************ + driver.get("https://www.udemy.com"); + } + + + @AfterMethod + public void afterEachTest() throws InterruptedException { + Thread.sleep(4000); + driver.quit(); + } + @Test + public void searchJavaInUdemy_ResultReturned() throws InterruptedException { + + fluentWait.until(x->x.findElement(By.xpath("(//input)[2]"))); + WebElement searchField = driver.findElement(By.xpath("(//input)[2]")); + searchField.sendKeys("Java"); + fluentWait.until(x->x.findElement(By.xpath("//*[@class='udlite-search-form-autocomplete-input-group udlite-form-group']/*[last()]"))); + WebElement searchButton = driver.findElement(By.xpath("//*[@class='udlite-search-form-autocomplete-input-group udlite-form-group']/*[last()]")); + searchButton.click(); + + + fluentWait.until(x->x.findElement(By.tagName("h1"))); + WebElement result = driver.findElement(By.tagName("h1")); + Assert.assertTrue(result.getText().contains("10,000")); + + } + @Test + + public void loginPageUdemyOpen_ResultReturned() throws InterruptedException { + + //Act + + WebElement loginButton = driver.findElement(By.xpath("//*[@data-purpose='header-login']")); + loginButton.click(); + + //Assert + WebElement loginMessage = driver.findElement(By.id("auth-to-udemy-title")); + Assert.assertEquals(loginMessage.getText(), "Log In to Your Udemy Account!"); + + + + } + @Test + + public void signUpPageOpen_ResultReturned() throws InterruptedException { + + WebElement signUpButton = driver.findElement(By.cssSelector("[data-purpose='header-signup']")); + signUpButton.click(); + + WebElement signUpMessage = driver.findElement(By.id("auth-to-udemy-title")); + Assert.assertEquals(signUpMessage.getText(), "Sign Up and Start Learning!"); + } +} \ No newline at end of file diff --git a/src/test/java/simpleTest/Udemy_my_synch_impl.java b/src/test/java/simpleTest/Udemy_my_synch_impl.java new file mode 100644 index 0000000..e2e3095 --- /dev/null +++ b/src/test/java/simpleTest/Udemy_my_synch_impl.java @@ -0,0 +1,71 @@ +package simpleTest; + +import org.openqa.selenium.By; +import org.openqa.selenium.Keys; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.chrome.ChromeDriver; +import org.testng.Assert; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import java.util.concurrent.TimeUnit; + +public class Udemy_my_synch_impl { + private WebDriver driver; + @BeforeMethod + public void beforeEveryTest() { + System.setProperty("webdriver.chrome.driver", "chromedriver"); + driver = new ChromeDriver(); + //***************************************************************** + driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); + //***************************************************************** + driver.get("https://www.udemy.com"); + } + @AfterMethod + public void afterEachTest() throws InterruptedException { + Thread.sleep(4000); + driver.quit(); + } + @Test + public void searchJavaInUdemy_ResultReturned() throws InterruptedException { + + //Act + WebElement searchField = driver.findElement(By.xpath("(//input)[2]")); + searchField.sendKeys("Java"); + WebElement searchButton = driver.findElement(By.xpath("//*[@class='udlite-search-form-autocomplete-input-group udlite-form-group']/*[last()]")); + searchButton.click(); + WebElement result = driver.findElement(By.tagName("h1")); + + //Assert + Assert.assertTrue(result.getText().contains("10,000")); + + } + @Test + + public void loginPageUdemyOpen_ResultReturned() throws InterruptedException { + + //Act + + WebElement loginButton = driver.findElement(By.xpath("//*[@data-purpose='header-login']")); + loginButton.click(); + + //Assert + WebElement loginMessage = driver.findElement(By.id("auth-to-udemy-title")); + Assert.assertEquals(loginMessage.getText(), "Log In to Your Udemy Account!"); + + + + } + @Test + + public void signUpPageOpen_ResultReturned() throws InterruptedException { + + WebElement signUpButton = driver.findElement(By.cssSelector("[data-purpose='header-signup']")); + signUpButton.click(); + + WebElement signUpMessage = driver.findElement(By.id("auth-to-udemy-title")); + Assert.assertEquals(signUpMessage.getText(), "Sign Up and Start Learning!"); + } +} diff --git a/src/test/java/unitTest/TicketTestParametrization_my.java b/src/test/java/unitTest/TicketTestParametrization_my.java new file mode 100644 index 0000000..1fd99d0 --- /dev/null +++ b/src/test/java/unitTest/TicketTestParametrization_my.java @@ -0,0 +1,29 @@ +package unitTest; + +import lesson14.Tickets; +import org.testng.Assert; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +public class TicketTestParametrization_my { + @DataProvider (name = "Ages") + public Object [][] createData(){ + return new Object[][]{ + {1000,1,0.0}, + {500,10,250.0}, + {500,20,500.0}, + {500,70,400.0} + }; + } + @Test (dataProvider = "Ages") + public void testTicket_checkPrice(int fare, int age, double price) { + // Arrange - Given + Tickets ticket = new Tickets(fare); + + // Act - When + Double result = ticket.getPrice(age); + + // Assert - Then + Assert.assertEquals(result, price); + } +} diff --git a/src/test/resources/log4j2.xml b/src/test/resources/log4j2.xml index d94d731..d19be91 100644 --- a/src/test/resources/log4j2.xml +++ b/src/test/resources/log4j2.xml @@ -1,18 +1,18 @@ - - - - - - %d %p %c{1.} [%t] %m%n - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/resources_my/log4j2.xml b/src/test/resources_my/log4j2.xml new file mode 100644 index 0000000..8c828b6 --- /dev/null +++ b/src/test/resources_my/log4j2.xml @@ -0,0 +1,18 @@ + + + + + + %d %p %c{1.} [%t] %m%n + + + + + + + + + + + + \ No newline at end of file diff --git a/test-output/Master Suite/All tests.html b/test-output/Master Suite/All tests.html new file mode 100644 index 0000000..0c9abe3 --- /dev/null +++ b/test-output/Master Suite/All tests.html @@ -0,0 +1,290 @@ + + +TestNG: All tests + + + + + + + + +

All tests

+ + + + + + + + + + + +
Tests passed/Failed/Skipped:21/1/2
Started on:Wed Sep 23 22:39:01 EDT 2020
Total time:77 seconds (77748 ms)
Included groups:
Excluded groups:

+(Hover the method name to see the test class name)

+ + + + + + + + + + + + +
FAILED TESTS
Test methodExceptionTime (seconds)Instance
loginTest22
Test class: koel_PageTests_My.LoginTest_my1
java.lang.AssertionError: expected [true] but found [false]
+	at koel_PageTests_My.LoginTest_my1.loginTest22(LoginTest_my1.java:35)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
+	at java.base/java.lang.Thread.run(Thread.java:832)
+... Removed 14 stack frames
Click to show all stack frames +
java.lang.AssertionError: expected [true] but found [false]
+	at org.testng.Assert.fail(Assert.java:96)
+	at org.testng.Assert.failNotEquals(Assert.java:776)
+	at org.testng.Assert.assertTrue(Assert.java:44)
+	at org.testng.Assert.assertTrue(Assert.java:54)
+	at koel_PageTests_My.LoginTest_my1.loginTest22(LoginTest_my1.java:35)
+	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
+	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
+	at org.testng.internal.Invoker.invokeMethod(Invoker.java:583)
+	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
+	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
+	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
+	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
+	at java.base/java.lang.Thread.run(Thread.java:832)
+
5koel_PageTests_My.LoginTest_my1@376b4233

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PASSED TESTS
Test methodExceptionTime (seconds)Instance
createPlaylistTest1
Test class: koel_PageTests_My.PlaylistTest_my
3koel_PageTests_My.PlaylistTest_my@2fd66ad3
createPlaylistTest11
Test class: koel_PageTests_My.PlaylistTest_my1
2koel_PageTests_My.PlaylistTest_my1@5d11346a
createPlaylistTest2
Test class: koel_PageTests_My.PlaylistTest_my
2koel_PageTests_My.PlaylistTest_my@2fd66ad3
createPlaylistTest22
Test class: koel_PageTests_My.PlaylistTest_my1
2koel_PageTests_My.PlaylistTest_my1@5d11346a
loginTest1
Test class: koel_PageTests_My.LoginTest_my
1koel_PageTests_My.LoginTest_my@4fcd19b3
loginTest11
Test class: koel_PageTests_My.LoginTest_my1
1koel_PageTests_My.LoginTest_my1@376b4233
loginTest3
Test class: koel_PageTests_My.LoginTest_my
1koel_PageTests_My.LoginTest_my@4fcd19b3
loginTest33
Test class: koel_PageTests_My.LoginTest_my1
1koel_PageTests_My.LoginTest_my1@376b4233
loginTest4
Test class: koel_PageTests_My.LoginTest_my
0koel_PageTests_My.LoginTest_my@4fcd19b3
loginTest44
Test class: koel_PageTests_My.LoginTest_my1
0koel_PageTests_My.LoginTest_my1@376b4233
negativeLoginTest11
Test class: koel_PageTests_My.LoginTest_my1
5koel_PageTests_My.LoginTest_my1@376b4233
negativeLoginTest2
Test class: koel_PageTests_My.LoginTest_my
5koel_PageTests_My.LoginTest_my@4fcd19b3
negativeLoginTest22
Test class: koel_PageTests_My.LoginTest_my1
5koel_PageTests_My.LoginTest_my1@376b4233
negativeLoginTest3
Test class: koel_PageTests_My.LoginTest_my
5koel_PageTests_My.LoginTest_my@4fcd19b3
negativeLoginTest33
Test class: koel_PageTests_My.LoginTest_my1
5koel_PageTests_My.LoginTest_my1@376b4233
negativeLoginTest4
Test class: koel_PageTests_My.LoginTest_my
5koel_PageTests_My.LoginTest_my@4fcd19b3
negativeLoginTest44
Test class: koel_PageTests_My.LoginTest_my1
5koel_PageTests_My.LoginTest_my1@376b4233
renamePlaylistTest1
Test class: koel_PageTests_My.PlaylistTest_my
2koel_PageTests_My.PlaylistTest_my@2fd66ad3
renamePlaylistTest11
Test class: koel_PageTests_My.PlaylistTest_my1
2koel_PageTests_My.PlaylistTest_my1@5d11346a
renamePlaylistTest2
Test class: koel_PageTests_My.PlaylistTest_my
2koel_PageTests_My.PlaylistTest_my@2fd66ad3
renamePlaylistTest22
Test class: koel_PageTests_My.PlaylistTest_my1
2koel_PageTests_My.PlaylistTest_my1@5d11346a

+ + + + + + + + + + + + + + + + + +
SKIPPED TESTS
Test methodExceptionTime (seconds)Instance
renamePlaylistTest11
Test class: koel_PageTests_My.PlaylistTest_my1
java.lang.AssertionError: expected [true] but found [false]
+	at koel_PageTests_My.PlaylistTest_my1.renamePlaylistTest11(PlaylistTest_my1.java:41)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
+	at java.base/java.lang.Thread.run(Thread.java:832)
+... Removed 14 stack frames
Click to show all stack frames +
java.lang.AssertionError: expected [true] but found [false]
+	at org.testng.Assert.fail(Assert.java:96)
+	at org.testng.Assert.failNotEquals(Assert.java:776)
+	at org.testng.Assert.assertTrue(Assert.java:44)
+	at org.testng.Assert.assertTrue(Assert.java:54)
+	at koel_PageTests_My.PlaylistTest_my1.renamePlaylistTest11(PlaylistTest_my1.java:41)
+	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
+	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
+	at org.testng.internal.Invoker.invokeMethod(Invoker.java:583)
+	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
+	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
+	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
+	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
+	at java.base/java.lang.Thread.run(Thread.java:832)
+
2koel_PageTests_My.PlaylistTest_my1@5d11346a
renamePlaylistTest11
Test class: koel_PageTests_My.PlaylistTest_my1
java.lang.AssertionError: expected [true] but found [false]
+	at koel_PageTests_My.PlaylistTest_my1.renamePlaylistTest11(PlaylistTest_my1.java:41)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
+	at java.base/java.lang.Thread.run(Thread.java:832)
+... Removed 14 stack frames
Click to show all stack frames +
java.lang.AssertionError: expected [true] but found [false]
+	at org.testng.Assert.fail(Assert.java:96)
+	at org.testng.Assert.failNotEquals(Assert.java:776)
+	at org.testng.Assert.assertTrue(Assert.java:44)
+	at org.testng.Assert.assertTrue(Assert.java:54)
+	at koel_PageTests_My.PlaylistTest_my1.renamePlaylistTest11(PlaylistTest_my1.java:41)
+	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
+	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
+	at org.testng.internal.Invoker.invokeMethod(Invoker.java:583)
+	at org.testng.internal.Invoker.retryFailed(Invoker.java:839)
+	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1010)
+	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
+	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
+	at java.base/java.lang.Thread.run(Thread.java:832)
+
3koel_PageTests_My.PlaylistTest_my1@5d11346a

+ + \ No newline at end of file diff --git a/test-output/Master Suite/All tests.xml b/test-output/Master Suite/All tests.xml new file mode 100644 index 0000000..7571372 --- /dev/null +++ b/test-output/Master Suite/All tests.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-output/Master Suite/Other Tests.html b/test-output/Master Suite/Other Tests.html new file mode 100644 index 0000000..8b5d19a --- /dev/null +++ b/test-output/Master Suite/Other Tests.html @@ -0,0 +1,71 @@ + + +TestNG: Other Tests + + + + + + + + +

Other Tests

+ + + + + + + + + + + +
Tests passed/Failed/Skipped:0/0/0
Started on:Wed Sep 23 22:40:19 EDT 2020
Total time:0 seconds (0 ms)
Included groups:
Excluded groups:

+(Hover the method name to see the test class name)

+ + \ No newline at end of file diff --git a/test-output/Master Suite/Other Tests.xml b/test-output/Master Suite/Other Tests.xml new file mode 100644 index 0000000..3cebb7c --- /dev/null +++ b/test-output/Master Suite/Other Tests.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test-output/Master Suite/testng-failed.xml b/test-output/Master Suite/testng-failed.xml new file mode 100644 index 0000000..b1ff5ad --- /dev/null +++ b/test-output/Master Suite/testng-failed.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-output/bullet_point.png b/test-output/bullet_point.png new file mode 100644 index 0000000..176e6d5 Binary files /dev/null and b/test-output/bullet_point.png differ diff --git a/test-output/collapseall.gif b/test-output/collapseall.gif new file mode 100644 index 0000000..a2d80a9 Binary files /dev/null and b/test-output/collapseall.gif differ diff --git a/test-output/emailable-report.html b/test-output/emailable-report.html new file mode 100644 index 0000000..3548724 --- /dev/null +++ b/test-output/emailable-report.html @@ -0,0 +1,59 @@ + + + + +TestNG Report + + + + + + + + + +
Test# Passed# Skipped# FailedTime (ms)Included GroupsExcluded Groups
Master Suite
All tests212177,748
Other Tests0000
Total212177,748
+ + +
ClassMethodStartTime (ms)
Master Suite
All tests — failed
koel_PageTests_My.LoginTest_my1loginTest2216009151621165804
All tests — skipped
koel_PageTests_My.PlaylistTest_my1renamePlaylistTest1116009151526232861
renamePlaylistTest11
All tests — passed
koel_PageTests_My.LoginTest_myloginTest116009151440231234
loginTest316009151620991208
loginTest41600915179940887
negativeLoginTest216009151508575626
negativeLoginTest316009151688345605
negativeLoginTest416009151864015574
koel_PageTests_My.LoginTest_my1loginTest1116009151440241294
loginTest3316009151849621075
loginTest441600915202555914
negativeLoginTest1116009151508935602
negativeLoginTest2216009151739085563
negativeLoginTest3316009151915255528
negativeLoginTest4416009152089955568
koel_PageTests_My.PlaylistTest_mycreatePlaylistTest116009151440233043
createPlaylistTest216009151611272557
renamePlaylistTest116009151526922893
renamePlaylistTest216009151692152781
koel_PageTests_My.PlaylistTest_my1createPlaylistTest1116009151440232983
createPlaylistTest2216009151779092318
renamePlaylistTest1116009151696972729
renamePlaylistTest2216009151858882685
+

All tests

koel_PageTests_My.LoginTest_my1#loginTest22

Exception
java.lang.AssertionError: expected [true] but found [false] + at koel_PageTests_My.LoginTest_my1.loginTest22(LoginTest_my1.java:35) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) + at java.base/java.lang.Thread.run(Thread.java:832) +... Removed 14 stack frames

back to summary

+

koel_PageTests_My.PlaylistTest_my1#renamePlaylistTest11

Exception
java.lang.AssertionError: expected [true] but found [false] + at koel_PageTests_My.PlaylistTest_my1.renamePlaylistTest11(PlaylistTest_my1.java:41) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) + at java.base/java.lang.Thread.run(Thread.java:832) +... Removed 14 stack frames

back to summary

+

koel_PageTests_My.PlaylistTest_my1#renamePlaylistTest11

Exception
java.lang.AssertionError: expected [true] but found [false] + at koel_PageTests_My.PlaylistTest_my1.renamePlaylistTest11(PlaylistTest_my1.java:41) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) + at java.base/java.lang.Thread.run(Thread.java:832) +... Removed 14 stack frames

back to summary

+

koel_PageTests_My.LoginTest_my#loginTest1

back to summary

+

koel_PageTests_My.LoginTest_my#loginTest3

back to summary

+

koel_PageTests_My.LoginTest_my#loginTest4

back to summary

+

koel_PageTests_My.LoginTest_my#negativeLoginTest2

back to summary

+

koel_PageTests_My.LoginTest_my#negativeLoginTest3

back to summary

+

koel_PageTests_My.LoginTest_my#negativeLoginTest4

back to summary

+

koel_PageTests_My.LoginTest_my1#loginTest11

back to summary

+

koel_PageTests_My.LoginTest_my1#loginTest33

back to summary

+

koel_PageTests_My.LoginTest_my1#loginTest44

back to summary

+

koel_PageTests_My.LoginTest_my1#negativeLoginTest11

back to summary

+

koel_PageTests_My.LoginTest_my1#negativeLoginTest22

back to summary

+

koel_PageTests_My.LoginTest_my1#negativeLoginTest33

back to summary

+

koel_PageTests_My.LoginTest_my1#negativeLoginTest44

back to summary

+

koel_PageTests_My.PlaylistTest_my#createPlaylistTest1

back to summary

+

koel_PageTests_My.PlaylistTest_my#createPlaylistTest2

back to summary

+

koel_PageTests_My.PlaylistTest_my#renamePlaylistTest1

back to summary

+

koel_PageTests_My.PlaylistTest_my#renamePlaylistTest2

back to summary

+

koel_PageTests_My.PlaylistTest_my1#createPlaylistTest11

back to summary

+

koel_PageTests_My.PlaylistTest_my1#createPlaylistTest22

back to summary

+

koel_PageTests_My.PlaylistTest_my1#renamePlaylistTest11

back to summary

+

koel_PageTests_My.PlaylistTest_my1#renamePlaylistTest22

back to summary

+

Other Tests

+ diff --git a/test-output/failed.png b/test-output/failed.png new file mode 100644 index 0000000..c117be5 Binary files /dev/null and b/test-output/failed.png differ diff --git a/test-output/index.html b/test-output/index.html new file mode 100644 index 0000000..d8faa34 --- /dev/null +++ b/test-output/index.html @@ -0,0 +1,1198 @@ + + + + + + TestNG reports + + + + + + + + + + +
+ Test results +
+ 1 suite, 1 failed test +
+ +
+
+
+
+
+ + koel_PageTests_My.LoginTest_my1 +
+
+
+
+ + + loginTest22 +
java.lang.AssertionError: expected [true] but found [false] + at koel_PageTests_My.LoginTest_my1.loginTest22(LoginTest_my1.java:35) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) + at java.base/java.lang.Thread.run(Thread.java:832) +... Removed 14 stack frames +
+
+
+
+
+
+
+ + koel_PageTests_My.PlaylistTest_my1 +
+
+
+
+ + + renamePlaylistTest11 +
java.lang.AssertionError: expected [true] but found [false] + at koel_PageTests_My.PlaylistTest_my1.renamePlaylistTest11(PlaylistTest_my1.java:41) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) + at java.base/java.lang.Thread.run(Thread.java:832) +... Removed 14 stack frames +
+
+
+
+
+ + + renamePlaylistTest11 +
java.lang.AssertionError: expected [true] but found [false] + at koel_PageTests_My.PlaylistTest_my1.renamePlaylistTest11(PlaylistTest_my1.java:41) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) + at java.base/java.lang.Thread.run(Thread.java:832) +... Removed 14 stack frames +
+
+
+
+
+
+
+ + koel_PageTests_My.PlaylistTest_my +
+
+
+
+ + + createPlaylistTest1 +
+
+
+
+ + + createPlaylistTest2 +
+
+
+
+ + + renamePlaylistTest1 +
+
+
+
+ + + renamePlaylistTest2 +
+
+
+
+
+
+ + koel_PageTests_My.LoginTest_my +
+
+
+
+ + + loginTest1 +
+
+
+
+ + + loginTest3 +
+
+
+
+ + + loginTest4 +
+
+
+
+ + + negativeLoginTest2 +
+
+
+
+ + + negativeLoginTest3 +
+
+
+
+ + + negativeLoginTest4 +
+
+
+
+
+
+ + koel_PageTests_My.PlaylistTest_my1 +
+
+
+
+ + + createPlaylistTest11 +
+
+
+
+ + + createPlaylistTest22 +
+
+
+
+ + + renamePlaylistTest11 +
+
+
+
+ + + renamePlaylistTest22 +
+
+
+
+
+
+ + koel_PageTests_My.LoginTest_my1 +
+
+
+
+ + + loginTest11 +
+
+
+
+ + + loginTest33 +
+
+
+
+ + + loginTest44 +
+
+
+
+ + + negativeLoginTest11 +
+
+
+
+ + + negativeLoginTest22 +
+
+
+
+ + + negativeLoginTest33 +
+
+
+
+ + + negativeLoginTest44 +
+
+
+
+
+
+
+ /Users/kamilmaratovic/IdeaProjects/JavaCore5/testng_my_ Chrome.xml +
+
+
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite thread-count="4" parallel="classes" name="Master Suite" guice-stage="DEVELOPMENT">
+  <parameter name="password" value="te$t$tudent"/>
+  <parameter name="browser" value="Chrome"/>
+  <parameter name="username" value="koeluser06@testpro.io"/>
+  <listeners>
+    <listener class-name="listeners.Listeners"/>
+  </listeners>
+  <test thread-count="4" parallel="classes" name="All tests">
+    <classes>
+      <class name="koel_PageTests_My.LoginTest_my">
+        <methods>
+          <include name="loginTest1"/>
+          <include name="negativeLoginTest1"/>
+          <include name="negativeLoginTest2"/>
+          <include name="loginTest3"/>
+          <include name="negativeLoginTest3"/>
+          <include name="loginTest4"/>
+          <include name="negativeLoginTest4"/>
+          <exclude name="loginTest2"/>
+        </methods>
+      </class> <!-- koel_PageTests_My.LoginTest_my -->
+      <class name="koel_PageTests_My.LoginTest_my1">
+        <methods>
+          <include name="loginTest11"/>
+          <include name="negativeLoginTest11"/>
+          <include name="loginTest22"/>
+          <include name="negativeLoginTest22"/>
+          <include name="loginTest33"/>
+          <include name="negativeLoginTest33"/>
+          <include name="loginTest44"/>
+          <include name="negativeLoginTest44"/>
+        </methods>
+      </class> <!-- koel_PageTests_My.LoginTest_my1 -->
+      <class name="koel_PageTests_My.PlaylistTest_my">
+        <methods>
+          <include name="createPlaylistTest1"/>
+          <include name="renamePlaylistTest1"/>
+          <include name="createPlaylistTest2"/>
+          <include name="renamePlaylistTest2"/>
+        </methods>
+      </class> <!-- koel_PageTests_My.PlaylistTest_my -->
+      <class name="koel_PageTests_My.PlaylistTest_my1">
+        <methods>
+          <include name="createPlaylistTest11"/>
+          <include name="renamePlaylistTest11"/>
+          <include name="createPlaylistTest22"/>
+          <include name="renamePlaylistTest22"/>
+        </methods>
+      </class> <!-- koel_PageTests_My.PlaylistTest_my1 -->
+    </classes>
+  </test> <!-- All tests -->
+  <test thread-count="4" parallel="classes" name="Other Tests">
+  </test> <!-- Other Tests -->
+</suite> <!-- Master Suite -->
+            
+
+
+
+
+ Tests for Master Suite +
+
+
    +
  • + All tests (4 classes) +
  • +
  • + Other Tests (0 classes) +
  • +
+
+
+
+
+ Groups for Master Suite +
+
+
+
+
+
+ Times for Master Suite +
+
+
+ + Total running time: 1 minutes +
+
+
+
+
+
+
+ Reporter output for Master Suite +
+
+
+
+
+
+ 2 ignored methods +
+
+
+ koel_PageTests_My.LoginTest_my +
+ negativeLoginTest1 +
+ loginTest2 +
+
+
+
+
+
+
+ Methods in chronological order +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 0 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my1
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 0 ms +
+
+
+
koel_PageTests_My.LoginTest_my1
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 0 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 0 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my1
+
+ createPlaylistTest11 + 2103 ms +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ loginTest1 + 2103 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my
+
+ createPlaylistTest1 + 2103 ms +
+
+
+
koel_PageTests_My.LoginTest_my1
+
+ loginTest11 + 2104 ms +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ tearDown([TestResult name=loginTest1 status=SUCCESS method=LoginTest_my.loginTest1()[pri:0, instance:koel_Pag...) + 3337 ms +
+
+
+
koel_PageTests_My.LoginTest_my1
+
+ tearDown([TestResult name=loginTest11 status=SUCCESS method=LoginTest_my1.loginTest11()[pri:0, instance:koel_...) + 3399 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my1
+
+ tearDown([TestResult name=createPlaylistTest11 status=SUCCESS method=PlaylistTest_my1.createPlaylistTest11()[...) + 5087 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my
+
+ tearDown([TestResult name=createPlaylistTest1 status=SUCCESS method=PlaylistTest_my.createPlaylistTest1()[pri...) + 5147 ms +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 8420 ms +
+
+
+
koel_PageTests_My.LoginTest_my1
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 8475 ms +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ negativeLoginTest2 + 8937 ms +
+
+
+
koel_PageTests_My.LoginTest_my1
+
+ negativeLoginTest11 + 8973 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my1
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 10168 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 10222 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my1
+
+ renamePlaylistTest11 + 10703 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my
+
+ renamePlaylistTest1 + 10772 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my1
+
+ tearDown([TestResult name=renamePlaylistTest11 status=SKIP method=PlaylistTest_my1.renamePlaylistTest11()[pri...) + 13565 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my
+
+ tearDown([TestResult name=renamePlaylistTest1 status=SUCCESS method=PlaylistTest_my.renamePlaylistTest1()[pri...) + 13665 ms +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ tearDown([TestResult name=negativeLoginTest2 status=SUCCESS method=LoginTest_my.negativeLoginTest2()[pri:0, i...) + 14563 ms +
+
+
+
koel_PageTests_My.LoginTest_my1
+
+ tearDown([TestResult name=negativeLoginTest11 status=SUCCESS method=LoginTest_my1.negativeLoginTest11()[pri:0...) + 14575 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my1
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 18637 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 18739 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my1
+
+ renamePlaylistTest11 + 19120 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my
+
+ createPlaylistTest2 + 19207 ms +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 19635 ms +
+
+
+
koel_PageTests_My.LoginTest_my1
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 19650 ms +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ loginTest3 + 20179 ms +
+
+
+
koel_PageTests_My.LoginTest_my1
+
+ + + loginTest22 + 20196 ms +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ tearDown([TestResult name=loginTest3 status=SUCCESS method=LoginTest_my.loginTest3()[pri:0, instance:koel_Pag...) + 21387 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my
+
+ tearDown([TestResult name=createPlaylistTest2 status=SUCCESS method=PlaylistTest_my.createPlaylistTest2()[pri...) + 21764 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my1
+
+ tearDown([TestResult name=renamePlaylistTest11 status=SKIP method=PlaylistTest_my1.renamePlaylistTest11()[pri...) + 22254 ms +
+
+
+
koel_PageTests_My.LoginTest_my1
+
+ tearDown([TestResult name=loginTest22 status=FAILURE method=LoginTest_my1.loginTest22()[pri:0, instance:koel_...) + 26003 ms +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 26461 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 26841 ms +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ negativeLoginTest3 + 26914 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my
+
+ renamePlaylistTest2 + 27295 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my1
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 27328 ms +
+
+ renamePlaylistTest11 + 27777 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my
+
+ tearDown([TestResult name=renamePlaylistTest2 status=SUCCESS method=PlaylistTest_my.renamePlaylistTest2()[pri...) + 30077 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my1
+
+ tearDown([TestResult name=renamePlaylistTest11 status=SUCCESS method=PlaylistTest_my1.renamePlaylistTest11()[...) + 30506 ms +
+
+
+
koel_PageTests_My.LoginTest_my1
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 31568 ms +
+
+ negativeLoginTest22 + 31988 ms +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ tearDown([TestResult name=negativeLoginTest3 status=SUCCESS method=LoginTest_my.negativeLoginTest3()[pri:0, i...) + 32520 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my1
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 35581 ms +
+
+ createPlaylistTest22 + 35989 ms +
+
+
+
koel_PageTests_My.LoginTest_my1
+
+ tearDown([TestResult name=negativeLoginTest22 status=SUCCESS method=LoginTest_my1.negativeLoginTest22()[pri:0...) + 37552 ms +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 37592 ms +
+
+ loginTest4 + 38020 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my1
+
+ tearDown([TestResult name=createPlaylistTest22 status=SUCCESS method=PlaylistTest_my1.createPlaylistTest22()[...) + 38307 ms +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ tearDown([TestResult name=loginTest4 status=SUCCESS method=LoginTest_my.loginTest4()[pri:0, instance:koel_Pag...) + 38907 ms +
+
+
+
koel_PageTests_My.LoginTest_my1
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 42625 ms +
+
+ loginTest33 + 43042 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my1
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 43380 ms +
+
+ renamePlaylistTest22 + 43968 ms +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 43982 ms +
+
+
+
koel_PageTests_My.LoginTest_my1
+
+ tearDown([TestResult name=loginTest33 status=SUCCESS method=LoginTest_my1.loginTest33()[pri:0, instance:koel_...) + 44117 ms +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ negativeLoginTest4 + 44481 ms +
+
+
+
koel_PageTests_My.PlaylistTest_my1
+
+ tearDown([TestResult name=renamePlaylistTest22 status=SUCCESS method=PlaylistTest_my1.renamePlaylistTest22()[...) + 46653 ms +
+
+
+
koel_PageTests_My.LoginTest_my1
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 49189 ms +
+
+ negativeLoginTest33 + 49605 ms +
+
+
+
koel_PageTests_My.LoginTest_my
+
+ tearDown([TestResult name=negativeLoginTest4 status=SUCCESS method=LoginTest_my.negativeLoginTest4()[pri:0, i...) + 50055 ms +
+
+
+
koel_PageTests_My.LoginTest_my1
+
+ tearDown([TestResult name=negativeLoginTest33 status=SUCCESS method=LoginTest_my1.negativeLoginTest33()[pri:0...) + 55133 ms +
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 60213 ms +
+
+ loginTest44 + 60635 ms +
+
+ tearDown([TestResult name=loginTest44 status=SUCCESS method=LoginTest_my1.loginTest44()[pri:0, instance:koel_...) + 61549 ms +
+
+ beforeEveryTest(koeluser06@testpro.io, te$t$tudent, Chrome) + 66633 ms +
+
+ negativeLoginTest44 + 67075 ms +
+
+ tearDown([TestResult name=negativeLoginTest44 status=SUCCESS method=LoginTest_my1.negativeLoginTest44()[pri:0...) + 72643 ms +
+
+
+
+
+ + diff --git a/test-output/jquery-1.7.1.min.js b/test-output/jquery-1.7.1.min.js new file mode 100644 index 0000000..979ed08 --- /dev/null +++ b/test-output/jquery-1.7.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.7.1 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; +f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() +{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/test-output/junitreports/TEST-koel_PageTests_My.LoginTest_my.xml b/test-output/junitreports/TEST-koel_PageTests_My.LoginTest_my.xml new file mode 100644 index 0000000..a27d262 --- /dev/null +++ b/test-output/junitreports/TEST-koel_PageTests_My.LoginTest_my.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/test-output/junitreports/TEST-koel_PageTests_My.LoginTest_my1.xml b/test-output/junitreports/TEST-koel_PageTests_My.LoginTest_my1.xml new file mode 100644 index 0000000..aebe333 --- /dev/null +++ b/test-output/junitreports/TEST-koel_PageTests_My.LoginTest_my1.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + diff --git a/test-output/junitreports/TEST-koel_PageTests_My.PlaylistTest_my.xml b/test-output/junitreports/TEST-koel_PageTests_My.PlaylistTest_my.xml new file mode 100644 index 0000000..dab1842 --- /dev/null +++ b/test-output/junitreports/TEST-koel_PageTests_My.PlaylistTest_my.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/test-output/junitreports/TEST-koel_PageTests_My.PlaylistTest_my1.xml b/test-output/junitreports/TEST-koel_PageTests_My.PlaylistTest_my1.xml new file mode 100644 index 0000000..38246b4 --- /dev/null +++ b/test-output/junitreports/TEST-koel_PageTests_My.PlaylistTest_my1.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/test-output/navigator-bullet.png b/test-output/navigator-bullet.png new file mode 100644 index 0000000..36d90d3 Binary files /dev/null and b/test-output/navigator-bullet.png differ diff --git a/test-output/old/Master Suite/All tests.properties b/test-output/old/Master Suite/All tests.properties new file mode 100644 index 0000000..b3cad93 --- /dev/null +++ b/test-output/old/Master Suite/All tests.properties @@ -0,0 +1 @@ +[SuiteResult context=All tests][SuiteResult context=Other Tests] \ No newline at end of file diff --git a/test-output/old/Master Suite/Other Tests.properties b/test-output/old/Master Suite/Other Tests.properties new file mode 100644 index 0000000..b3cad93 --- /dev/null +++ b/test-output/old/Master Suite/Other Tests.properties @@ -0,0 +1 @@ +[SuiteResult context=All tests][SuiteResult context=Other Tests] \ No newline at end of file diff --git a/test-output/old/Master Suite/classes.html b/test-output/old/Master Suite/classes.html new file mode 100644 index 0000000..e462f67 --- /dev/null +++ b/test-output/old/Master Suite/classes.html @@ -0,0 +1,206 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Class nameMethod nameGroups
koel_PageTests_My.LoginTest_my  
@Test
 loginTest2 
 loginTest1 
 negativeLoginTest4 
 negativeLoginTest2 
 loginTest4 
 loginTest3 
 negativeLoginTest3 
 negativeLoginTest1 
@BeforeClass
@BeforeMethod
 beforeEveryTest 
@AfterMethod
 tearDown 
@AfterClass
koel_PageTests_My.PlaylistTest_my1  
@Test
 renamePlaylistTest11 
 renamePlaylistTest22 
 createPlaylistTest11 
 createPlaylistTest22 
@BeforeClass
@BeforeMethod
 beforeEveryTest 
@AfterMethod
 tearDown 
@AfterClass
koel_PageTests_My.LoginTest_my1  
@Test
 loginTest11 
 loginTest22 
 loginTest33 
 loginTest44 
 negativeLoginTest11 
 negativeLoginTest22 
 negativeLoginTest33 
 negativeLoginTest44 
@BeforeClass
@BeforeMethod
 beforeEveryTest 
@AfterMethod
 tearDown 
@AfterClass
koel_PageTests_My.PlaylistTest_my  
@Test
 renamePlaylistTest2 
 renamePlaylistTest1 
 createPlaylistTest2 
 createPlaylistTest1 
@BeforeClass
@BeforeMethod
 beforeEveryTest 
@AfterMethod
 tearDown 
@AfterClass
diff --git a/test-output/old/Master Suite/groups.html b/test-output/old/Master Suite/groups.html new file mode 100644 index 0000000..199cb3f --- /dev/null +++ b/test-output/old/Master Suite/groups.html @@ -0,0 +1 @@ +

Groups used for this test run

\ No newline at end of file diff --git a/test-output/old/Master Suite/index.html b/test-output/old/Master Suite/index.html new file mode 100644 index 0000000..2f417e4 --- /dev/null +++ b/test-output/old/Master Suite/index.html @@ -0,0 +1,6 @@ +Results for Master Suite + + + + + diff --git a/test-output/old/Master Suite/main.html b/test-output/old/Master Suite/main.html new file mode 100644 index 0000000..36857a4 --- /dev/null +++ b/test-output/old/Master Suite/main.html @@ -0,0 +1,2 @@ +Results for Master Suite +Select a result on the left-hand pane. diff --git a/test-output/old/Master Suite/methods-alphabetical.html b/test-output/old/Master Suite/methods-alphabetical.html new file mode 100644 index 0000000..3b4cc06 --- /dev/null +++ b/test-output/old/Master Suite/methods-alphabetical.html @@ -0,0 +1,148 @@ +

Methods run, sorted chronologically

>> means before, << means after


Master Suite

(Hover the method name to see the test class name)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
20/09/23 22:39:01 0     >>beforeEveryTest  TestNG-test=All tests-1@1595163139
20/09/23 22:39:01 0     >>beforeEveryTest  TestNG-test=All tests-4@718733769
20/09/23 22:39:01 0     >>beforeEveryTest  TestNG-test=All tests-2@1106551392
20/09/23 22:39:01 0     >>beforeEveryTest  TestNG-test=All tests-3@1938688024
20/09/23 22:39:10 8418     >>beforeEveryTest  TestNG-test=All tests-1@1595163139
20/09/23 22:39:10 8474     >>beforeEveryTest  TestNG-test=All tests-2@1106551392
20/09/23 22:39:12 10166     >>beforeEveryTest  TestNG-test=All tests-4@718733769
20/09/23 22:39:12 10220     >>beforeEveryTest  TestNG-test=All tests-3@1938688024
20/09/23 22:39:20 18636     >>beforeEveryTest  TestNG-test=All tests-4@718733769
20/09/23 22:39:20 18737     >>beforeEveryTest  TestNG-test=All tests-3@1938688024
20/09/23 22:39:21 19633     >>beforeEveryTest  TestNG-test=All tests-1@1595163139
20/09/23 22:39:21 19648     >>beforeEveryTest  TestNG-test=All tests-2@1106551392
20/09/23 22:39:28 26459     >>beforeEveryTest  TestNG-test=All tests-1@1595163139
20/09/23 22:39:28 26839     >>beforeEveryTest  TestNG-test=All tests-3@1938688024
20/09/23 22:39:29 27326     >>beforeEveryTest  TestNG-test=All tests-4@718733769
20/09/23 22:39:33 31566     >>beforeEveryTest  TestNG-test=All tests-2@1106551392
20/09/23 22:39:37 35579     >>beforeEveryTest  TestNG-test=All tests-4@718733769
20/09/23 22:39:39 37590     >>beforeEveryTest  TestNG-test=All tests-1@1595163139
20/09/23 22:39:44 42623     >>beforeEveryTest  TestNG-test=All tests-2@1106551392
20/09/23 22:39:45 43378     >>beforeEveryTest  TestNG-test=All tests-4@718733769
20/09/23 22:39:45 43981     >>beforeEveryTest  TestNG-test=All tests-1@1595163139
20/09/23 22:39:51 49187     >>beforeEveryTest  TestNG-test=All tests-2@1106551392
20/09/23 22:40:02 60211     >>beforeEveryTest  TestNG-test=All tests-2@1106551392
20/09/23 22:40:08 66631     >>beforeEveryTest  TestNG-test=All tests-2@1106551392
20/09/23 22:39:04 2101      createPlaylistTest1TestNG-test=All tests-3@1938688024
20/09/23 22:39:04 2101      createPlaylistTest11TestNG-test=All tests-4@718733769
20/09/23 22:39:21 19205      createPlaylistTest2TestNG-test=All tests-3@1938688024
20/09/23 22:39:37 35987      createPlaylistTest22TestNG-test=All tests-4@718733769
20/09/23 22:39:04 2101      loginTest1TestNG-test=All tests-1@1595163139
20/09/23 22:39:04 2102      loginTest11TestNG-test=All tests-2@1106551392
20/09/23 22:39:22 20194      loginTest22TestNG-test=All tests-2@1106551392
20/09/23 22:39:22 20177      loginTest3TestNG-test=All tests-1@1595163139
20/09/23 22:39:44 43040      loginTest33TestNG-test=All tests-2@1106551392
20/09/23 22:39:39 38018      loginTest4TestNG-test=All tests-1@1595163139
20/09/23 22:40:02 60633      loginTest44TestNG-test=All tests-2@1106551392
20/09/23 22:39:10 8971      negativeLoginTest11TestNG-test=All tests-2@1106551392
20/09/23 22:39:10 8935      negativeLoginTest2TestNG-test=All tests-1@1595163139
20/09/23 22:39:33 31986      negativeLoginTest22TestNG-test=All tests-2@1106551392
20/09/23 22:39:28 26912      negativeLoginTest3TestNG-test=All tests-1@1595163139
20/09/23 22:39:51 49603      negativeLoginTest33TestNG-test=All tests-2@1106551392
20/09/23 22:39:46 44479      negativeLoginTest4TestNG-test=All tests-1@1595163139
20/09/23 22:40:08 67073      negativeLoginTest44TestNG-test=All tests-2@1106551392
20/09/23 22:39:12 10770      renamePlaylistTest1TestNG-test=All tests-3@1938688024
20/09/23 22:39:12 10701      renamePlaylistTest11TestNG-test=All tests-4@718733769
20/09/23 22:39:21 19118      renamePlaylistTest11TestNG-test=All tests-4@718733769
20/09/23 22:39:29 27775      renamePlaylistTest11TestNG-test=All tests-4@718733769
20/09/23 22:39:29 27293      renamePlaylistTest2TestNG-test=All tests-3@1938688024
20/09/23 22:39:45 43966      renamePlaylistTest22TestNG-test=All tests-4@718733769
20/09/23 22:39:05 3336     <<tearDown  TestNG-test=All tests-1@1595163139
20/09/23 22:39:05 3397     <<tearDown  TestNG-test=All tests-2@1106551392
20/09/23 22:39:07 5085     <<tearDown  TestNG-test=All tests-4@718733769
20/09/23 22:39:07 5145     <<tearDown  TestNG-test=All tests-3@1938688024
20/09/23 22:39:15 13563     <<tearDown  TestNG-test=All tests-4@718733769
20/09/23 22:39:15 13663     <<tearDown  TestNG-test=All tests-3@1938688024
20/09/23 22:39:16 14561     <<tearDown  TestNG-test=All tests-1@1595163139
20/09/23 22:39:16 14573     <<tearDown  TestNG-test=All tests-2@1106551392
20/09/23 22:39:23 21385     <<tearDown  TestNG-test=All tests-1@1595163139
20/09/23 22:39:23 21762     <<tearDown  TestNG-test=All tests-3@1938688024
20/09/23 22:39:24 22252     <<tearDown  TestNG-test=All tests-4@718733769
20/09/23 22:39:27 26001     <<tearDown  TestNG-test=All tests-2@1106551392
20/09/23 22:39:31 30075     <<tearDown  TestNG-test=All tests-3@1938688024
20/09/23 22:39:32 30504     <<tearDown  TestNG-test=All tests-4@718733769
20/09/23 22:39:34 32518     <<tearDown  TestNG-test=All tests-1@1595163139
20/09/23 22:39:39 37550     <<tearDown  TestNG-test=All tests-2@1106551392
20/09/23 22:39:40 38305     <<tearDown  TestNG-test=All tests-4@718733769
20/09/23 22:39:40 38905     <<tearDown  TestNG-test=All tests-1@1595163139
20/09/23 22:39:46 44115     <<tearDown  TestNG-test=All tests-2@1106551392
20/09/23 22:39:48 46651     <<tearDown  TestNG-test=All tests-4@718733769
20/09/23 22:39:51 50053     <<tearDown  TestNG-test=All tests-1@1595163139
20/09/23 22:39:57 55131     <<tearDown  TestNG-test=All tests-2@1106551392
20/09/23 22:40:03 61548     <<tearDown  TestNG-test=All tests-2@1106551392
20/09/23 22:40:14 72641     <<tearDown  TestNG-test=All tests-2@1106551392
diff --git a/test-output/old/Master Suite/methods-not-run.html b/test-output/old/Master Suite/methods-not-run.html new file mode 100644 index 0000000..5adf7b8 --- /dev/null +++ b/test-output/old/Master Suite/methods-not-run.html @@ -0,0 +1,4 @@ +

Methods that were not run

+ + +
koel_PageTests_My.LoginTest_my.negativeLoginTest1
koel_PageTests_My.LoginTest_my.loginTest2
\ No newline at end of file diff --git a/test-output/old/Master Suite/methods.html b/test-output/old/Master Suite/methods.html new file mode 100644 index 0000000..a633d77 --- /dev/null +++ b/test-output/old/Master Suite/methods.html @@ -0,0 +1,148 @@ +

Methods run, sorted chronologically

>> means before, << means after


Master Suite

(Hover the method name to see the test class name)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
20/09/23 22:39:01 0     >>beforeEveryTest  TestNG-test=All tests-1@1595163139
20/09/23 22:39:01 0     >>beforeEveryTest  TestNG-test=All tests-4@718733769
20/09/23 22:39:01 0     >>beforeEveryTest  TestNG-test=All tests-2@1106551392
20/09/23 22:39:01 0     >>beforeEveryTest  TestNG-test=All tests-3@1938688024
20/09/23 22:39:04 2102      loginTest11TestNG-test=All tests-2@1106551392
20/09/23 22:39:04 2101      createPlaylistTest11TestNG-test=All tests-4@718733769
20/09/23 22:39:04 2101      loginTest1TestNG-test=All tests-1@1595163139
20/09/23 22:39:04 2101      createPlaylistTest1TestNG-test=All tests-3@1938688024
20/09/23 22:39:05 3336     <<tearDown  TestNG-test=All tests-1@1595163139
20/09/23 22:39:05 3397     <<tearDown  TestNG-test=All tests-2@1106551392
20/09/23 22:39:07 5085     <<tearDown  TestNG-test=All tests-4@718733769
20/09/23 22:39:07 5145     <<tearDown  TestNG-test=All tests-3@1938688024
20/09/23 22:39:10 8418     >>beforeEveryTest  TestNG-test=All tests-1@1595163139
20/09/23 22:39:10 8474     >>beforeEveryTest  TestNG-test=All tests-2@1106551392
20/09/23 22:39:10 8935      negativeLoginTest2TestNG-test=All tests-1@1595163139
20/09/23 22:39:10 8971      negativeLoginTest11TestNG-test=All tests-2@1106551392
20/09/23 22:39:12 10166     >>beforeEveryTest  TestNG-test=All tests-4@718733769
20/09/23 22:39:12 10220     >>beforeEveryTest  TestNG-test=All tests-3@1938688024
20/09/23 22:39:12 10701      renamePlaylistTest11TestNG-test=All tests-4@718733769
20/09/23 22:39:12 10770      renamePlaylistTest1TestNG-test=All tests-3@1938688024
20/09/23 22:39:15 13563     <<tearDown  TestNG-test=All tests-4@718733769
20/09/23 22:39:15 13663     <<tearDown  TestNG-test=All tests-3@1938688024
20/09/23 22:39:16 14561     <<tearDown  TestNG-test=All tests-1@1595163139
20/09/23 22:39:16 14573     <<tearDown  TestNG-test=All tests-2@1106551392
20/09/23 22:39:20 18636     >>beforeEveryTest  TestNG-test=All tests-4@718733769
20/09/23 22:39:20 18737     >>beforeEveryTest  TestNG-test=All tests-3@1938688024
20/09/23 22:39:21 19118      renamePlaylistTest11TestNG-test=All tests-4@718733769
20/09/23 22:39:21 19205      createPlaylistTest2TestNG-test=All tests-3@1938688024
20/09/23 22:39:21 19633     >>beforeEveryTest  TestNG-test=All tests-1@1595163139
20/09/23 22:39:21 19648     >>beforeEveryTest  TestNG-test=All tests-2@1106551392
20/09/23 22:39:22 20177      loginTest3TestNG-test=All tests-1@1595163139
20/09/23 22:39:22 20194      loginTest22TestNG-test=All tests-2@1106551392
20/09/23 22:39:23 21385     <<tearDown  TestNG-test=All tests-1@1595163139
20/09/23 22:39:23 21762     <<tearDown  TestNG-test=All tests-3@1938688024
20/09/23 22:39:24 22252     <<tearDown  TestNG-test=All tests-4@718733769
20/09/23 22:39:27 26001     <<tearDown  TestNG-test=All tests-2@1106551392
20/09/23 22:39:28 26459     >>beforeEveryTest  TestNG-test=All tests-1@1595163139
20/09/23 22:39:28 26839     >>beforeEveryTest  TestNG-test=All tests-3@1938688024
20/09/23 22:39:28 26912      negativeLoginTest3TestNG-test=All tests-1@1595163139
20/09/23 22:39:29 27293      renamePlaylistTest2TestNG-test=All tests-3@1938688024
20/09/23 22:39:29 27326     >>beforeEveryTest  TestNG-test=All tests-4@718733769
20/09/23 22:39:29 27775      renamePlaylistTest11TestNG-test=All tests-4@718733769
20/09/23 22:39:31 30075     <<tearDown  TestNG-test=All tests-3@1938688024
20/09/23 22:39:32 30504     <<tearDown  TestNG-test=All tests-4@718733769
20/09/23 22:39:33 31566     >>beforeEveryTest  TestNG-test=All tests-2@1106551392
20/09/23 22:39:33 31986      negativeLoginTest22TestNG-test=All tests-2@1106551392
20/09/23 22:39:34 32518     <<tearDown  TestNG-test=All tests-1@1595163139
20/09/23 22:39:37 35579     >>beforeEveryTest  TestNG-test=All tests-4@718733769
20/09/23 22:39:37 35987      createPlaylistTest22TestNG-test=All tests-4@718733769
20/09/23 22:39:39 37550     <<tearDown  TestNG-test=All tests-2@1106551392
20/09/23 22:39:39 37590     >>beforeEveryTest  TestNG-test=All tests-1@1595163139
20/09/23 22:39:39 38018      loginTest4TestNG-test=All tests-1@1595163139
20/09/23 22:39:40 38305     <<tearDown  TestNG-test=All tests-4@718733769
20/09/23 22:39:40 38905     <<tearDown  TestNG-test=All tests-1@1595163139
20/09/23 22:39:44 42623     >>beforeEveryTest  TestNG-test=All tests-2@1106551392
20/09/23 22:39:44 43040      loginTest33TestNG-test=All tests-2@1106551392
20/09/23 22:39:45 43378     >>beforeEveryTest  TestNG-test=All tests-4@718733769
20/09/23 22:39:45 43966      renamePlaylistTest22TestNG-test=All tests-4@718733769
20/09/23 22:39:45 43981     >>beforeEveryTest  TestNG-test=All tests-1@1595163139
20/09/23 22:39:46 44115     <<tearDown  TestNG-test=All tests-2@1106551392
20/09/23 22:39:46 44479      negativeLoginTest4TestNG-test=All tests-1@1595163139
20/09/23 22:39:48 46651     <<tearDown  TestNG-test=All tests-4@718733769
20/09/23 22:39:51 49187     >>beforeEveryTest  TestNG-test=All tests-2@1106551392
20/09/23 22:39:51 49603      negativeLoginTest33TestNG-test=All tests-2@1106551392
20/09/23 22:39:51 50053     <<tearDown  TestNG-test=All tests-1@1595163139
20/09/23 22:39:57 55131     <<tearDown  TestNG-test=All tests-2@1106551392
20/09/23 22:40:02 60211     >>beforeEveryTest  TestNG-test=All tests-2@1106551392
20/09/23 22:40:02 60633      loginTest44TestNG-test=All tests-2@1106551392
20/09/23 22:40:03 61548     <<tearDown  TestNG-test=All tests-2@1106551392
20/09/23 22:40:08 66631     >>beforeEveryTest  TestNG-test=All tests-2@1106551392
20/09/23 22:40:08 67073      negativeLoginTest44TestNG-test=All tests-2@1106551392
20/09/23 22:40:14 72641     <<tearDown  TestNG-test=All tests-2@1106551392
diff --git a/test-output/old/Master Suite/reporter-output.html b/test-output/old/Master Suite/reporter-output.html new file mode 100644 index 0000000..063bc2e --- /dev/null +++ b/test-output/old/Master Suite/reporter-output.html @@ -0,0 +1 @@ +

Reporter output

\ No newline at end of file diff --git a/test-output/old/Master Suite/testng.xml.html b/test-output/old/Master Suite/testng.xml.html new file mode 100644 index 0000000..71f83d7 --- /dev/null +++ b/test-output/old/Master Suite/testng.xml.html @@ -0,0 +1 @@ +testng.xml for Master Suite<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="4" parallel="classes" name="Master Suite" guice-stage="DEVELOPMENT">
  <parameter name="password" value="te$t$tudent"/>
  <parameter name="browser" value="Chrome"/>
  <parameter name="username" value="koeluser06@testpro.io"/>
  <listeners>
    <listener class-name="listeners.Listeners"/>
  </listeners>
  <test thread-count="4" parallel="classes" name="All tests">
    <classes>
      <class name="koel_PageTests_My.LoginTest_my">
        <methods>
          <include name="loginTest1"/>
          <include name="negativeLoginTest1"/>
          <include name="negativeLoginTest2"/>
          <include name="loginTest3"/>
          <include name="negativeLoginTest3"/>
          <include name="loginTest4"/>
          <include name="negativeLoginTest4"/>
          <exclude name="loginTest2"/>
        </methods>
      </class> <!-- koel_PageTests_My.LoginTest_my -->
      <class name="koel_PageTests_My.LoginTest_my1">
        <methods>
          <include name="loginTest11"/>
          <include name="negativeLoginTest11"/>
          <include name="loginTest22"/>
          <include name="negativeLoginTest22"/>
          <include name="loginTest33"/>
          <include name="negativeLoginTest33"/>
          <include name="loginTest44"/>
          <include name="negativeLoginTest44"/>
        </methods>
      </class> <!-- koel_PageTests_My.LoginTest_my1 -->
      <class name="koel_PageTests_My.PlaylistTest_my">
        <methods>
          <include name="createPlaylistTest1"/>
          <include name="renamePlaylistTest1"/>
          <include name="createPlaylistTest2"/>
          <include name="renamePlaylistTest2"/>
        </methods>
      </class> <!-- koel_PageTests_My.PlaylistTest_my -->
      <class name="koel_PageTests_My.PlaylistTest_my1">
        <methods>
          <include name="createPlaylistTest11"/>
          <include name="renamePlaylistTest11"/>
          <include name="createPlaylistTest22"/>
          <include name="renamePlaylistTest22"/>
        </methods>
      </class> <!-- koel_PageTests_My.PlaylistTest_my1 -->
    </classes>
  </test> <!-- All tests -->
  <test thread-count="4" parallel="classes" name="Other Tests">
  </test> <!-- Other Tests -->
</suite> <!-- Master Suite -->
\ No newline at end of file diff --git a/test-output/old/Master Suite/toc.html b/test-output/old/Master Suite/toc.html new file mode 100644 index 0000000..96bb008 --- /dev/null +++ b/test-output/old/Master Suite/toc.html @@ -0,0 +1,38 @@ + + +Results for Master Suite + + + + +

Results for
Master Suite

+ + + + + + + + + + +
2 tests4 classes22 methods:
+  chronological
+  alphabetical
+  not run (2)
0 groupreporter outputtestng.xml
+ +

+

+
All tests (21/1/2) + Results +
+
+ + +

+

+
Other Tests (0/0/0) + Results +
+
+ \ No newline at end of file diff --git a/test-output/old/index.html b/test-output/old/index.html new file mode 100644 index 0000000..b21ecbe --- /dev/null +++ b/test-output/old/index.html @@ -0,0 +1,9 @@ + + + + +

Test results

+ + + +
SuitePassedFailedSkippedtestng.xml
Total2112 
Master Suite2112Link
diff --git a/test-output/passed.png b/test-output/passed.png new file mode 100644 index 0000000..45e85bb Binary files /dev/null and b/test-output/passed.png differ diff --git a/test-output/skipped.png b/test-output/skipped.png new file mode 100644 index 0000000..c36a324 Binary files /dev/null and b/test-output/skipped.png differ diff --git a/test-output/testng-failed.xml b/test-output/testng-failed.xml new file mode 100644 index 0000000..b1ff5ad --- /dev/null +++ b/test-output/testng-failed.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-output/testng-reports.css b/test-output/testng-reports.css new file mode 100644 index 0000000..6c65926 --- /dev/null +++ b/test-output/testng-reports.css @@ -0,0 +1,309 @@ +body { + margin: 0px 0px 5px 5px; +} + +ul { + margin: 0px; +} + +li { + list-style-type: none; +} + +a { + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +.navigator-selected { + background: #ffa500; +} + +.wrapper { + position: absolute; + top: 60px; + bottom: 0; + left: 400px; + right: 0; + overflow: auto; +} + +.navigator-root { + position: absolute; + top: 60px; + bottom: 0; + left: 0; + width: 400px; + overflow-y: auto; +} + +.suite { + margin: 0px 10px 10px 0px; + background-color: #fff8dc; +} + +.suite-name { + padding-left: 10px; + font-size: 25px; + font-family: Times; +} + +.main-panel-header { + padding: 5px; + background-color: #9FB4D9; //afeeee; + font-family: monospace; + font-size: 18px; +} + +.main-panel-content { + padding: 5px; + margin-bottom: 10px; + background-color: #DEE8FC; //d0ffff; +} + +.rounded-window { + border-radius: 10px; + border-style: solid; + border-width: 1px; +} + +.rounded-window-top { + border-top-right-radius: 10px 10px; + border-top-left-radius: 10px 10px; + border-style: solid; + border-width: 1px; + overflow: auto; +} + +.light-rounded-window-top { + border-top-right-radius: 10px 10px; + border-top-left-radius: 10px 10px; +} + +.rounded-window-bottom { + border-style: solid; + border-width: 0px 1px 1px 1px; + border-bottom-right-radius: 10px 10px; + border-bottom-left-radius: 10px 10px; + overflow: auto; +} + +.method-name { + font-size: 12px; + font-family: monospace; +} + +.method-content { + border-style: solid; + border-width: 0px 0px 1px 0px; + margin-bottom: 10; + padding-bottom: 5px; + width: 80%; +} + +.parameters { + font-size: 14px; + font-family: monospace; +} + +.stack-trace { + white-space: pre; + font-family: monospace; + font-size: 12px; + font-weight: bold; + margin-top: 0px; + margin-left: 20px; +} + +.testng-xml { + font-family: monospace; +} + +.method-list-content { + margin-left: 10px; +} + +.navigator-suite-content { + margin-left: 10px; + font: 12px 'Lucida Grande'; +} + +.suite-section-title { + margin-top: 10px; + width: 80%; + border-style: solid; + border-width: 1px 0px 0px 0px; + font-family: Times; + font-size: 18px; + font-weight: bold; +} + +.suite-section-content { + list-style-image: url(bullet_point.png); +} + +.top-banner-root { + position: absolute; + top: 0; + height: 45px; + left: 0; + right: 0; + padding: 5px; + margin: 0px 0px 5px 0px; + background-color: #0066ff; + font-family: Times; + color: #fff; + text-align: center; +} + +.top-banner-title-font { + font-size: 25px; +} + +.test-name { + font-family: 'Lucida Grande'; + font-size: 16px; +} + +.suite-icon { + padding: 5px; + float: right; + height: 20; +} + +.test-group { + font: 20px 'Lucida Grande'; + margin: 5px 5px 10px 5px; + border-width: 0px 0px 1px 0px; + border-style: solid; + padding: 5px; +} + +.test-group-name { + font-weight: bold; +} + +.method-in-group { + font-size: 16px; + margin-left: 80px; +} + +table.google-visualization-table-table { + width: 100%; +} + +.reporter-method-name { + font-size: 14px; + font-family: monospace; +} + +.reporter-method-output-div { + padding: 5px; + margin: 0px 0px 5px 20px; + font-size: 12px; + font-family: monospace; + border-width: 0px 0px 0px 1px; + border-style: solid; +} + +.ignored-class-div { + font-size: 14px; + font-family: monospace; +} + +.ignored-methods-div { + padding: 5px; + margin: 0px 0px 5px 20px; + font-size: 12px; + font-family: monospace; + border-width: 0px 0px 0px 1px; + border-style: solid; +} + +.border-failed { + border-top-left-radius: 10px 10px; + border-bottom-left-radius: 10px 10px; + border-style: solid; + border-width: 0px 0px 0px 10px; + border-color: #f00; +} + +.border-skipped { + border-top-left-radius: 10px 10px; + border-bottom-left-radius: 10px 10px; + border-style: solid; + border-width: 0px 0px 0px 10px; + border-color: #edc600; +} + +.border-passed { + border-top-left-radius: 10px 10px; + border-bottom-left-radius: 10px 10px; + border-style: solid; + border-width: 0px 0px 0px 10px; + border-color: #19f52d; +} + +.times-div { + text-align: center; + padding: 5px; +} + +.suite-total-time { + font: 16px 'Lucida Grande'; +} + +.configuration-suite { + margin-left: 20px; +} + +.configuration-test { + margin-left: 40px; +} + +.configuration-class { + margin-left: 60px; +} + +.configuration-method { + margin-left: 80px; +} + +.test-method { + margin-left: 100px; +} + +.chronological-class { + background-color: #0ccff; + border-style: solid; + border-width: 0px 0px 1px 1px; +} + +.method-start { + float: right; +} + +.chronological-class-name { + padding: 0px 0px 0px 5px; + color: #008; +} + +.after, .before, .test-method { + font-family: monospace; + font-size: 14px; +} + +.navigator-suite-header { + font-size: 22px; + margin: 0px 10px 5px 0px; + background-color: #deb887; + text-align: center; +} + +.collapse-all-icon { + padding: 5px; + float: right; +} diff --git a/test-output/testng-reports.js b/test-output/testng-reports.js new file mode 100644 index 0000000..b147043 --- /dev/null +++ b/test-output/testng-reports.js @@ -0,0 +1,122 @@ +$(document).ready(function() { + $('a.navigator-link').click(function() { + // Extract the panel for this link + var panel = getPanelName($(this)); + + // Mark this link as currently selected + $('.navigator-link').parent().removeClass('navigator-selected'); + $(this).parent().addClass('navigator-selected'); + + showPanel(panel); + }); + + installMethodHandlers('failed'); + installMethodHandlers('skipped'); + installMethodHandlers('passed', true); // hide passed methods by default + + $('a.method').click(function() { + showMethod($(this)); + return false; + }); + + // Hide all the panels and display the first one (do this last + // to make sure the click() will invoke the listeners) + $('.panel').hide(); + $('.navigator-link').first().click(); + + // Collapse/expand the suites + $('a.collapse-all-link').click(function() { + var contents = $('.navigator-suite-content'); + if (contents.css('display') == 'none') { + contents.show(); + } else { + contents.hide(); + } + }); +}); + +// The handlers that take care of showing/hiding the methods +function installMethodHandlers(name, hide) { + function getContent(t) { + return $('.method-list-content.' + name + "." + t.attr('panel-name')); + } + + function getHideLink(t, name) { + var s = 'a.hide-methods.' + name + "." + t.attr('panel-name'); + return $(s); + } + + function getShowLink(t, name) { + return $('a.show-methods.' + name + "." + t.attr('panel-name')); + } + + function getMethodPanelClassSel(element, name) { + var panelName = getPanelName(element); + var sel = '.' + panelName + "-class-" + name; + return $(sel); + } + + $('a.hide-methods.' + name).click(function() { + var w = getContent($(this)); + w.hide(); + getHideLink($(this), name).hide(); + getShowLink($(this), name).show(); + getMethodPanelClassSel($(this), name).hide(); + }); + + $('a.show-methods.' + name).click(function() { + var w = getContent($(this)); + w.show(); + getHideLink($(this), name).show(); + getShowLink($(this), name).hide(); + showPanel(getPanelName($(this))); + getMethodPanelClassSel($(this), name).show(); + }); + + if (hide) { + $('a.hide-methods.' + name).click(); + } else { + $('a.show-methods.' + name).click(); + } +} + +function getHashForMethod(element) { + return element.attr('hash-for-method'); +} + +function getPanelName(element) { + return element.attr('panel-name'); +} + +function showPanel(panelName) { + $('.panel').hide(); + var panel = $('.panel[panel-name="' + panelName + '"]'); + panel.show(); +} + +function showMethod(element) { + var hashTag = getHashForMethod(element); + var panelName = getPanelName(element); + showPanel(panelName); + var current = document.location.href; + var base = current.substring(0, current.indexOf('#')) + document.location.href = base + '#' + hashTag; + var newPosition = $(document).scrollTop() - 65; + $(document).scrollTop(newPosition); +} + +function drawTable() { + for (var i = 0; i < suiteTableInitFunctions.length; i++) { + window[suiteTableInitFunctions[i]](); + } + + for (var k in window.suiteTableData) { + var v = window.suiteTableData[k]; + var div = v.tableDiv; + var data = v.tableData + var table = new google.visualization.Table(document.getElementById(div)); + table.draw(data, { + showRowNumber : false + }); + } +} diff --git a/test-output/testng-results.xml b/test-output/testng-results.xml new file mode 100644 index 0000000..5c5dfd6 --- /dev/null +++ b/test-output/testng-results.xml @@ -0,0 +1,966 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-output/testng.css b/test-output/testng.css new file mode 100644 index 0000000..3904800 --- /dev/null +++ b/test-output/testng.css @@ -0,0 +1,9 @@ +.invocation-failed, .test-failed { background-color: #DD0000; } +.invocation-percent, .test-percent { background-color: #006600; } +.invocation-passed, .test-passed { background-color: #00AA00; } +.invocation-skipped, .test-skipped { background-color: #CCCC00; } + +.main-page { + font-size: x-large; +} + diff --git a/testngChrome.xml b/testngChrome.xml index d73853e..558e028 100644 --- a/testngChrome.xml +++ b/testngChrome.xml @@ -6,7 +6,6 @@ - diff --git a/testng_my.xml b/testng_my.xml new file mode 100644 index 0000000..f85a85e --- /dev/null +++ b/testng_my.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testng_my_Chrome.xml b/testng_my_Chrome.xml new file mode 100644 index 0000000..0146c39 --- /dev/null +++ b/testng_my_Chrome.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testng_my_Firefox.xml b/testng_my_Firefox.xml new file mode 100644 index 0000000..e9064be --- /dev/null +++ b/testng_my_Firefox.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file