Merge lp:~coreygoldberg/selenium-simple-test/bump-version-0-2-5dev into lp:selenium-simple-test

Proposed by Corey Goldberg
Status: Merged
Approved by: Corey Goldberg
Approved revision: 436
Merged at revision: 431
Proposed branch: lp:~coreygoldberg/selenium-simple-test/bump-version-0-2-5dev
Merge into: lp:selenium-simple-test
Diff against target: 407 lines (+30/-312)
4 files modified
README (+14/-301)
docs/changelog.rst (+4/-0)
docs/releasing.rst (+11/-10)
src/sst/__init__.py (+1/-1)
To merge this branch: bzr merge lp:~coreygoldberg/selenium-simple-test/bump-version-0-2-5dev
Reviewer Review Type Date Requested Status
Corey Goldberg (community) Approve
Vincent Ladeuil (community) Approve
Review via email: mp+177696@code.launchpad.net

Commit message

bump version to 0.2.5dev

Description of the change

bumped version number to 0.2.5dev (post-release)

To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) wrote :

Would be worth adding the header in docs/changelog.rst no ?

Revision history for this message
Vincent Ladeuil (vila) wrote :

I encounter issues with packaging around the version string.

It appears that '0.2.4dev' is greater than '0.2.4' so both 'bzr merge-upstream' and the ppa fail to recognize '0.2.4' as the final release version string.

We need to use a different scheme than appending 'dev'.

And the simplest way to address the packaging issues would be to release '0.2.5' as a bump-release-version only :-/

review: Needs Fixing
Revision history for this message
Vincent Ladeuil (vila) wrote :

Appending '~dev' instead of 'dev' should work.

Revision history for this message
Vincent Ladeuil (vila) wrote :

Never mind, I've found a workaround for the ppa: I released a 0.2.5~bzr430-0ubuntu2 which is really 0.2.4.

I'll file a merge proposal for my updates of the packaging.rst doc once 0.2.5 is opened.

In summary, just create the section in changelog.rst and we'll be good.

432. By Corey Goldberg

updated README to match index.rst content

433. By Corey Goldberg

fixed rst headers in release instructions

434. By Corey Goldberg

added changelog section for 0.2.5

Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

added the changelog section, and updated README properly. I should have done that *before* release :/

Revision history for this message
Corey Goldberg (coreygoldberg) :
review: Needs Resubmitting
Revision history for this message
Vincent Ladeuil (vila) wrote :

We shouldn't duplicate that much between README and index.rst especially when we have up-to-date doc online as per the release process :-/

Would you mind simplify the README in this direction ?

305 - * run `make_actions_rst.py` under /docs, which will create `actions.rst`
306 -

Why did you remove that ? AFAIR, I added it because it's required and wasn't easy to guess.

Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

> We shouldn't duplicate that much between README and index.rst

I think I agree. So, the README is what ends up on the PyPI index page as documentation when we release there. It made sense to have some basic instructions/examples for using it there (common practice)... but it's grown much too big :)

I can trim it down to just a few line description with a link to the official web docs. I think that makes more sense.

> Why did you remove that ?

that step was duplicated.. it's already listed in the step above.

http://bazaar.launchpad.net/~coreygoldberg/selenium-simple-test/bump-version-0-2-5dev/view/head:/docs/releasing.rst#L35

Revision history for this message
Vincent Ladeuil (vila) wrote :

> > We shouldn't duplicate that much between README and index.rst
>
> I think I agree. So, the README is what ends up on the PyPI index page as
> documentation when we release there. It made sense to have some basic
> instructions/examples for using it there (common practice)... but it's grown
> much too big :)
>
> I can trim it down to just a few line description with a link to the official
> web docs. I think that makes more sense.

Great, let's do that !

>
>
>
> > Why did you remove that ?
>
> that step was duplicated.. it's already listed in the step above.

/me blinks

WTH ?

Oh, I think I remember now. 'generate HTML documentation' is what I was looking for. 'generate actions doc' doesn't make much sense to me at the time.

I think having all steps in 'generate HTML documentation' is clearer so the reader doesn't have to guess the relationship between the two steps.

Does that make sense ?

Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

> > I can trim it down to just a few line description with a link to the
> official
> > web docs. I think that makes more sense.
>
> Great, let's do that !

will do. I will update this branch.

> > > Why did you remove that ?
> >
> > that step was duplicated.. it's already listed in the step above.
>
> /me blinks
> I think having all steps in 'generate HTML documentation' is clearer so the
> reader doesn't have to guess the relationship between the two steps.
>
> Does that make sense ?

