Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing: Improve instructions and process #8844 #8977

Closed
wants to merge 79 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
03ce43b
Add jvmarg and enable listeners for intelliJ
tshradheya May 23, 2018
f023d33
Correcting firefox version details to avoid confusion
tshradheya May 23, 2018
66cc810
Add EOF
tshradheya May 23, 2018
4e3a56c
Default JDK for project
tshradheya May 24, 2018
f9b8511
Fix instability caused due to Instant.now()
tshradheya May 24, 2018
ff7a539
Improve stability of tests
tshradheya May 24, 2018
9541cc2
Requested changes
tshradheya Jun 4, 2018
7d9d351
Corrected meaning of comment
tshradheya Jun 5, 2018
5bc5518
Remove redundant line
tshradheya Jun 18, 2018
0eb9526
Merge branch 'master' into improve-build-process
tshradheya Jul 2, 2018
40be6f9
Set en_US as locale
tshradheya Jul 2, 2018
0b16157
Update locale in correct place
tshradheya Jul 9, 2018
d6c732e
Trial commit to be reverted
tshradheya Jul 9, 2018
7bab725
Add period
tshradheya Jul 9, 2018
e3ff717
Trial commit
tshradheya Jul 9, 2018
c3cd19e
CI fail?
tshradheya Jul 9, 2018
5469f29
CI fail- SCA?
tshradheya Jul 9, 2018
46d7dc6
Revert unnecessary changes
tshradheya Jul 9, 2018
b22a6f9
CI should pass
tshradheya Jul 9, 2018
8bff1b8
CI should pass now for UI tests also
tshradheya Jul 9, 2018
c488b4f
CI should pass now for UI tests also
tshradheya Jul 9, 2018
b2c98fd
CI should pass now for UI tests also
tshradheya Jul 9, 2018
ecb6033
Update Browser.java
tshradheya Jul 9, 2018
e552307
Trial
tshradheya Jul 10, 2018
9444d24
Merge remote-tracking branch 'origin/improve-build-process' into impr…
tshradheya Jul 10, 2018
506e201
Trial
tshradheya Jul 10, 2018
49d0f88
Trial
tshradheya Jul 10, 2018
89b1025
ofPattern(String) -> ofPattern(String, Locale.US)
tshradheya Jul 11, 2018
2db4073
Update locale for DecimalFormat
tshradheya Jul 11, 2018
b65c8e3
Remove unnecessary changes
tshradheya Jul 15, 2018
ac53897
Standard style
tshradheya Jul 16, 2018
8cbd8fa
Remove setting locale in tests
tshradheya Jul 16, 2018
cc45720
SCA
tshradheya Jul 16, 2018
1e90b30
Generalise method
tshradheya Jul 16, 2018
137b480
Generalise method
tshradheya Jul 16, 2018
eff2637
Clean up
tshradheya Jul 16, 2018
b3cb589
SCA
tshradheya Jul 16, 2018
a33143b
SCA
tshradheya Jul 16, 2018
1faa3eb
SCA
tshradheya Jul 16, 2018
1632919
Add TeammatesDateTimeFormatter
tshradheya Jul 17, 2018
3061d0a
TeammatesDateTimeFormatter -> final class
tshradheya Jul 17, 2018
1b2eacc
Add jvmarg and enable listeners for intelliJ
tshradheya May 23, 2018
8c1f9e3
Correcting firefox version details to avoid confusion
tshradheya May 23, 2018
6c8c741
Add EOF
tshradheya May 23, 2018
dad9f3a
Default JDK for project
tshradheya May 24, 2018
74ae517
Fix instability caused due to Instant.now()
tshradheya May 24, 2018
84f2bed
Improve stability of tests
tshradheya May 24, 2018
7ee31d9
Requested changes
tshradheya Jun 4, 2018
6bd77de
Corrected meaning of comment
tshradheya Jun 5, 2018
b2cbf3a
Remove redundant line
tshradheya Jun 18, 2018
326e9f8
Set en_US as locale
tshradheya Jul 2, 2018
57f6af1
Update locale in correct place
tshradheya Jul 9, 2018
9e44322
Trial commit to be reverted
tshradheya Jul 9, 2018
884d8c1
Add period
tshradheya Jul 9, 2018
d143614
Trial commit
tshradheya Jul 9, 2018
a0d0a7a
CI fail?
tshradheya Jul 9, 2018
b7c41c4
CI fail- SCA?
tshradheya Jul 9, 2018
641d6e3
Revert unnecessary changes
tshradheya Jul 9, 2018
82f661c
CI should pass
tshradheya Jul 9, 2018
1ef9bb6
CI should pass now for UI tests also
tshradheya Jul 9, 2018
e54d7f3
CI should pass now for UI tests also
tshradheya Jul 9, 2018
995a532
CI should pass now for UI tests also
tshradheya Jul 9, 2018
b374d4e
Update Browser.java
tshradheya Jul 9, 2018
bc1f3fe
Trial
tshradheya Jul 10, 2018
fcabacf
ofPattern(String) -> ofPattern(String, Locale.US)
tshradheya Jul 11, 2018
9189992
Update locale for DecimalFormat
tshradheya Jul 11, 2018
7427f70
Remove unnecessary changes
tshradheya Jul 15, 2018
346fb86
Standard style
tshradheya Jul 16, 2018
985f512
Remove setting locale in tests
tshradheya Jul 16, 2018
ff8ea34
SCA
tshradheya Jul 16, 2018
39b3abd
Generalise method
tshradheya Jul 16, 2018
3d63c32
Generalise method
tshradheya Jul 16, 2018
bf4ac7c
Clean up
tshradheya Jul 16, 2018
268c8c6
SCA
tshradheya Jul 16, 2018
67277b1
SCA
tshradheya Jul 16, 2018
bfe1c69
SCA
tshradheya Jul 16, 2018
078889a
Add TeammatesDateTimeFormatter
tshradheya Jul 17, 2018
b01051c
TeammatesDateTimeFormatter -> final class
tshradheya Jul 17, 2018
d981ebd
Merge remote-tracking branch 'origin/improve-build-process' into impr…
tshradheya Jul 20, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .templates/ideaRunConfigurations/CI_Tests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</pattern>
</extension>
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="1.8" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SUITE_NAME" value="$PROJECT_DIR$/src/test/testng-ci.xml" />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="" />
Expand All @@ -25,7 +25,7 @@
<option name="TEST_SEARCH_SCOPE">
<value defaultName="wholeProject" />
</option>
<option name="USE_DEFAULT_REPORTERS" value="false" />
<option name="USE_DEFAULT_REPORTERS" value="true" />
<option name="PROPERTIES_FILE" value="" />
<envs />
<properties />
Expand Down
6 changes: 3 additions & 3 deletions .templates/ideaRunConfigurations/Failed_Tests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<configuration default="false" name="Failed Tests" type="TestNG" factoryName="TestNG">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="1.8" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SUITE_NAME" value="$PROJECT_DIR$/test-output/testng-failed.xml" />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="" />
Expand All @@ -20,7 +20,7 @@
<option name="TEST_SEARCH_SCOPE">
<value defaultName="wholeProject" />
</option>
<option name="USE_DEFAULT_REPORTERS" value="false" />
<option name="USE_DEFAULT_REPORTERS" value="true" />
<option name="PROPERTIES_FILE" value="" />
<envs />
<properties />
Expand Down
6 changes: 3 additions & 3 deletions .templates/ideaRunConfigurations/Local_Tests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<configuration default="false" name="Local Tests" type="TestNG" factoryName="TestNG">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="1.8" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SUITE_NAME" value="$PROJECT_DIR$/src/test/testng-local.xml" />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="" />
Expand All @@ -20,7 +20,7 @@
<option name="TEST_SEARCH_SCOPE">
<value defaultName="wholeProject" />
</option>
<option name="USE_DEFAULT_REPORTERS" value="false" />
<option name="USE_DEFAULT_REPORTERS" value="true" />
<option name="PROPERTIES_FILE" value="" />
<envs />
<properties />
Expand Down
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Before running tests, modify `src/test/resources/test.properties` if necessary,

