Our workflow is mostly based on the guidelines given at se-education.org/guides.
To submit a PR, follow this guide, but note the following:
The issues for first timers usually have guidance provided in the comment or have linked pull requests from previous contributors. You can refer to them for implementation details.
gradlew checkstyleAllto check the style of all the relevant Java code. This will check the Java code in the following order: main code -> test code -> systemtest code.
gradlew checkstyleMain. Likewise, for test code, run
gradlew checkstyleTestand for systemtest code, run
gradlew checkstyleMain checkstyleTestor
gradlew checkstyleTest checkstyleSystemtest.
gradlew lintFrontendfrom the project root directory. You can also run
npm run lintfixin the
gradlew runfrom the project root. By default, it will run based on the config files in the
[project root]/configfolder, and generate the report in the
gradlew run -Dargs="--since 31/12/2019 --formats java adoc xml"
gradlew run -Dargs="--view"to generate the report and view it in the default browser.
You can use the hot reloading feature to see how your code changes the functionality of the website in real time.
gradlew runwith the appropriate flags.
You can use Vue.js devtools for frontend debugging on Chrome. Here are the steps:
Allow access to file URLs. If you are unable to locate it, copy the link:
chrome://extensions/?id=nhdogjmejiglipccpnnnanhbledajbpdand visit it on your Chrome.
F12or right click and choose
inspectat the report page.
Vueat the navigation bar.
We use Cypress for automated end-to-end front-end testing.
Chromeas the default browser.
Note that it is compulsory to add tests for the new front-end changes that you made to prevent regression bugs, except for trivial changes that are unlikely to cause any regression or other situations where testing does not apply to the change.
To run all tests locally, run
gradlew cypressthen select
Run 18 integration specsin the Cypress GUI as shown below:
If you encountered an invalid browser error, ensure that you have
Chrome installed in the default installation directory. Otherwise, follow the instructions here to create symbolic links so Cypress can locate
Chrome in your system.
The back-end tests can be found at
[project root]/systemtest and
To run all the system tests, run
To run all the unit and integration tests, run
To show some content only in the i.e., https://reposense.orgproduction website, add the
tags="production" attribute to the HTML element enclosing the content. Similarly,
tags="dev" will make the content appear only in the i.e., https://reposense.org/RepoSensedev website.
<span tags="production">This will appear in the production website only.</span> <span tags="dev">This will appear in the dev website only.</span> This will appear in both sites.