Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flyingotta/onlinestatcalculator-springbootmvc-js-java
Built online statistics calculator (lin regression, mean etc.) using Java, JS, HTML, and Spring Boot's MVC framework. Build processes and dependencies handled by Maven. Thymeleaf templating engine as view layer, Spring controllers to handle HTTP requests. This inlcluded 100% code coverage unit testing and E2E testing using Junit and Playwright.
https://github.com/flyingotta/onlinestatcalculator-springbootmvc-js-java
e2e-testing integration-testing java javascript junit-jupiter maven-pom playwright-tests spring-mvc thymeleaf-template-engine unit-testing
Last synced: about 17 hours ago
JSON representation
Built online statistics calculator (lin regression, mean etc.) using Java, JS, HTML, and Spring Boot's MVC framework. Build processes and dependencies handled by Maven. Thymeleaf templating engine as view layer, Spring controllers to handle HTTP requests. This inlcluded 100% code coverage unit testing and E2E testing using Junit and Playwright.
- Host: GitHub
- URL: https://github.com/flyingotta/onlinestatcalculator-springbootmvc-js-java
- Owner: FlyingOtta
- Created: 2024-10-15T02:04:32.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2025-02-03T00:05:58.000Z (6 days ago)
- Last Synced: 2025-02-03T01:18:51.609Z (6 days ago)
- Topics: e2e-testing, integration-testing, java, javascript, junit-jupiter, maven-pom, playwright-tests, spring-mvc, thymeleaf-template-engine, unit-testing
- Language: Java
- Homepage:
- Size: 318 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Online Statistics Calculator
## Overview
This repository hosts the **Online Statistics Calculator**, a Java-based web application built with **Spring Boot** following the **MVC (Model-View-Controller)** pattern. It leverages **Maven** for dependency management and build automation. 100% code coverage testing is achieved by using **JUnit** for unit and integration tests, and **Playwright** for cross-browser end-to-end testing.Below, you will find details about the project’s architecture, along with instructions to set up, run, and test the application.
### Architectural Diagram
![Architectural Diagram](ProjectPhotos/UMLclass.png)---
## Building and Running the Application
### Prerequisites
Ensure you have the following dependencies installed:
- **Java** (version 21 or newer)
- Download from: [Oracle JDK 21](https://www.oracle.com/java/technologies/javase/jdk21-archive-downloads.html) or an open-source option
- **Maven** (version 3.8 or newer)
- Download from: [Apache Maven](https://maven.apache.org/download.cgi)
- **Node.js** (for Playwright tests)
- Download from: [Node.js](https://nodejs.org/)
- **Junit-Jupiter (5.9.3 or newer)** (for Unit testing)
- Download from: [JUnit](https://junit.org/)
- **IDE of your choice** (JetBrains IntelliJ IDEA recommended)
- Download from: [IntelliJ IDEA](https://www.jetbrains.com/idea/download/)### Steps to Build and Run Application
1. (Terminal) Clone the repository:
```bash
git clone https://github.com/FlyingOtta/SWE-3643-Project.git2. (Terminal) Navigate to the project directory:
```bash
cd SWE-3643-Project
3. (Terminal) Verify Java installation & access
```bash
java -version4. (Terminal) Verify Node.js installation & access
```bash
node -v
5. (Terminal) Verify npm installation and access
```bash
npm -v6. (Terminal) Verify Maven installation & access
```bash
mvn -version
7. (Terminal) Install Playwright dependencies using npm
```bash
npm install @playwright/test
8. (Terminal) Verify Playwright installation and access
```
npx playwright --version
9. (Terminal) Download Junit-Jupiter using MVN command
```bash
mvn dependency:copy -Dartifact=org.junit.jupiter:junit-jupiter:5.9.3 -DoutputDirectory=.10. (XML) Add the junit dependency to your xml file
```XML
org.junit.jupiter
junit-jupiter
5.9.3
test
11. (Terminal) Build your project using maven. Maven will handle Spring Boot & Initializer & its dependencies
```bash
mvn clean install
```
12. (Terminal) Run the Spring-Boot application using Maven
```bash
mvn spring-boot:run
```
13. In the browser of your choice, open your browser and navigate to port 8080 to view the application
```text
http://localhost:8080
```### Steps to Run Testing
1. (Terminal) Once you've verified the application is running, unit tests can be run by inputting:
```bash
mvn test
2. (Terminal) E2E Playwright tests can be run by inputting:
```bash
npx playwright test### Testing Proof / Screenshots
1. All Passing Unit Tests![UnitTestsPassing](ProjectPhotos/Screenshot2024-12-01000602.png)
2. Unit Tests Achieving 100% Coverage![UnitTesting100%Coverage](ProjectPhotos/Screenshot2024-12-01001549.png)
3. All Passing Playwright Tests ![PlaywrightTestsPassing](ProjectPhotos/Screenshot2024-12-01002236.png)### (YouTube) Link to Presentation Video
https://youtu.be/FDpYyI6cG9A