Skip to content

Commit 10bb4fa

Browse files
ffannyrogerwang
authored andcommitted
Added docs for "run nightly test"
1 parent 938758f commit 10bb4fa

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

docs/For Developers/Contributors of Documents.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33

44
* Roger Wang <roger@nwjs.io>
55
* Cong Liu <cong.liu@intel.com>
6-
* Oleg Aleynik <oleg.aleynik@gmail.com>
6+
* Oleg Aleynik <oleg.aleynik@gmail.com>
7+
* Yang Fan <yangfan.23@qq.com>

docs/For Developers/Writing Test Cases for NW.js.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,27 @@ clickme.click() # click the button
7575
result = driver.find_element_by_id('result')
7676
assert("success" in result.get_attribute('innerHTML')) # assert "success" is in the element
7777
```
78+
## Run Nightly Test Cases
79+
80+
Here are some preparations before testing.
81+
82+
1.Download NW SDK version.
83+
84+
2.Downloading selenium python library for NW with git.
85+
The repo address and the git commit id is in [manage dependencies](https://github.com/nwjs/nw.js/blob/nw35/DEPS)(replace nw35 with the proper branch name if you are not testing 0.35).
86+
Look for 'third_party/webdriver/pylib' in deps part of that file. The form you will see is as follows:
87+
```js
88+
'src/third_party/webdriver/pylib':
89+
Var('chromium_git') + '/external/selenium/py.git' + '@' + 'expected commit id',
90+
```
91+
Then look for the value of Var(e.g.`chromium_git`) in vars part of that file. After you clone the pylib repo, make sure the git tip commit id is the same as expected.
92+
93+
3.Set environment variables.
94+
Set `CHROMEDRIVER` to the path of chromedriver.exe in NW SDK; set `PYTHONPATH` to the 'py' folder you cloned.
95+
96+
4.Install Python 2.7 if needed.
97+
98+
5.Clone nw source repo: [nwjs](https://github.com/nwjs/nw.js).
99+
100+
Then you can change directory to nw repo/test;
101+
run ```python test.py -d <path to NW SDK> -t 60 sanity```

0 commit comments

Comments
 (0)