-
Notifications
You must be signed in to change notification settings - Fork 0
BDD
Hüseyin Deniz KIVRAK edited this page Nov 17, 2024
·
1 revision
Behavior-Driven Development (BDD) is a collaborative software development practice that bridges the gap between business stakeholders, developers, and testers. It combines principles from Test-Driven Development (TDD) and Domain-Driven Design (DDD) to focus on the expected behavior of applications from a user's perspective.
This repository focuses on creating robust Kubernetes-based infrastructure that supports modern application development practices. BDD is included as a critical part of the testing strategy to ensure that application deployments align with business requirements and behave as expected under various scenarios.
-
Integration with CI/CD Pipelines:
- BDD tests will act as guards for application deployments.
- These tests will be integrated into the CI/CD pipelines, ensuring that staging environments are validated before promoting changes to production.
-
Cluster-Based Testing:
- BDD tests will run directly against applications deployed on Kubernetes clusters.
- This approach ensures that tests validate real-world behavior, taking into account the actual runtime environment.
-
Staging Environments:
- BDD tests will target staging environments deployed within the Kubernetes cluster.
- Each deployment pipeline will provision isolated staging environments for running tests.
-
Testing Frameworks:
-
Cucumber:
- Used for both .NET Web API and React frontend applications.
- Supports writing test scenarios in Gherkin, ensuring clarity and collaboration between stakeholders.
-
Cluster Access:
- CI/CD pipelines will grant BDD tests access to the staging environments via
kubectl
or API gateways.
- CI/CD pipelines will grant BDD tests access to the staging environments via
-
Cucumber:
-
CI/CD Integration:
- Pipelines will execute BDD tests as part of the pre-deployment checks for staging environments.
- Only deployments that pass all BDD tests will be considered for promotion to production.
-
User Stories and Scenarios:
- User stories describe the desired behavior of the application in simple terms.
- Scenarios provide concrete examples of behavior, written in plain English using the Gherkin language.
-
Automated Testing:
- Scenarios are converted into automated tests that validate the application's behavior against the defined requirements.
-
Continuous Validation:
- Ensures that applications consistently meet business requirements as they evolve.
Scenario: User logs in successfully
Given the user is on the login page
When the user enters valid credentials
Then the user is redirected to the dashboard
-
Alignment with Business Requirements:
- Ensures that applications deployed on Kubernetes clusters meet user expectations.
-
Improved Collaboration:
- Encourages communication between developers, testers, and business stakeholders through shared understanding of application behavior.
-
Deployment Confidence:
- Acts as a safety net, allowing only validated deployments to proceed to production.