yes, I'll update as well.

435. By Corey Goldberg

moved generate actions.rst instructions within release doc

436. By Corey Goldberg

trimmed down README

Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

pushed.

Revision history for this message
Vincent Ladeuil (vila) wrote :

<3 So much clearer !

Thanks for the fixes in releasing.txt, I can never find the correct rst rules... there are so many of them used differently on different projects ;-D

review: Approve
Revision history for this message
Corey Goldberg (coreygoldberg) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README'
--- README 2013-06-03 18:15:36 +0000
+++ README 2013-07-31 18:03:25 +0000
@@ -16,16 +16,17 @@
16SST (selenium-simple-test) is a web test framework that uses Python16SST (selenium-simple-test) is a web test framework that uses Python
17to generate functional browser-based tests.17to generate functional browser-based tests.
1818
19Tests are made up of scripts, created by composing actions that drive19Tests are made up of scripts or test case classes, created by composing
20a browser and assert conditions. You have the flexibilty of the full20actions that drive a browser and assert conditions. You have the flexibilty
21Python language, along with a convenient set of functions to simplify21of the full Python language, along with a convenient set of functions to
22web testing.22simplify web testing.
2323
24SST consists of:24SST consists of:
2525
26 * user actions and assertions (API) in Python26 * user actions and assertions (API) in Python
27 * test case loader (generates/compiles scripts to unittest cases)27 * test case loader (generates/compiles scripts to unittest cases)
28 * console test runner28 * console test runner
29 * concurrent/parallel tests
29 * data parameterization/injection30 * data parameterization/injection
30 * selectable output reports31 * selectable output reports
31 * selectable browsers32 * selectable browsers
@@ -40,304 +41,16 @@
40 Install41 Install
41-----------42-----------
4243
43SST can be installed from `PyPI <http://pypi.python.org/pypi/sst>`_ using44SST can be installed or upgraded from `PyPI <http://pypi.python.org/pypi/sst>`_ using
44`pip <http://www.pip-installer.org>`_::45`pip <http://www.pip-installer.org>`_::
4546
46 pip install -U sst47 pip install -U sst
4748
48For example, on an Ubuntu/Debian system, you could Install SST (system-wide)49
49like this::50--------------------------
5051 Official Documentation
51 $ sudo apt-get install python-pip xvfb52--------------------------
52 $ sudo pip install -U sst53
5354Please visit the official docs at: `http://testutils.org/sst <http://testutils.org/sst>`_
54or with a `virtualenv`::55
5556For the full `actions` reference, go directly to: `http://testutils.org/sst/actions.html <http://testutils.org/sst/actions.html>`_
56 $ sudo apt-get install python-virtualenv xvfb
57 $ virtualenv ENV
58 $ source ENV/bin/activate
59 (ENV)$ pip install sst
60
61* note: `xvfb` is only needed if you want to run SST in headless mode
62
63
64---------------------------
65 Example SST test script
66---------------------------
67
68a sample test case in SST::
69
70 from sst.actions import *
71
72 go_to('http://www.ubuntu.com/')
73 assert_title_contains('Ubuntu')
74
75
76------------------------------------
77 Running a test with SST
78------------------------------------
79
80Create a Python script (.py) file, and add your test code.
81
82Then call your test script from the command line, using `sst-run`::
83
84 $ sst-run mytest
85
86* note: you don't add the .py extension to your test invocation
87
88
89-----------------------------------
90 Actions reference (sst.actions)
91-----------------------------------
92
93Test scripts perform actions in the browser as if they were a user.
94SST provides a set of "actions" (functions) for use in your tests.
95These actions are defined in the following API:
96
97 * `Actions Reference <http://testutils.org/sst/actions.html>`_
98
99
100------------------------------------
101 Command line options for sst-run
102------------------------------------
103
104Usage: `sst-run <options> [testname]`
105
106* Calling sst-run with testname(s) as arguments will just run
107 those tests. The testnames should not include '.py' at
108 the end of the filename.
109
110* You may optionally create a data file for data-driven
111 testing. Create a '^' delimited txt data file with the same
112 name as the test, plus the '.csv' extension. This will
113 run a test using each row in the data file (1st row of data
114 file is variable name mapping)
115
116Options::
117
118 -h, --help show this help message and exit
119 -d DIR_NAME directory of test case files
120 -r REPORT_FORMAT report type: xml
121 -b BROWSER_TYPE select webdriver (Firefox, Chrome, PhantomJS, etc)
122 -j disable javascript in browser
123 -m SHARED_MODULES directory for shared modules
124 -q output less debugging info during test run
125 -V print version info and exit
126 -s save screenshots on failures
127 -x run browser in headless xserver (Xvfb)
128 --failfast stop test execution after first failure
129 --debug drop into debugger on test fail or error
130 --with-flags=WITH_FLAGS comma separated list of flags to run tests with
131 --disable-flag-skips run all tests, disable skipping tests due to flags
132 --extended-tracebacks add extra information (page source) to failure reports
133 --collect-only collect/print cases without running tests
134 --test run selftests (acceptance tests with django server)
135
136
137--------------------
138 Organizing tests
139--------------------
140
141For logical organization of tests, you can use directories in your filesystem.
142SST will recursively walk your directory tree and gather all tests for
143execution.
144
145For example, a simple test setup might look like::
146
147 /selenium-simple-test
148 /mytests
149 foo.py
150
151and you would call this from the command line::
152
153 $ sst-run -d mytests
154
155A more complex setup might look like::
156
157 /selenium-simple-test
158 /mytests
159 /project_foo
160 /feature_foo
161 foo.py
162 /project_bar
163 feature_bar.py
164 feature_baz.py
165 /shared
166 module.py
167 utils.py
168
169and you would still call this from the command like::
170
171 $ sst-run -d mytests
172
173SST will find all of the tests in subdirectories (including symlinks) and
174execute them. SST won't look in directories starting with an underscore. This
175allows you to put Python packages/modules directly in your test directories
176if you want. A better option is to use the shared directory.
177
178
179---------------------------------
180Using sst in unittest test suites
181---------------------------------
182
183sst uses unittest test cases internally to wrap the execution of the script
184and taking care of starting and stopping the browser. If you prefer to
185integrate some sst tests into an existing unittest test suite you can use
186SSTTestCase from runtests.py::
187
188 from sst.actions import *
189 from sst import runtests
190
191 class TestUbuntu(runtests.SSTTestCase):
192
193 def test_ubuntu_home_page(self):
194 go_to('http://www.ubuntu.com/')
195 assert_title_contains('Ubuntu')
196
197So, with the above in a file name test_ubuntu.py you can run the test with
198(for example)::
199
200 python -m unittest test_ubuntu.py
201
202`sst-run` provides an headless xserver via the `-x` option. `SSTTestCase`
203provides the same feature (sharing the same implementation) via two class
204attributes.
205
206`xserver_headless` when set to `True` will start an headless server for each
207test (and stop it after the test). If you want to share the same server
208across several tests, set `xvfb`. You're then responsible for starting and
209stopping this server (see `src/sst/xvfbdisplay.py` for details or
210`src/sst/tests/test_xvfb.py` for examples.
211
212
213--------------------
214 Shared directory
215--------------------
216
217SST allows you to have a directory called `shared` in the top level directory
218of your tests, which is added to `sys.path`. Here you can keep helper modules
219used by all your tests. `sst-run` will not run Python files in the `shared`
220directory as tests.
221
222By default SST looks in the test directory you specify to find `shared`,
223alternatively you can specify a different directory using the `-m` command
224line argument to `sst-run`.
225
226If there is no `shared` directory in the test directory, then `sst-run` will
227walk up from the test directory to the current directory looking for one. This
228allows you to run tests just from a subdirectory without having to explicitly
229specify where the shared directory is.
230
231
232---------------------
233 sst.config module
234---------------------
235
236Inside tests you can import the `sst.config` module to know various things
237about the current test environment. The `sst.config` module has the following
238information::
239
240 from sst import config
241
242 # is javascript disabled?
243 config.javascript_disabled
244
245 # which browser is being used?
246 config.browser_type
247
248 # full path to the shared directory
249 config.shared_directory
250
251 # full path to the results directory
252 config.results_directory
253
254 # flags for the current test run
255 config.flags
256
257 # A per test cache. A dictionary that is cleared at the start of each test.
258 config.cache
259
260------------------------
261 Disabling Javascript
262------------------------
263
264If you need to disable Javascript for an individual test you can do it by
265putting the following at the start of the test::
266
267 JAVASCRIPT_DISABLED = True
268
269
270--------------------------------
271 Development on Ubuntu/Debian
272--------------------------------
273
274* SST is primarily being developed on Linux, specifically Ubuntu. It should
275 work fine on other platforms, but any issues (or even better - patches)
276 should be reported on the Launchpad project.
277
278* Get a copy of SST Trunk, create and activate a virtualenv, install requirements,
279 and run examples/self-tests from the dev branch::
280
281 $ sudo apt-get install bzr python-virtualenv xvfb
282 $ bzr branch lp:selenium-simple-test
283 $ cd selenium-simple-test
284 $ virtualenv ENV
285 $ source ENV/bin/activate
286 (ENV)$ pip install -r requirements.txt
287 (ENV)$ ./sst-run -d examples
288
289* (optional) Install test dependencies and run SST's internal unit tests::
290
291 (ENV)$ pip install mock nose pep8
292 (ENV)$ nosetests --match ^test_.* --exclude="ENV|testproject|selftests"
293
294* (optional) Install `django` and run SST's internal test application with
295 acceptance tests
296
297 (ENV)$ pip install django
298 (ENV)$ ./sst-run --test -x
299
300* `Launchpad Project <https://launchpad.net/selenium-simple-test>`_
301
302* `Browse the Source (Trunk)
303 <http://bazaar.launchpad.net/~canonical-isd-qa/selenium-simple-test/trunk/files>`_
304
305* To manually setup dependencies, SST uses the following non-stdlib packages:
306
307 * selenium
308 * testtools
309 * django (optional - needed for internal self-tests only)
310
311------------------------
312 Running the examples
313------------------------
314
315SST source code repository and package download contain some trivial example
316scripts.
317
318You can run them from your local sst directory like this::
319
320 $ ./sst-run -d examples
321
322
323--------------------------
324 Running the self-tests
325--------------------------
326
327SST source code repository and package download contain a set of self-tests
328based on an included test Django project.
329
330You can run the suite of self-tests (and the test Django server) from your
331local branch like this::
332
333 $ ./sst-run --test
334
335
336-----------------
337 Related links
338-----------------
339
340* `Selenium Project Home <http://selenium.googlecode.com>`_
341* `Selenium WebDriver (from 'Architecture of Open Source Applications')
342 <http://www.aosabook.org/en/selenium.html>`_
343* `Python Unittest <http://docs.python.org/library/unittest.html>`_
34457
=== modified file 'docs/changelog.rst'
--- docs/changelog.rst 2013-07-30 13:55:45 +0000
+++ docs/changelog.rst 2013-07-31 18:03:25 +0000
@@ -9,6 +9,10 @@
9Official Releases:9Official Releases:
10------------------10------------------
1111
12version **0.2.5** (under development)
13*************************************
14
15
12version **0.2.4** (2013 July 30)16version **0.2.4** (2013 July 30)
13********************************17********************************
1418
1519
=== modified file 'docs/releasing.rst'
--- docs/releasing.rst 2013-05-23 10:11:12 +0000
+++ docs/releasing.rst 2013-07-31 18:03:25 +0000
@@ -1,7 +1,10 @@
1SST Release Instructions1============================
2 SST Release Instructions
3============================
24
3Instructions for releasing SST to PyPI from Launchpad Trunk5---------------------------------------------------------------
4-----------------------------------------------------------6 Instructions for releasing SST to PyPI from Launchpad Trunk
7---------------------------------------------------------------
58
6* get a branch of SST trunk:9* get a branch of SST trunk:
710
@@ -29,17 +32,15 @@
2932
30 $ bzr push lp:selenium-simple-test33 $ bzr push lp:selenium-simple-test
3134
32* generate actions doc:
33
34 under /docs, run:
35
36 $ python make_actions_rst.py
37
38* generate HTML documentation:35* generate HTML documentation:
3936
40 * install sphinx (`$ sudo apt-get install python-sphinx`)37 * install sphinx (`$ sudo apt-get install python-sphinx`)
4138
42 * run `make_actions_rst.py` under /docs, which will create `actions.rst`39 * generate `actions.rst` doc:
40
41 under /docs, run:
42
43 $ python make_actions_rst.py
4344
44 * go up to the main SST directory and run:45 * go up to the main SST directory and run:
4546
4647
=== modified file 'src/sst/__init__.py'
--- src/sst/__init__.py 2013-07-30 13:55:45 +0000
+++ src/sst/__init__.py 2013-07-31 18:03:25 +0000
@@ -18,7 +18,7 @@
18#18#
1919
2020
21__version__ = '0.2.4'21__version__ = '0.2.5dev'
2222
23DEVSERVER_PORT = 8120 # django devserver for internal acceptance tests23DEVSERVER_PORT = 8120 # django devserver for internal acceptance tests
2424

Subscribers

People subscribed via source and target branches