Skip to content

Release 2021/01/14 (v1.7.4) #5302

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

Merged
merged 122 commits into from
Jan 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
a380eaf
Adding Community App Tests
SathyaJayabal Mar 17, 2020
d8725e0
updated config.json
SathyaJayabal Mar 17, 2020
ac8a6a6
fix(server): circleci
drasticdpk Mar 18, 2020
4adbd5e
Update .gitignore
drasticdpk Mar 18, 2020
9ded5cf
fix(server): remove temp file
drasticdpk Mar 18, 2020
39a79e0
Merge branch 'community-app-tests-poc' of https://github.com/topcoder…
drasticdpk Mar 18, 2020
a96bf78
fix(server): remove temp file
drasticdpk Mar 18, 2020
6c39156
Update conf.ts
drasticdpk Mar 19, 2020
c9f34e9
fix(server): test quality update
drasticdpk Mar 19, 2020
7fd1a0f
fix(server): update
drasticdpk Mar 20, 2020
8cbde09
Update config-qa.json
SathyaJayabal Mar 20, 2020
b08649a
docs: change README.md
SathyaJayabal Mar 27, 2020
235b268
docs: test
SathyaJayabal Mar 27, 2020
d11102f
docs: test
SathyaJayabal Mar 27, 2020
1fc2caf
improvement: framework
SathyaJayabal Apr 6, 2020
b261f18
docs: testrun
SathyaJayabal Apr 6, 2020
b4adc41
fix: liburl
SathyaJayabal Apr 7, 2020
c9ce585
fix(server): update
drasticdpk Apr 7, 2020
ffafb43
ci: fixing dependecy issues
sushilshinde Apr 13, 2020
52704f5
ci: changing serialize-javascript version
sushilshinde Apr 13, 2020
4dbd13c
improvement: framework
SathyaJayabal Apr 21, 2020
5d6aff4
Framework Improvement
SathyaJayabal Apr 24, 2020
0420a26
improvement:framework
SathyaJayabal Apr 24, 2020
4e4d799
Improvement:Framework
SathyaJayabal Apr 24, 2020
b83f3fd
Update package-lock.json
SathyaJayabal Apr 24, 2020
b023865
Fix: user creds
SathyaJayabal Apr 24, 2020
2359f66
Improvement: ExpectedConditions
SathyaJayabal Apr 24, 2020
469fa6c
Update package-lock.json
SathyaJayabal Apr 25, 2020
f9bc14a
Improvement:Minor
SathyaJayabal Apr 25, 2020
e3d1d0a
fix: adding protractor
SathyaJayabal Apr 25, 2020
46132a7
fix: webdriver update
SathyaJayabal Apr 27, 2020
c188504
fix: test
SathyaJayabal Apr 27, 2020
3db59fe
Merge branch 'develop' into community-app-tests-poc
SathyaJayabal May 4, 2020
38466bf
improvement: framework
SathyaJayabal May 4, 2020
a99f57d
improvement: framework
SathyaJayabal May 6, 2020
67cee1a
fix: removed email from config
SathyaJayabal May 6, 2020
2f43466
fix: added testcases
SathyaJayabal May 6, 2020
27e443e
improvement: test
SathyaJayabal May 6, 2020
08c8972
fix: testcases
SathyaJayabal May 6, 2020
da1dbbb
Merge branch 'develop' of https://github.com/topcoder-platform/commun…
SathyaJayabal May 8, 2020
00ccead
Merge branch 'develop' into community-app-tests-poc
SathyaJayabal May 8, 2020
8392db8
fix: update readme
SathyaJayabal May 8, 2020
5328662
fix: readme
SathyaJayabal May 8, 2020
f5013a7
improvement: added tests
SathyaJayabal May 18, 2020
09ac39f
fix: updated TQ import
SathyaJayabal May 18, 2020
31bdb67
Merge branch 'community-app-tests-poc' of https://github.com/topcoder…
SathyaJayabal May 18, 2020
90c08fa
improvement: added spalsh page
SathyaJayabal May 19, 2020
ffc61ba
fix: readme update
SathyaJayabal May 19, 2020
ff689b1
fix: splash page
SathyaJayabal May 20, 2020
05d2e4a
fix: logo redirection
SathyaJayabal May 20, 2020
2e4a7be
fix: update automation scripts
SathyaJayabal Jun 29, 2020
7641dbd
Merge branch 'develop' of https://github.com/topcoder-platform/commun…
SathyaJayabal Jun 29, 2020
5826fc0
Merge branch 'develop' into community-app-tests-poc
SathyaJayabal Jun 29, 2020
45999e1
fix: update automation scripts for v0.34.0
SathyaJayabal Jul 1, 2020
a3c9064
fix: update automation scripts for v0.35.0
SathyaJayabal Jul 9, 2020
20b4cf6
Added script for Challenge Listing and Details page.
drasticdpk Aug 11, 2020
5205293
Test script update for Member Profile and My Dashboard Page
drasticdpk Aug 19, 2020
be6c166
fixed failing tests, moved test case number
nursoltan-s Aug 29, 2020
86602ff
added qa filter test
nursoltan-s Aug 29, 2020
43b86b0
fixed header errors
nursoltan-s Aug 31, 2020
2a0666d
fix challenge-detail test
nursoltan-s Aug 31, 2020
fe94827
Merge pull request #4833 from nursoltan-s/fix-failing-tests
drasticdpk Aug 31, 2020
7d2651d
fixed failing tests on challenge listing
nursoltan-s Sep 2, 2020
fab4236
Merge pull request #4843 from nursoltan-s/add-dev-tests
drasticdpk Sep 7, 2020
d869141
Merge branch 'develop' into community-app-tests-poc
drasticdpk Sep 7, 2020
ffa9424
Update
drasticdpk Sep 7, 2020
3942077
fix: update practice link in footer
SathyaJayabal Sep 9, 2020
29bd382
update: env support for staging
sandhiyakavi Sep 16, 2020
380b9b2
Update: Modified Staging Config file
sandhiyakavi Sep 16, 2020
4189839
Update Config file
drasticdpk Sep 17, 2020
c89956c
fix: profile page wins
SathyaJayabal Sep 17, 2020
3698feb
run automation
drasticdpk Sep 17, 2020
406d64a
Merge branch 'community-app-tests-poc' of https://github.com/topcoder…
drasticdpk Sep 17, 2020
57ccaf3
Update for challegne listing page.
drasticdpk Oct 19, 2020
e7c5e2a
Challenge-Listing Page f2f fixation
drasticdpk Oct 26, 2020
793203f
Auth0 updated.
drasticdpk Nov 4, 2020
5a0d2c6
Remove community-app-tests-poc branch for Temporarily.
drasticdpk Nov 5, 2020
b6f4d47
Remove community-app-tests-poc branch for Temporarily.
drasticdpk Nov 5, 2020
1f72f2d
Remove community-app-tests-poc branch for Temporarily.
drasticdpk Nov 5, 2020
e1e73ec
ci: remove community-app-tests-poc from QA env
luizrrodrigues Nov 5, 2020
1d625c8
Merge branch 'develop' into community-app-tests-poc
drasticdpk Nov 10, 2020
ac1f409
Merge branch 'develop' into community-app-tests-poc
drasticdpk Nov 19, 2020
b10af64
Merge pull request #5203 from topcoder-platform/community-app-tests-poc
sushilshinde Nov 23, 2020
9f4d95b
ci: deploy on develop env
sushilshinde Nov 23, 2020
a74585e
ci: integrating automation script call
sushilshinde Nov 23, 2020
a2db148
Smoke Test Dev env
drasticdpk Nov 24, 2020
1cbef3e
config update.
drasticdpk Nov 24, 2020
276efe1
config folder update.
drasticdpk Nov 24, 2020
40bb253
Merge branch 'develop' into community-app-tests-poc
drasticdpk Nov 24, 2020
282609a
Merge branch 'develop-test-poc-merge' into community-app-tests-poc
sushilshinde Nov 25, 2020
89345d0
added local test config
nursoltan-s Nov 29, 2020
775d4d8
Merge pull request #5217 from nursoltan-s/fix-failing-tests
drasticdpk Nov 30, 2020
7a73cac
Merge branch 'develop' into community-app-tests-poc
drasticdpk Dec 1, 2020
9303613
deploy community-app-tests-poc
drasticdpk Dec 1, 2020
545950f
fixed failing e2e tests
nursoltan-s Dec 2, 2020
fe53980
fix skipped test cases
nursoltan-s Dec 2, 2020
1e137c6
fix lint error
nursoltan-s Dec 2, 2020
9049e8f
Merge pull request #5230 from nursoltan-s/fix-failing-tests-e2e
drasticdpk Dec 3, 2020
e8f9ba8
fix test 14
nursoltan-s Dec 3, 2020
d725fde
Merge pull request #5232 from nursoltan-s/quick-fix-e2e
drasticdpk Dec 3, 2020
434594e
fix(readme): read me file update
drasticdpk Dec 3, 2020
e125bc8
ci: added post-steps step
sushilshinde Dec 9, 2020
8c15443
ci: adde post-steps
sushilshinde Dec 9, 2020
b1c5755
ci: added post-steps in the workflow
sushilshinde Dec 9, 2020
4d53e3d
ci: deploy on dev env
sushilshinde Dec 9, 2020
cf2214f
fix: commentioned failing test cases
sushilshinde Dec 9, 2020
c7663b0
fix: dec 15
drasticdpk Dec 15, 2020
4f401ec
fix(dev): update dev env
drasticdpk Dec 15, 2020
4e805c8
fix challenge-listing dev e2e tests
nursoltan-s Dec 17, 2020
ddf09bf
Merge pull request #5260 from nursoltan-s/fix-challenge-listing-e2e
drasticdpk Dec 17, 2020
e365e79
fix(server): deployment update
drasticdpk Dec 17, 2020
e8046e2
fix(server): deployment jan5
drasticdpk Jan 5, 2021
7849797
Fix footer snapshots
luizrrodrigues Jan 6, 2021
3ceba27
Merge pull request #5285 from topcoder-platform/fix-tests-poc
sushilshinde Jan 8, 2021
a99c371
Merge branch 'develop_automation' into community-app-tests-poc
luizrrodrigues Jan 12, 2021
efd7793
Merge branch 'community-app-tests-poc' into develop_automation
luizrrodrigues Jan 12, 2021
5094131
ci: deploy develop_automation to Dev env
luizrrodrigues Jan 12, 2021
4b3ca6d
Setting up Manual Approvals
luizrrodrigues Jan 14, 2021
814b81e
Fix ci config
luizrrodrigues Jan 14, 2021
bd548e6
ci: adding luiz as code owner
sushilshinde Jan 14, 2021
a6ff4bf
Merge pull request #5295 from topcoder-platform/develop_automation
luizrrodrigues Jan 14, 2021
14985e8
Merge pull request #5296 from topcoder-platform/ci-manual-approval
luizrrodrigues Jan 14, 2021
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
28 changes: 21 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2
version: 2.1

