FoodNow is a web application for online food ordering. The project aims to comprehensively test the FoodNow application to ensure its quality and reliability. The testing process began with manual testing of the registration functionality using various Test Design techniques, primarily Boundary Value Testing and Equivalence Partitioning techniques. The test automation project utilizes Selenium, Cucumber, Postman, Newman, TestLink, REST Assured, and Jenkins for various types of testing, including UI, API, and integration testing. Logging and screenshot capture are implemented in the project to facilitate tracking and documenting bugs.
The FoodNow application offers the following features:
- 📝 User registration and authorization
- 🛍️ Viewing and sorting products
- 🛒 Adding products to the cart
- 📦 Placing an order
- 💳 Online payment
- Testing: Selenium 4.25.0, Postman, Newman, TestLink, REST Assured, Jenkins, Jira, Allure
- Programming Language: Java 17
- Build Tool: Gradle
- Logging: Logback Classic 1.5.9
- Others: WebDriverManager 5.9.2
The project includes logging and screenshot capture to facilitate bug tracking. Key aspects of the project structure:
/src/main/java/com/foodnow/pages: Contains Page Objects for interacting with the web application. Examples:RegisterPage: Contains the methodenterPersonalData()for comprehensive testing of registration fields.LoginPage: Contains the methodloginExistedUser()for simplified login testing.AddProductPage: Provides methods such asclickFoodCategory()иclickAddSteakToCart()for interacting with product categories and adding items to the cart.CartPage: Offers the methodaddProductToCart()or adding products to the cart.
/src/test/java/foodnow/tests: Contains corresponding test classes.
- Java JDK (17 or higher): Download from Oracle or use a distribution such as Adoptium.
- Gradle: Download from Gradle or use a package manager (e.g., Homebrew, SDKMAN). If the project includes the Gradle Wrapper (
gradlewandgradlew.bat), you can use./gradlewdirectly. - Git: Download and install from Git.
- Clone the repository:
git clone https://github.com/danilforx/FoodNow.git
- Navigate to the project directory:
cd FoodNow - Build the project and install dependencies:
./gradlew build(orgradlew buildon Windows) - Ensure the build.gradle file includes all required dependencies:
dependencies { implementation group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '4.25.0' implementation group: 'org.testng', name: 'testng', version: '7.10.2' implementation group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '5.9.2' implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.5.9' }
- Run the tests:
./gradlew test(orgradlew teston Windows)
Organizing screenshots to identify bugs:
public String takeScreenshot() {
File screenshot = new File("src/test_screenshots/screen-" + System.currentTimeMillis() + ".png");
try {
File tmp = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
Files.copy(tmp.toPath(), screenshot.toPath());
} catch (IOException e) {
logger.error("Failed to save screenshot", e);
throw new RuntimeException(e);
}
return screenshot.getAbsolutePath();
}- Images do not display correctly after load testing, which may potentially affect some tests.
- Test Plan
- User Stories
- Use Cases
- Database Schema
- TestLink
- Postman Test Run
- Example Bug reports
- REST Assured
This project is licensed under the MIT License — see LICENSE for details.