You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/design.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -125,7 +125,7 @@ Represented by these classes:
125
125
126
126
### Policies
127
127
128
-
General:
128
+
General:
129
129
+ Null values should **not** be used as parameters to this API, except when following the KeepExisting policy (explained later).
130
130
131
131
Access control:
@@ -139,7 +139,7 @@ API for creating entities:
139
139
140
140
API for retrieving entities:
141
141
+ Attempting to retrieve objects using `null` parameters: Causes an assertion failure.
142
-
+ Entity not found:
142
+
+ Entity not found:
143
143
- Returns `null` if the target entity not found. This way, read operations can be used easily for checking the existence of an entity.
144
144
- Throws `EntityDoesNotExistsExeption` if a parent entity of a target entity is not found e.g., trying to list students of a non-existent course.
145
145
@@ -153,7 +153,7 @@ API for updating entities:
153
153
API for deleting entities:
154
154
+`Null` parameters: Not expected. Results in assertion failure.
155
155
+ FailDeleteSilentlyPolicy: In general, delete operation do not throw exceptions if the target entity does not exist. Instead, it logs a warning. This is because if it does not exist, it is as good as deleted.
156
-
+ Cascade policy: When a parent entity is deleted, entities that have referential integrity with the deleted entity should also be deleted.
156
+
+ Cascade policy: When a parent entity is deleted, entities that have referential integrity with the deleted entity should also be deleted.
157
157
Refer to the API for the cascade logic.
158
158
159
159
## Storage Component
@@ -187,12 +187,12 @@ Represented by the `*Db` classes. These classes act as the bridge to the GAE Dat
187
187
188
188
### Policies
189
189
190
-
Add and Delete operations try to wait until data is persisted in the datastore before returning. This is not enough to compensate for eventual consistency involving multiple servers in the GAE production enviornment. However, it is expected to avoid test failures caused by eventual consistency in dev server and reduce such problems in the live server.
191
-
Note: 'Eventual consistency' here means it takes some time for a database operation to propagate across all serves of the Google's distributed datastore. As a result, the data may be in an inconsistent states for short periods of time although things should become consistent 'eventually'. For example, an object we deleted may appear to still exist for a short while.
190
+
Add and Delete operations try to wait until data is persisted in the datastore before returning. This is not enough to compensate for eventual consistency involving multiple servers in the GAE production enviornment. However, it is expected to avoid test failures caused by eventual consistency in dev server and reduce such problems in the live server.
191
+
Note: 'Eventual consistency' here means it takes some time for a database operation to propagate across all serves of the Google's distributed datastore. As a result, the data may be in an inconsistent states for short periods of time although things should become consistent 'eventually'. For example, an object we deleted may appear to still exist for a short while.
192
192
193
-
Implementation of Transaction Control has been decided against due to limitations of GAE environment and the nature of our data schema. Please see [TEAMMATES Decision Analysis](https://docs.google.com/document/pub?id=1o6pNPshCp9S31ymHY0beQ1DVafDa1_k_k7bpxZo5GeU&embedded=true) document for more information.
193
+
Implementation of Transaction Control has been decided against due to limitations of GAE environment and the nature of our data schema. Please see [TEAMMATES Decision Analysis](https://docs.google.com/document/pub?id=1o6pNPshCp9S31ymHY0beQ1DVafDa1_k_k7bpxZo5GeU&embedded=true) document for more information.
194
194
195
-
General:
195
+
General:
196
196
+ If `Null` is passed as a parameter, the corresponding value is **NOT** modified, as per the KeepExistingPolicy that was previously mentioned.
Copy file name to clipboardExpand all lines: docs/godmode.md
+4-9
Original file line number
Diff line number
Diff line change
@@ -6,23 +6,20 @@ Typically browser tests involve comparing the source of the webpage to an existi
6
6
7
7
GodMode has been extended and now is also able to create and update *expected* source files for email content tests. It works with the same underlying principle as the one for browser tests.
8
8
9
-
10
9
## How does GodMode work?
11
10
12
11
The essential idea is to reverse the process of testing. We use the _actual_ source of the webpage to overwrite the _expected_ source in the test. To remove redundancy, even if GodMode is enabled, this overwriting procedure only happens when a test fails during the test run. Finally before the changes are committed, a *manual* (by the developer) verification to ensure only the intended changes have occurred is mandatory.
13
12
14
-
15
13
## How do we use GodMode?
16
14
17
-
GodMode can be activated in two different ways.
15
+
GodMode can be activated in two different ways.
18
16
19
17
1. If we want to execute arbitrary tests using GodMode, then update `BaseUiTestCase` class (or `EmailGeneratorTest` class if testing email content) and set `isGodModeEnabled = true` at the top of the class implementation. Now all test runs would have GodMode enabled. Please remember to set it back to false when done.
20
18
21
19
2. If we want to run a particular test suite using GodMode, then go to `Run -> Run Configurations` and update the appropriate one with the `-Dgodmode=true` VM argument. Please remember to remove the argument before committing the changes
22
20
23
21
Note: The first option encompasses the functionality of the second. By updating the BaseUiTestCase and running the intended test suite, we achieve the second option's effect.
24
22
25
-
26
23
## When do we use GodMode?
27
24
28
25
GodMode is typically used in the following two situations:
Here are three possible situations and the corresponding behaviours of GodMode when the test is executed with GodMode enabled:
40
37
41
-
1. If `studentHomeTypicalHTML.html` exists and has the correct content, GodMode will not make any updates to the source file.
38
+
1. If `studentHomeTypicalHTML.html` exists and has the correct content, GodMode will not make any updates to the source file.
42
39
43
40
2. If `studentHomeTypicalHTML.html` exists but has the wrong content, GodMode will update the source file with the correct content. The effect of this is that the test case will pass subsequent test runs with/without GodMode enabled.
44
41
@@ -49,7 +46,6 @@ The same idea applies to email content test:
1. Ensure that GodMode is only used when necessary, that is when there are new test cases being created or when an update to the existing tests is foreseen.
3. Please confirm that all the changes made by GodMode are EXPECTED. If any unexpected changes are made, please ask for assistance in the issue tracker or create a new issue if need be.
60
56
61
-
4. After all the necessary changes have been made, run the test suite once without GodMode enabled to ensure that the tests pass without GodMode.
62
-
57
+
4. After all the necessary changes have been made, run the test suite once without GodMode enabled to ensure that the tests pass without GodMode.
* XML: `XML → XML Files → Editor → Indent using spaces`.
74
-
* Validation:
74
+
* Validation:
75
75
* We do not validate HTML, JSP, and XML. `Validation` → uncheck the `Build` option for `HTML Syntax Validator`, `JSP Content Validator`, `JSP Syntax Validator`, and `XML Validator`.
76
76
* Disable JavaScript validation for `node_modules` folder. `Validation` → click the `...` settings button for `JavaScript Validation` → if `Exclude Group` is not already in the list then click `Add Exclude Group...` → `Exclude Group` → `Add Rule...` → `Folder or file name` → `Next` → `Browse Folder...` → navigate to the `node_modules` folder and confirm → `Finish`.
Copy file name to clipboardExpand all lines: docs/settingUp.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -43,9 +43,9 @@ More information can be found at [this documentation](https://help.github.com/ar
43
43
1. Run this command to download the correct version Google App Engine SDK as used in the project:
44
44
```sh
45
45
./gradlew appengineDownloadSdk
46
-
```
46
+
```
47
47
**Verification:** Check your Gradle folder (the directory can be found with the command `./gradlew printUserHomeDir`). A folder named appengine-sdk` should be present.
48
-
48
+
49
49
1. Run this command to download the necessary tools for JavaScript development:
Copy file name to clipboardExpand all lines: docs/troubleshooting-guide.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Note that some of the screenshots might be outdated, but the instructions will r
20
20
**REASON**: This happens because Eclipse is only aware of JRE, not JDK (Compiling JSP requires the JDK).
21
21
22
22
Go to `Window → Preferences → Java → Installed JREs`. You will note that a JRE path is the one selected, not a JDK path.
23
-
23
+
24
24
**SOLUTION**: To fix this, Click `Add → Standard VM`, then for the JRE Path enter the path of the JRE folder inside your JDK installation folder, e.g. `C:/jdk1.7/jre`. Now you should see all of the JARs added to the library section.
25
25
26
26
***ERROR**: When trying to deploy, Eclipse complains "... Cannot get the System Java Compiler. Please use a JDK, not a JRE.".
@@ -106,7 +106,7 @@ Furthermore, you might see tags such as `${test.student1}` and `${version}` in s
106
106
***ERROR**: After deploying on the staging server, you get an error related to "Unsupported major.minor version ..." when trying to access pages of the staged app.
107
107
108
108
**REASON**: This can happen if you have Java 8 installed and Eclipse uses Java 8 during deployment, even if you have already configured the project to use Java 7.
109
-
109
+
110
110
**SOLUTION**: Refer to [this page](http://java.wildstartech.com/Java-Platform-Standard-Edition/mac-os-x-java-development/how-to-configure-eclipse-to-run-with-java-7-when-java-8-is-installed) to learn how to modify `eclipse.ini` to use Java 7 by default.
111
111
112
112
***ERROR**: A handful of failed test cases (< 10).
@@ -140,9 +140,9 @@ Furthermore, you might see tags such as `${test.student1}` and `${version}` in s
140
140
**SOLUTION**: Add `-Djava.io.tmpdir=/path/to/teammates/tmp` for the tests' run configurations. The "tmp" folder in the specified directory needs to be created before running the tests.
141
141
142
142
***ERROR (on IntelliJ)**: Error message in console when running dev server : `Cannot start process, the working directory '{project home directory}/build/libs/exploded/teammates.war' does not exist` or `Could not locate /.../appengine-web.xml`.
143
-
143
+
144
144
**SOLUTION**: The path to the exploded application may be configured wrongly. Go to `File → Project Structure...`. Under `Under Artifacts → Gradle : <your-project-name>.war (exploded)`, change `Output directory` to `{path to repo}/build/exploded-app`, which contains `appengine-web.xml`.
145
-
145
+
146
146
## Submitting help request
147
147
148
148
If none of the items in this guide helps with the problem you face, you can [post in the issue tracker](https://github.com/TEAMMATES/teammates/issues/new) to request for help.
0 commit comments