defaults: &defaults
docker:
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
source awsenvconf
source buildenvvar
./master_deploy.sh -d ECS -e DEV -t latest -s dev_communityapp_taskvar -i communityapp

# Build & Deploy against testing backend
"build-test":
<<: *defaults
Expand Down Expand Up @@ -231,35 +231,50 @@ workflows:
branches:
only:
- develop
- develop_automation
- ci-manual-approval
post-steps:
- run:
name: Run automation
command: |
source awsenvconf
source buildenvvar
./automated-smoke-test/smoketest.sh automation-config-dev.json dev
- "smoke-testing":
type: approval
requires:
- build-dev
# This is alternate dev env for parallel testing
- "build-test":
context : org-global
filters:
branches:
only:
- gig-apply-fix
- free
# This is alternate dev env for parallel testing
- "build-qa":
context : org-global
filters:
branches:
only:
- hide-my-communities
- free
# This is beta env for production soft releases
- "build-prod-beta":
context : org-global
filters:
branches:
only:
- integration-v5-challenge-api
- hot-fix
- free
# This is stage env for production QA releases
- "build-prod-staging":
context : org-global
requires:
- smoke-testing
filters:
branches:
only:
- develop
- ci-manual-approval
# Production builds are exectuted
# when PR is merged to the master
# Don't change anything in this configuration
Expand All @@ -279,4 +294,3 @@ workflows:
branches:
ignore:
- develop

