Show More
@@ -1,7 +1,7 b'' | |||||
1 | README - Quickstart |
|
1 | README - Quickstart | |
2 | =================== |
|
2 | =================== | |
3 |
|
3 | |||
4 |
This folder contains functional tests and |
|
4 | This folder contains the functional tests and automation of specification | |
5 | examples. Details about testing can be found in |
|
5 | examples. Details about testing can be found in | |
6 | `/docs-internal/testing/index.rst`. |
|
6 | `/docs-internal/testing/index.rst`. | |
7 |
|
7 | |||
@@ -21,7 +21,7 b' Use the following example call for the d' | |||||
21 | --api-key=9999999999999999999999999999999999999999 \ |
|
21 | --api-key=9999999999999999999999999999999999999999 \ | |
22 | your-enterprise-config.ini |
|
22 | your-enterprise-config.ini | |
23 |
|
23 | |||
24 | This way the username, password and auth token of the admin user will match the |
|
24 | This way the username, password, and auth token of the admin user will match the | |
25 | defaults from the test run. |
|
25 | defaults from the test run. | |
26 |
|
26 | |||
27 |
|
27 | |||
@@ -34,7 +34,7 b' 1. Make sure your Rhodecode Enterprise i' | |||||
34 | 2. Enter `nix-shell` from the acceptance_tests folder:: |
|
34 | 2. Enter `nix-shell` from the acceptance_tests folder:: | |
35 |
|
35 | |||
36 | cd acceptance_tests |
|
36 | cd acceptance_tests | |
37 |
nix-shell |
|
37 | nix-shell | |
38 |
|
38 | |||
39 | Make sure that `rcpkgs` and `rcnixpkgs` are available on the nix path. |
|
39 | Make sure that `rcpkgs` and `rcnixpkgs` are available on the nix path. | |
40 |
|
40 |
@@ -5,7 +5,7 b' Contributing to RhodeCode' | |||||
5 |
|
5 | |||
6 |
|
6 | |||
7 |
|
7 | |||
8 | Welcome to contribution guides and development docs of RhodeCode. |
|
8 | Welcome to the contribution guides and development docs of RhodeCode. | |
9 |
|
9 | |||
10 |
|
10 | |||
11 |
|
11 |
@@ -2,7 +2,7 b'' | |||||
2 | DB Schema and Migration |
|
2 | DB Schema and Migration | |
3 | ======================= |
|
3 | ======================= | |
4 |
|
4 | |||
5 | To create or alter tables in the database it's necessary to change a couple of |
|
5 | To create or alter tables in the database, it's necessary to change a couple of | |
6 | files, apart from configuring the settings pointing to the latest database |
|
6 | files, apart from configuring the settings pointing to the latest database | |
7 | schema. |
|
7 | schema. | |
8 |
|
8 | |||
@@ -11,11 +11,11 b' Database Model and ORM' | |||||
11 | ---------------------- |
|
11 | ---------------------- | |
12 |
|
12 | |||
13 | On ``rhodecode.model.db`` you will find the database definition of all tables and |
|
13 | On ``rhodecode.model.db`` you will find the database definition of all tables and | |
14 | fields. Any fresh install database will be correctly created by the definitions |
|
14 | fields. Any freshly installed database will be correctly created by the definitions | |
15 |
here. So, any change to this file |
|
15 | here. So, any change to this file will affect the tests without having to change | |
16 | any other file. |
|
16 | any other file. | |
17 |
|
17 | |||
18 |
A second layer are the busin |
|
18 | A second layer are the business classes inside ``rhodecode.model``. | |
19 |
|
19 | |||
20 |
|
20 | |||
21 | Database Migration |
|
21 | Database Migration | |
@@ -30,7 +30,7 b' Three files play a role when creating da' | |||||
30 |
|
30 | |||
31 | Schema is a snapshot of the database version BEFORE the migration. So, it's |
|
31 | Schema is a snapshot of the database version BEFORE the migration. So, it's | |
32 | the initial state before any changes were added. The name convention is |
|
32 | the initial state before any changes were added. The name convention is | |
33 |
the latest release version where the snapshot w |
|
33 | the latest release version where the snapshot was created, and not the | |
34 | target version of this code. |
|
34 | target version of this code. | |
35 |
|
35 | |||
36 | Version is the method that will define how to UPGRADE/DOWNGRADE the database. |
|
36 | Version is the method that will define how to UPGRADE/DOWNGRADE the database. | |
@@ -45,8 +45,8 b' For examples on how to create those file' | |||||
45 | Migration Command |
|
45 | Migration Command | |
46 | ^^^^^^^^^^^^^^^^^ |
|
46 | ^^^^^^^^^^^^^^^^^ | |
47 |
|
47 | |||
48 | After you changed the database ORM and migration files, you can run:: |
|
48 | After you've changed the database ORM and migration files, you can run:: | |
49 |
|
49 | |||
50 | paster upgrade-db <ini-file> |
|
50 | paster upgrade-db <ini-file> | |
51 |
|
51 | |||
52 |
|
|
52 | The database will be upgraded up to the version defined in the ``__init__`` file. No newline at end of file |
@@ -13,7 +13,7 b' purposes. This section contains an overv' | |||||
13 | ============= |
|
13 | ============= | |
14 |
|
14 | |||
15 | Enables the section "Style" in the application. This section provides an |
|
15 | Enables the section "Style" in the application. This section provides an | |
16 |
overview of all components which are found in the frontend |
|
16 | overview of all components which are found in the frontend of the | |
17 | application. |
|
17 | application. | |
18 |
|
18 | |||
19 |
|
19 | |||
@@ -29,9 +29,9 b' to ease development.' | |||||
29 | `[logging]` |
|
29 | `[logging]` | |
30 | =========== |
|
30 | =========== | |
31 |
|
31 | |||
32 | Use this to configure loggig to your current needs. The documentation of |
|
32 | Use this to configure logging to your current needs. The documentation of | |
33 |
Python's `logging` module explains all details. The following snippets |
|
33 | Python's `logging` module explains all of the details. The following snippets | |
34 | useful for day to day development work. |
|
34 | are useful for day to day development work. | |
35 |
|
35 | |||
36 |
|
36 | |||
37 | Mute SQL output |
|
37 | Mute SQL output |
@@ -9,19 +9,19 b' environment dependencies are correctly d' | |||||
9 | It also enables atomic upgrades, rollbacks, and multiple instances of RhodeCode |
|
9 | It also enables atomic upgrades, rollbacks, and multiple instances of RhodeCode | |
10 | Enterprise for efficient cluster management. |
|
10 | Enterprise for efficient cluster management. | |
11 |
|
11 | |||
12 | To set up RhodeCode Enterprise inside the Nix environment use the following steps: |
|
12 | To set up RhodeCode Enterprise inside the Nix environment, use the following steps: | |
13 |
|
13 | |||
14 |
|
14 | |||
15 |
|
15 | |||
16 | Setup Nix Package Manager |
|
16 | Setup Nix Package Manager | |
17 | ------------------------- |
|
17 | ------------------------- | |
18 |
|
18 | |||
19 | To install the Nix Package Manager please run:: |
|
19 | To install the Nix Package Manager, please run:: | |
20 |
|
20 | |||
21 | $ curl https://nixos.org/nix/install | sh |
|
21 | $ curl https://nixos.org/nix/install | sh | |
22 |
|
22 | |||
23 |
or go to https://nixos.org/nix/ and follow the |
|
23 | or go to https://nixos.org/nix/ and follow the installation instructions. | |
24 | Once this is correctly set up on your system you should be able to use the |
|
24 | Once this is correctly set up on your system, you should be able to use the | |
25 | following commands: |
|
25 | following commands: | |
26 |
|
26 | |||
27 | * `nix-env` |
|
27 | * `nix-env` | |
@@ -34,8 +34,8 b' following commands:' | |||||
34 | Update your channels frequently by running ``nix-channel --upgrade``. |
|
34 | Update your channels frequently by running ``nix-channel --upgrade``. | |
35 |
|
35 | |||
36 |
|
36 | |||
37 | Switch nix to latest STABLE channel |
|
37 | Switch nix to the latest STABLE channel | |
38 | ----------------------------------- |
|
38 | --------------------------------------- | |
39 |
|
39 | |||
40 | run:: |
|
40 | run:: | |
41 |
|
41 | |||
@@ -49,7 +49,7 b' Followed by::' | |||||
49 | Clone the required repositories |
|
49 | Clone the required repositories | |
50 | ------------------------------- |
|
50 | ------------------------------- | |
51 |
|
51 | |||
52 |
After Nix is set up, clone the RhodeCode Enterprise Community Edition |
|
52 | After Nix is set up, clone the RhodeCode Enterprise Community Edition and | |
53 | RhodeCode VCSServer repositories into the same directory. |
|
53 | RhodeCode VCSServer repositories into the same directory. | |
54 | To do this, use the following example:: |
|
54 | To do this, use the following example:: | |
55 |
|
55 | |||
@@ -59,23 +59,23 b' To do this, use the following example::' | |||||
59 |
|
59 | |||
60 | .. note:: |
|
60 | .. note:: | |
61 |
|
61 | |||
62 | If you cannot clone the repository, please request read permissions. |
|
62 | If you cannot clone the repository, please request read permissions via support@rhodecode.com | |
63 |
|
63 | |||
64 |
|
64 | |||
65 |
|
65 | |||
66 | Enter the Development Shell |
|
66 | Enter the Development Shell | |
67 | --------------------------- |
|
67 | --------------------------- | |
68 |
|
68 | |||
69 |
The final step is to start |
|
69 | The final step is to start the development shell. To do this, run the | |
70 | following command from inside the cloned repository:: |
|
70 | following command from inside the cloned repository:: | |
71 |
|
71 | |||
72 | cd ~/rhodecode-enterprise-ce |
|
72 | cd ~/rhodecode-enterprise-ce | |
73 |
nix-shell |
|
73 | nix-shell | |
74 |
|
74 | |||
75 | .. note:: |
|
75 | .. note:: | |
76 |
|
76 | |||
77 | On the first run, this will take a while to download and optionally compile |
|
77 | On the first run, this will take a while to download and optionally compile | |
78 |
a few things. The |
|
78 | a few things. The following runs will be faster. | |
79 |
|
79 | |||
80 |
|
80 | |||
81 |
|
81 | |||
@@ -90,13 +90,13 b' 2. Adjust the configuration settings to ' | |||||
90 |
|
90 | |||
91 | .. note:: |
|
91 | .. note:: | |
92 |
|
92 | |||
93 |
It is recommended to |
|
93 | It is recommended to use the name `dev.ini`. | |
94 |
|
94 | |||
95 |
|
95 | |||
96 | Setup the Development Database |
|
96 | Setup the Development Database | |
97 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
97 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
98 |
|
98 | |||
99 | To create a development database use the following example. This is a one |
|
99 | To create a development database, use the following example. This is a one | |
100 | time operation:: |
|
100 | time operation:: | |
101 |
|
101 | |||
102 | paster setup-rhodecode dev.ini \ |
|
102 | paster setup-rhodecode dev.ini \ | |
@@ -109,7 +109,7 b' Start the Development Server' | |||||
109 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
109 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
110 |
|
110 | |||
111 | When starting the development server, you should start the vcsserver as a |
|
111 | When starting the development server, you should start the vcsserver as a | |
112 | separate process. To do this use one of the following examples: |
|
112 | separate process. To do this, use one of the following examples: | |
113 |
|
113 | |||
114 | 1. Set the `start.vcs_server` flag in the ``dev.ini`` file to true. For example: |
|
114 | 1. Set the `start.vcs_server` flag in the ``dev.ini`` file to true. For example: | |
115 |
|
115 | |||
@@ -136,6 +136,6 b' 3. Start the development server in a dif' | |||||
136 | Run the Environment Tests |
|
136 | Run the Environment Tests | |
137 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
137 | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
138 |
|
138 | |||
139 | Please make sure that the test are passing to verify that your environment is |
|
139 | Please make sure that the tests are passing to verify that your environment is | |
140 | set up correctly. More details about the tests are described in: |
|
140 | set up correctly. More details about the tests are described in: | |
141 | :file:`/docs/dev/testing`. |
|
141 | :file:`/docs/dev/testing`. |
@@ -17,12 +17,12 b'' | |||||
17 | Overview |
|
17 | Overview | |
18 | ======== |
|
18 | ======== | |
19 |
|
19 | |||
20 |
We have a quite |
|
20 | We have a quite large test suite inside of :file:`rhodecode/tests` which is a mix | |
21 | of unit tests and functional or integration tests. More details are in |
|
21 | of unit tests and functional or integration tests. More details are in | |
22 | :ref:`test-unit-and-functional`. |
|
22 | :ref:`test-unit-and-functional`. | |
23 |
|
23 | |||
24 |
|
24 | |||
25 |
Apart from that we start to apply "Specification by Example" and maintain |
|
25 | Apart from that, we are starting to apply "Specification by Example" and maintain | |
26 |
collection of such specifications together with an implementation so that it |
|
26 | a collection of such specifications together with an implementation so that it | |
27 | be validated in an automatic way. The files can be found in |
|
27 | can be validated in an automatic way. The files can be found in | |
28 | :file:`acceptance_tests`. More details are in :ref:`test-spec-by-example`. |
|
28 | :file:`acceptance_tests`. More details are in :ref:`test-spec-by-example`. |
@@ -66,10 +66,10 b' Locators' | |||||
66 | -------- |
|
66 | -------- | |
67 |
|
67 | |||
68 | The specific information how to locate an element inside of the DOM tree of a |
|
68 | The specific information how to locate an element inside of the DOM tree of a | |
69 |
page is kept in a separate class. This class serves mainly as a data container |
|
69 | page is kept in a separate class. This class serves mainly as a data container; | |
70 | it shall not contain any logic. |
|
70 | it shall not contain any logic. | |
71 |
|
71 | |||
72 | The reason for keeping the locators separate is that we expect a frequent need |
|
72 | The reason for keeping the locators separate is that we expect a frequent need | |
73 | for change whenever we work on our templates. In such a case it is more |
|
73 | for change whenever we work on our templates. In such a case, it is more | |
74 |
efficient to have all locators together and update them there instead of |
|
74 | efficient to have all of thelocators together and update them there instead of | |
75 |
to find |
|
75 | having to find every locator inside of the logic of a page object. |
@@ -27,7 +27,7 b' py.test integration' | |||||
27 | The integration with the test runner is based on the following three parts: |
|
27 | The integration with the test runner is based on the following three parts: | |
28 |
|
28 | |||
29 | - `pytest_pylons` is a py.test plugin which does the integration with the |
|
29 | - `pytest_pylons` is a py.test plugin which does the integration with the | |
30 |
Pylons web framework. It sets up the Pylons environment based on |
|
30 | Pylons web framework. It sets up the Pylons environment based on the given ini | |
31 | file. |
|
31 | file. | |
32 |
|
32 | |||
33 | Tests which depend on the Pylons environment to be set up must request the |
|
33 | Tests which depend on the Pylons environment to be set up must request the |
General Comments 0
You need to be logged in to leave comments.
Login now