https://github.com/bugnificent/apache-poi
Read/Write Values to the Excel sheet(.xlsx) depends on the Cucumber scenario fail/pass
https://github.com/bugnificent/apache-poi
apache-poi data-driven-testing test-automation
Last synced: 3 months ago
JSON representation
Read/Write Values to the Excel sheet(.xlsx) depends on the Cucumber scenario fail/pass
- Host: GitHub
- URL: https://github.com/bugnificent/apache-poi
- Owner: bugnificent
- License: mit
- Created: 2025-02-15T10:17:20.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-17T12:39:00.000Z (3 months ago)
- Last Synced: 2025-02-23T19:55:14.839Z (3 months ago)
- Topics: apache-poi, data-driven-testing, test-automation
- Language: Java
- Homepage: https://yusufasik.com
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Excel Automation with Apache POI, Cucumber BDD, and Selenium 🚀
This project demonstrates how to read and write Excel files (`.xlsx`) using **Apache POI**, integrated with **Cucumber BDD** and **Selenium** for automated testing. It allows you to read values from an Excel file, perform actions based on the data, and write back the results (Pass/Fail) into the Excel file.
---
## 🛠️ Technologies Used
- **Apache POI**: For reading and writing Excel files.
- **Cucumber BDD**: For behavior-driven development and test automation.
- **Selenium**: For browser automation and UI testing.
- **JUnit4**: For annotations and TDD
- **Maven**: For dependency management and project build.---
## 📋 Prerequisites
- Java JDK 8 or higher
- Maven installed
- An Excel file (`.xlsx`) for test data---
## ⚙️ Setup
1. **Clone the Repository**:
```bash
git clone https://github.com/bugnificent/apache-poi.git
cd apache-poi
2. **Install Dependencies**:
```xml
org.seleniumhq.selenium
selenium-java
4.28.1
io.cucumber
cucumber-junit
7.20.1
test
io.cucumber
cucumber-java
7.20.1
org.apache.poi
poi
5.4.0
org.apache.poi
poi-ooxml
5.4.0
```
## ⚠️ Before Running Tests
- Make sure Test Case Number at the beginning of the Scenario.(Not space sensitive)## 📝 Example Feature File
```gherkin
Feature: As an admin i should be able to control excel@excel
Scenario: US01-AC01-TC01 I need to read/write values
When i read username and password "US01-AC01-TC01"
Then test needs to pass
```## 🚀 Running the Tests
- Run Cucumber Tests:
- Use the following command to execute the Cucumber tests:```bash
mvn test
```
Check Results:
After the tests run, the results (Pass/Fail) will be written back to the Excel file in the specified column.## 📜 License
This project is licensed under the [MIT License.](LICENSE) See the LICENSE file for details.## 🙌 Contributing
Feel free to open issues or submit pull requests for improvements. Contributions are welcome!