7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,9 @@ jspm_packages
set-env*.sh
set-test-env.sh
.idea
*.iml
*.iml

# e2e test case
automated-smoke-test/temp
automated-smoke-test/test-results
automated-smoke-test/config/config.json
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @sushilshinde @ajefts
* @sushilshinde @ajefts @luizrrodrigues
32 changes: 32 additions & 0 deletions automated-smoke-test/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM node:10.17.0-stretch
RUN apt update
RUN apt install sudo
RUN sudo apt-get update; sudo apt-get install -y openjdk-8-jre openjdk-8-jre-headless openjdk-8-jdk openjdk-8-jdk-headless;
RUN curl --silent --show-error --location --fail --retry 3 --output /tmp/google-chrome-stable_current_amd64.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
&& (sudo dpkg -i /tmp/google-chrome-stable_current_amd64.deb || sudo apt-get -fy install) \
&& rm -rf /tmp/google-chrome-stable_current_amd64.deb \
&& sudo sed -i 's|HERE/chrome"|HERE/chrome" --disable-setuid-sandbox --no-sandbox|g' \
"/opt/google/chrome/google-chrome" \
&& google-chrome --version
RUN export CHROMEDRIVER_RELEASE=$(curl --location --fail --retry 3 http://chromedriver.storage.googleapis.com/LATEST_RELEASE) \
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/chromedriver_linux64.zip "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_RELEASE/chromedriver_linux64.zip" \
&& cd /tmp \
&& unzip chromedriver_linux64.zip \
&& rm -rf chromedriver_linux64.zip \
&& sudo mv chromedriver /usr/local/bin/chromedriver \
&& sudo chmod +x /usr/local/bin/chromedriver \
&& chromedriver --version
RUN sudo apt-get install -y libgconf-2-4
RUN sudo apt-get install -y xvfb
RUN sudo apt-get install -y jq
ENV DISPLAY :99
RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' > /tmp/entrypoint \
&& chmod +x /tmp/entrypoint \
&& sudo mv /tmp/entrypoint /docker-entrypoint.sh

COPY . /automated-smoke-test
WORKDIR /automated-smoke-test
RUN npm install
RUN ./node_modules/.bin/webdriver-manager update --versions.chrome=="$(google-chrome -version)"
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/bin/sh"]
49 changes: 49 additions & 0 deletions automated-smoke-test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Topcoder Testing Project - E2E Tests

#### Software Required

Nodejs v8.11.4+
Chrome Browser

#### Installation:

- Installs
`npm install`

- To run tests
`cd automated-smoke-test`
`npm run test`
- To run Test locally
`cd automated-smoke-test`
`npm run local-test`

Note : if you want to run the script for different env, make sure you there is config.json file created. For example , to run the dev env
`cd automated-smoke-test`
`cp config/automation-config-dev.json config/config.json`
`npm run test`


- Test results are generated in test-results/ folder

```
HTML report - TestResult.html
Junit report - junitresults-TopcoderLoginPageTests.xml and junitresults-TopcoderRegistrationPageTests.xml
```

- To view junit reports into html, install xunit-viewer
`npm i -g xunit-viewer`

- HTML report from Junit reports can be generated using this command
`xunit-viewer --results=test-results/ --output=/home/Documents/`

As of now, the tests are running in headless mode. To view the actual chrom browser running the tests, you can remove `--headless` option from `chromeOptions.args` in `config.ts`

#### Implementation Details:

- TBD

#### Configuration details:

- config.json holds the data level configuration, like user credentials etc
- conf.ts holds the application configuration, like jasmine reporters to be configured, specs to be run etc.

79 changes: 79 additions & 0 deletions automated-smoke-test/conf.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import reporters = require('jasmine-reporters');
import HtmlReporter = require('protractor-beautiful-reporter');
import { BrowserHelper } from 'topcoder-testing-lib';

declare global {
namespace NodeJS {
interface IGlobal {
document: Document;
window: Window;
navigator: Navigator;
forgotPasswordMailListener: any;
registrationMailListener: any;
}
}
}

exports.config = {
directConnect: true,

// Capabilities to be passed to the webdriver instance.
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: [
"--headless",
'--disable-gpu',
'--no-sandbox',
'--window-size=1325x744',
],
},
},