### Using Firefox

* Only Firefox between versions 38.0.5 and 46.0.1 are supported.
* Only Firefox between versions 38.0.5 and 46.0.0 are supported.
* To downgrade your Firefox version, obtain the executable from [here](https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/).
* If you want to use a different path for this version, choose `Custom setup` during install.
* Remember to disable the auto-updates (`Options → Advanced tab → Update`).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package teammates.common.datatransfer.questions;

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
Expand Down Expand Up @@ -447,8 +446,6 @@ public String getQuestionResultStatisticsHtml(

Map<String, List<Integer>> optionPoints = generateOptionPointsMapping(responses);

DecimalFormat df = new DecimalFormat("#.##");

Map<String, List<Integer>> sortedOptionPoints = new TreeMap<>();

Map<String, String> identifierMap = new HashMap<>();
Expand All @@ -475,14 +472,14 @@ public String getQuestionResultStatisticsHtml(
Slots.TEAM, SanitizationHelper.sanitizeForHtml(teamName),
Slots.CONSTSUM_POINTS_RECEIVED, pointsReceived,
Slots.CONSTSUM_TOTAL_POINTS, Integer.toString(total),
Slots.CONSTSUM_AVERAGE_POINTS, df.format(average)));
Slots.CONSTSUM_AVERAGE_POINTS, StringHelper.toDecimalFormatString("#.##", average)));
} else {

fragments.append(Templates.populateTemplate(FormTemplates.CONSTSUM_RESULT_STATS_OPTIONFRAGMENT,
Slots.CONSTSUM_OPTION_VALUE, SanitizationHelper.sanitizeForHtml(option),
Slots.CONSTSUM_POINTS_RECEIVED, pointsReceived,
Slots.CONSTSUM_TOTAL_POINTS, Integer.toString(total),
Slots.CONSTSUM_AVERAGE_POINTS, df.format(average)));
Slots.CONSTSUM_AVERAGE_POINTS, StringHelper.toDecimalFormatString("#.##", average)));
}
});

Expand All @@ -509,8 +506,6 @@ public String getQuestionResultStatisticsCsv(
List<String> options = constSumOptions;
Map<String, List<Integer>> optionPoints = generateOptionPointsMapping(responses);

DecimalFormat df = new DecimalFormat("#.##");

Map<String, List<Integer>> sortedOptionPoints = new TreeMap<>();

Map<String, String> identifierMap = new HashMap<>();
Expand Down Expand Up @@ -538,8 +533,8 @@ public String getQuestionResultStatisticsCsv(
double total = computeTotal(points);

fragments.append(option)
.append(',').append(df.format(average))
.append(',').append(df.format(total))
.append(',').append(StringHelper.toDecimalFormatString("#.##", average))
.append(',').append(StringHelper.toDecimalFormatString("#.##", total))
.append(',').append(StringHelper.join(",", points))
.append(System.lineSeparator());

Expand Down
Loading