Skip to content

Commit 2966f16

Browse files
committed
added automate config
1 parent 8e7ce92 commit 2966f16

File tree

157 files changed

+12113
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+12113
-1
lines changed

.DS_Store

6 KB
Binary file not shown.

DOC/addBddTest.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
#Add Test (BDD)
2+
This doc describes how to add new BDD test.
3+
The test will browse to [www.kayak.com.com](https://www.kayak.com/) and looks for flights between Boston and New York.
4+
5+
Before we start, just verify you have the Cucumber plugin installed:
6+
7+
*IntelliJ:* **File > Settings > Plugins** add looks fot **Cucumber for Java**
8+
![import](image/plugin.png?raw=true "plug")
9+
10+
11+
###Step 1 - Add the feature file
12+
* __Go to__ *src > Main > resources > scenarios*
13+
* Create new file named **kayak.feature**
14+
* First add feature tag: **@kayak**
15+
* Add the Test Suite name (Feature) **Feature: find_flight**
16+
* Add the first test (Scenario) **Scenario: kayak flight**
17+
* Add the first line
18+
* Type **Given I** (*you should see autocomplete for all the commands*) ![import](image/auto.png?raw=true "auto")
19+
* Select the command:
20+
* **I open browser to webpage "https://www.kayak.com"**
21+
22+
Your script should looks like:
23+
![import](image/script1.png?raw=true "auto")
24+
25+
###Step 2 - Execute the basic test
26+
* In order to execute the test we should edit our testNG.xml file:
27+
* Goto */src/main/resources/config*
28+
* Copy the file testng_web.xml to Kayak.xml
29+
* Change the group to **@kayak**
30+
31+
**Lets add one more execution on specific device**
32+
* copy the \<test XML\> and replace the line of
33+
34+
* ```\<parameter name="driver.capabilities.model" value="Galaxy.*"></parameter> ```
35+
36+
with
37+
38+
* ``` \<parameter name="driver.capabilities.deviceName" value="DEVICEID"></parameter> ```
39+
40+
You also need to change the name tag.
41+
42+
#####Your xml should look like:
43+
![import](image/testngxml.png?raw=true "xmlng")
44+
45+
#####Execute with TestNG
46+
* Goto upper left side of your screen
47+
48+
![import](image/editrun.png?raw=true "xml")
49+
50+
* select **Edit Configurations...**
51+
* Press [+] select testNG and poit to the new file we created
52+
53+
![import](image/runG.png?raw=true "rg")
54+
55+
###Step 3 Build objects reposotpry
56+
* Goto Perfecto IDE open browser on a device and go to : www.kayak.com
57+
* Open the **Object Spy**
58+
* First I want to press on the flights using the following xpath
59+
* ```//*[@class='fdTopNavLink flights tap-enabled']```
60+
61+
* Creating the objects repository file:
62+
* goto src/main/resources/common, create a new file **kayak.loc** and add the line:
63+
* ```flights = xpath=[@class='fdTopNavLink flights tap-enabled']```
64+
* it means we named this button as a flights_bt.
65+
66+
* I mapped all the elements and the file looks:
67+
* ```flights_bt = xpath=//\*[@class='fdTopNavLink flights tap-enabled']
68+
from\_bt = xpath=//\*[text()='From']
69+
from\_to\_input= xpath=//\*[@type='text']
70+
to\_bt = xpath=//\*[text()='To']
71+
results = xpath=//\*[@class='r9-smarty-results']/span[3]
72+
find\_fligth\_bt =xpath=//\*[text()='Find Flights']```
73+
74+
###Step 4 Finish the test
75+
* Return to the **Kayak.feature** file and finish the flow; use the pre-defined steps and the object names from the repository file.
76+
* The Script should looks:
77+
![import](image/script2.png?raw=true "auto")
78+
79+
**Execute again and monitoring the devices in Perfecto dashboard**
80+
81+
82+
83+
84+
85+
86+
87+
88+
89+
90+
91+
92+
93+
94+

DOC/image/image.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
list of images

DOC/image/perfecto.jpg

14.4 KB
Loading

DOC/stepByStepIntelliJ.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Quantum- Step by step installation guide to intelliJ
2+
3+
**Step 1 - Download the project**
4+
goto [Starter Kit](https://github.com/Project-Quantum/Quantum-Starter-Kit) and press on the button **Download ZIP**
5+
6+
![git](image/gitDownload.png?raw=true "Title")
7+
8+
Unzip and save the project in your working area (on your computer)
9+
10+
11+
12+
**step 2 - import the project to IntelliJ**
13+
14+
* open IntelliJ and select the Import Project option:
15+
16+
![import](image/import.png?raw=true "impotr")
17+
18+
19+
* next, check the import project from external model and select Maven
20+
21+
![impMaven](image/impMaven.png?raw=true "impMaven")
22+
23+
24+
*If you don't see Maven option, please should install the Maven plugin.*
25+
26+
Continue and follow the wizard [Default Next, Next ,Finish options]
27+
28+
* lets build the project, right click on the pom.xml file > Maven > Reimport
29+
30+
![impMaven](image/reimp.png?raw=true "impMaven")
31+
32+
It can take few minutes and in the end the project should looks:
33+
![Proj](image/proj.png?raw=true "impMaven")
34+
35+
36+
**Step 3 - Configure the Cloud**
37+
38+
Goto resources > application.properties
39+
40+
![appProp](image/appConf.png)
41+
42+
Update the following parameters:
43+
44+
**remote.server**=https://[*YourCloud*].perfectomobile.com/nexperience/perfectomobile/wd/hub
45+
**perfecto.capabilities.user**=*Your Perfectp User*
46+
**perfecto.capabilities.password**=*Your Perfecto Password*
47+
48+
49+
**Step 4 - Verfiy the Feature and Test files**
50+
Feature file is a collection of scenarios (tests), this first example show how to open browser and looks for different string in google.
51+
![scenario](image/1scenario.png)
52+
53+
Quantum execution is based on testNG, before the execution lets check the testNG.xml file
54+
Goto > src > main > resources > config > testng_web.xml
55+
![testNG](image/tngxml.png)
56+
57+
The file you should see:
58+
59+
![test](image/test.png)
60+
In the xml <test> define on device , in this case it will execute on any Galaxy device
61+
62+
**Step 5 - Execute**
63+
Before executing the script we need to configure the execution on intelliJ
64+
65+
Please follow these steps:
66+
67+
* Click on the small arrow in the top right frame
68+
* Press the + and select Maven
69+
* Set the name and save it
70+
![test](image/exeConf.png)
71+
72+
**Press the Green Button**
73+
The script should be executed on the device in the cloud.
74+
75+
212 KB
Loading
108 KB
Loading
510 KB
Loading
511 KB
Loading
591 KB
Loading

0 commit comments

Comments
 (0)