// Framework to use. Jasmine is recommended.
framework: 'jasmine2',

specs: [
// '../temp/test-suites/tc-login.spec.js'
// '../temp/test-suites/tc-tools.spec.js',
// '../temp/test-suites/tc-account.spec.js',
// '../temp/test-suites/tc-profile.spec.js',
// '../temp/test-suites/tc-header.spec.js',
// '../temp/test-suites/tc-footer.spec.js',
// '../temp/test-suites/tc-preferences.spec.js',
'../temp/test-suites/tc-challenge-listing.spec.js',
// '../temp/test-suites/tc-challenge-detail.spec.js',
// '../temp/test-suites/tc-my-dashboard.spec.js',
// '../temp/test-suites/tc-member-profile.spec.js',
],

// Options to be passed to Jasmine.
jasmineNodeOpts: {
defaultTimeoutInterval: 1200000, // 20 minutes
isVerbose: true,
showColors: true,
},

onPrepare: () => {
BrowserHelper.maximize();
BrowserHelper.implicitlyWait(5000);
const junitReporter = new reporters.JUnitXmlReporter({
consolidateAll: false,
savePath: 'test-results',
});
jasmine.getEnv().addReporter(junitReporter);
jasmine.getEnv().addReporter(
new HtmlReporter({
baseDirectory: 'test-results',
docName: 'TestResult.html', // Change html report file name
docTitle: 'Test Automation Execution Report', // Add title for the html report
gatherBrowserLogs: true, // Store Browser logs
jsonsSubfolder: 'jsons', // JSONs Subfolder
preserveDirectory: false, // Preserve base directory
screenshotsSubfolder: 'screenshots',
takeScreenShotsForSkippedSpecs: true, // Screenshots for skipped test cases
takeScreenShotsOnlyForFailedSpecs: false, // Screenshots only for failed test cases
}).getJasmine2Reporter()
);
},
};
18 changes: 18 additions & 0 deletions automated-smoke-test/config/app-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"Timeout": {
"FieldVisibility": 15000,
"ElementVisibility": 15000,
"ElementInvisibility": 15000,
"ElementPresence": 15000,
"ElementClickable": 15000,
"PageLoad": 300000
},

"LoggerErrors": {
"ElementVisibilty": "Element did not display within timeout",
"ElementInvisibilty": "Element did not become invisible within timeout",
"ElementPresence": "Element was not present within timeout",
"ElementClickable": "Element was not clickable within timeout",
"PageLoad": "Page did not load within timeout"
}
}
Loading