Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/hacktoberfest/contribution-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ If you’ve ever wanted to contribute to open source, now is your chance! You ca
Anyone around the globe who desires to help drive the growth of open source and make positive contributions to an ever-growing community. All backgrounds and skill levels are encouraged to participate.

- Code Contributribution to Keploy Projects includes:

- Bug fixes
- New features
- Design
Expand Down
4 changes: 0 additions & 4 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ module.exports = {
label: "API Testing (AI)",
to: "/running-keploy/api-test-generator",
},
{
label: "Unit Testing",
to: "/running-keploy/utg-pr-agent",
},
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/EnterpriseInstallReminder.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function EnterpriseInstallReminder() {
return (
<div style={containerStyle}>
<h3 style={{marginTop: 0, color: isDark ? "#fff" : "#222"}}>
Don’t have Keploy installed yet?
Don’t have Keploy Enterprise installed yet?
</h3>
<p style={{color: isDark ? "#ccc" : undefined}}>
Before running this sample, make sure Keploy Enterprise version is
Expand Down
10 changes: 4 additions & 6 deletions src/components/Product.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function UTG() {
<li className="mt-5 flex flex-col space-y-3 text-lg">
<Link
className="text-foreground-light flex-grow text-sm"
to={useBaseUrl("/running-keploy/unit-test-generator/")}
to={useBaseUrl("/quickstart/k8s-proxy/")}
>
<div className="rounded-lg bg-[color:var(--ifm-card-background-color)] p-5 shadow transition hover:shadow-lg hover:shadow-[color:var(--ifm-card-shadow-color)]">
<div className="flex items-center space-x-4">
Expand All @@ -25,15 +25,13 @@ function UTG() {
fill="#FF914D"
/>
</svg>
<h2 className="mb-4 text-xl font-semibold">
Unit Testing Agent
</h2>
<h2 className="mb-4 text-xl font-semibold">K8s Agent</h2>
</div>
<ul>
<li>
<p className="font">
Generate reliable, validated tests as you code, ensuring
coverage and stability.
Live record and replay your tests in your k8s cluster,
ensuring coverage and stability.
</p>
</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ keywords:
A Keploy SDK is a language-specific library that offers APIs to do the following:

1. Capture all the network calls like

- API Request
- Dependency calls
- API Response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ If you’ve ever wanted to contribute to open source, now is your chance! You ca
Anyone around the globe who desires to help drive the growth of open source and make positive contributions to an ever-growing community. All backgrounds and skill levels are encouraged to participate.

- Code Contributribution to Keploy Projects includes:

- Bug fixes
- New features
- Design
Expand Down
6 changes: 6 additions & 0 deletions versioned_docs/version-1.0.0/java/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,17 @@ Sync dependencies or to _build.gradle_:
compile 'io.keploy:keploy-sdk:1.0.13'

2. Install Keploy Jar

- Download the latest jar from [here](https://search.maven.org/artifact/io.keploy/keploy-sdk/1.2.6/jar) (eg: 1.2.6) to mock external/internal dependency calls like DB queries, GMaps, S3 etc..

- Add the jar into the `main` directory

- Add `-javaagent:` prefix with absolute classpath of Keploy jar downloaded above

(For example: `-javaagent:/Users/jhon/project/src/main/agent-1.2.5.jar`)

You can set this through 3 ways:-

1. {'<'}details{'>'}{'<'}summary{'>'}
Using Intellij
{'<'}/summary{'>'}
Expand Down Expand Up @@ -71,6 +75,7 @@ Sync dependencies or to _build.gradle_:
## Supported Frameworks

- **For Spring based application**

- Add `@Import(KeployMiddleware.class)` below `@SpringBootApplication` in your main class.

```java
Expand All @@ -88,6 +93,7 @@ Sync dependencies or to _build.gradle_:
```

- **For Java EE application**

- Specify the below filter above all other filters and servlets in the **web.xml** file.

```xml
Expand Down
5 changes: 5 additions & 0 deletions versioned_docs/version-1.0.0/java/quickstart/spring-sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@ Sync dependencies or to _build.gradle_:
2. Install Keploy Jar

- Download the latest jar from [here](https://search.maven.org/artifact/io.keploy/keploy-sdk/1.2.6/jar) (eg: 1.2.6) to mock external/internal dependency calls like DB queries, GMaps, S3 etc..

- Add the jar into the `main` directory

- **Copy** `-javaagent:` prefix with absolute classpath of Keploy jar downloaded above

(For example: `-javaagent:/Users/jhon/project/src/main/agent-1.2.5.jar`)

You can set this through 3 ways:-

1. {'<'}details{'>'}{'<'}summary{'>'}
Using Intellij
{'<'}/summary{'>'}
Expand Down Expand Up @@ -178,10 +181,12 @@ _NOTE: You will be required to set the `javaagent` again in your test profile ju
```

- **Using IDE:** _(for local use-case we prefer running tests via IDE)_

1. Run your application.
2. You can also run the application with coverage to see the test coverage.

- **Using CLI**

1. Add maven-surefire-plugin to your `pom.xml`. In `<argLine > </ argLine >` **don't** add jacoco agent if you don't want coverage report.

{'<'}details{'>'}{'<'}summary{'>'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,26 @@ Behavior Driven Development (BDD) is an Agile methodology that emphasizes collab
## BDD Fundamentals

1. **Collaboration and Communication:**

- BDD fosters close collaboration among developers, testers, and business stakeholders.
- Open communication ensures that everyone has a shared understanding of the requirements and desired behavior.

2. **User Stories:**

- BDD starts with user stories written from the perspective of the end user, typically formatted as:
"As a [role], I want [feature] so that [benefit]."

3. **Scenarios and Examples:**

- Detailed scenarios illustrate specific behaviors of the software using the Given-When-Then format.
- These scenarios serve as clear acceptance criteria that define when a user story is complete.

4. **Gherkin Language:**

- BDD employs Gherkin, a simple, human-readable syntax that uses keywords like Given, When, Then, And, and But to structure scenarios.

5. **Acceptance Criteria:**

- Scenarios double as acceptance criteria, ensuring all functional requirements are testable and clearly defined.

6. **Automated Testing:**
Expand All @@ -52,12 +57,15 @@ Behavior Driven Development (BDD) is an Agile methodology that emphasizes collab
## Techniques of BDD

1. **Three Amigos Meetings:**

- A collaborative session involving a developer, tester, and business analyst to discuss and refine user stories and scenarios, ensuring alignment across teams.

2. **Example Mapping:**

- A technique to break down user stories into concrete examples, helping to identify edge cases and clarify requirements.

3. **Writing Gherkin Scenarios:**

- Scenarios are written in Gherkin syntax. For example:
```gherkin
Scenario: User logs in successfully
Expand All @@ -67,6 +75,7 @@ Behavior Driven Development (BDD) is an Agile methodology that emphasizes collab
```

4. **Automating Scenarios with BDD Tools:**

- Tools like Cucumber, SpecFlow, Behave, JBehave, Gauge, and Reqnroll parse Gherkin syntax and link it to executable test code. For example, using Cucumber with Java:

```java
Expand All @@ -87,9 +96,11 @@ Behavior Driven Development (BDD) is an Agile methodology that emphasizes collab
```

5. **Continuous Integration (CI) and Continuous Delivery (CD):**

- BDD scenarios are integrated into CI/CD pipelines to run automated tests with every build, ensuring that new changes do not break existing functionality.

6. **Living Documentation:**

- BDD scenarios act as up-to-date documentation that evolves with the system, making it accessible and understandable to both technical and non-technical stakeholders.

7. **Refactoring:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,31 @@ Integration testing can be performed using a variety of techniques, including:
### Challenges of Traditional Integration Testing Method

1. **Complexity of Systems:**

- It can be difficult to integrate different modules, parts, and outside services into complex software programs, requiring extensive testing techniques. The requirement to make sure that every component of the system handles data consistently and communicates effectively gives rise to this complexity. Furthermore, the dependencies, configurations, and functional properties of various modules may differ, which may lead to unexpected challenges during integration.

2. **Dependency Management:**

- Managing dependencies between components and ensuring they function together harmoniously can be complex, especially in distributed systems. Dependencies can include shared libraries, APIs, databases, and third-party services. Each dependency may have its own versioning, configuration, and compatibility requirements, which can lead to conflicts and integration issues. It is additionally challenging to identify and fix issues when changes to one component have a ripple effect on others. To ensure that every component function as a whole, detailed documentation, version control, and automated testing are necessary for effective dependency management.

3. **Data Management:**

- Handling realistic test data scenarios, ensuring data integrity, and maintaining consistency across different testing environments pose challenges in integration testing. Creating and managing test data that accurately reflects real-world scenarios can be time-consuming and complex. Additionally, ensuring that test data remains consistent across various environments (development, staging, production) is crucial to avoid discrepancies that could lead to false positives or negatives in test results. Furthermore, managing data versioning and synchronization between different modules and services adds another layer of complexity to the integration testing process.

4. **Environment Configuration:**

- Configuring testing environments to accurately reflect production while providing necessary isolation for testing is time-consuming and error-prone. Ensuring that the test environment mirrors the production environment in terms of hardware, software, network configurations, and data can be challenging. Differences between environments can lead to discrepancies in test results, making it difficult to identify true integration issues. Additionally, maintaining multiple environments for different stages of testing (development, staging, production) requires significant resources and coordination. Properly managing environment variables, secrets, and configurations across these environments adds another layer of complexity.

5. **Timing and Coordination:**

- Coordinating testing efforts across multiple teams or development cycles and ensuring all components are ready for testing at the same time require effective communication and coordination. This challenge is compounded by varying schedules, priorities, and resource availability among teams. Misalignment in timelines can lead to delays and bottlenecks, impacting the overall project timeline. Additionally, synchronizing test environments and ensuring consistent configurations across different teams can be difficult. Effective use of project management tools, regular status meetings, and clear documentation are essential to mitigate these challenges.

6. **Testing Third-Party Integrations:**

- Testing integration with third-party APIs, libraries, or services introduces complexity as teams have limited control over their behaviour and availability. These third-party components can change without notice, leading to unexpected failures. Additionally, rate limits, authentication issues, and network latency can further complicate testing. Ensuring compatibility with different versions and handling deprecated features also pose significant challenges.

7. **Regression Testing:**

- Managing regression testing across multiple integration points to ensure new features or changes do not introduce compatibility issues is challenging, especially in large systems. This involves verifying that existing functionalities continue to work as expected after modifications. The complexity increases with the number of integration points, as each point must be tested for potential side effects. Additionally, maintaining an up-to-date suite of regression tests can be resource-intensive, requiring continuous updates to test cases and test data to reflect the current state of the system. Automated regression testing tools can help, but they also require significant setup and maintenance efforts.

8. **Scalability and Performance Testing:**
Expand All @@ -66,15 +73,19 @@ Addressing these challenges requires careful planning, collaboration between dev
### Overcoming Integration Testing Challenges with Keploy

1. **Complexity of Systems:**

- Keploy simplifies integration testing with its user-friendly platform and automation capabilities. It streamlines the testing process, even in complex systems, by providing an intuitive interface for recording interactions and generating test cases.

2. **Dependency Management:**

- Keploy automates stub generation, eliminating the need for manual creation of stubs or mock objects, which can be time-consuming and error-prone. Instead, it generates realistic stubs based on recorded interactions during the testing process. By using recorded interactions to create stubs, Keploy ensures that the dependencies are accurately simulated, leading to more reliable and comprehensive integration tests.

3. **Data Management:**

- Keploy addresses the challenges of data management in integration testing through its advanced features and capabilities. It automates the process of generating test data, which eliminates the need for manual data creation and reduces the risk of human error. This ensures that test data is always available and consistent across different test runs.

4. **Environment Configuration:**

- Keploy addresses the challenge of environment configuration in integration testing through its native integration feature, which simplifies the setup process and accelerates testing. It seamlessly integrates with your development setups, allowing for quick and easy configuration without the need for extensive manual setup. This reduces the time and effort required to mirror production environments for testing purposes. It also provides a way to isolate test environments, ensuring that tests do not interfere with each other and that the testing environment accurately reflects production. This isolation helps maintain the integrity of test results.

5. **Timing and Coordination:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Microservice testing is the process of validating individual components of a mic
## Challenges in Microservices Testing:

- **Complex service dependencies** :

- Microservices often rely on other services, databases, or third-party APIs, making it challenging to test in isolation.

- **Difficulty in replicating production environments**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,37 @@ Software Testing Life Cycle, more commonly known as STLC, is a process to test s
Software Testing Life Cycle (STLC) comprises several phases that guide the testing process from inception to completion. The key phases include:

1. **Requirement Analysis**:

- **Objective**: Understand software requirements and define test objectives.
- **Activities**: Review requirements, identify testable features, and plan test strategy.

2. **Test Planning**:

- **Objective**: Define test scope, resources, and timelines.
- **Activities**: Develop test plan, determine testing types, and establish metrics.

3. **Test Design**:

- **Objective**: Create detailed test cases and scenarios.
- **Activities**: Write test cases, define test data, and prioritize tests.

4. **Test Environment Setup**:

- **Objective**: Prepare the testing infrastructure.
- **Activities**: Configure hardware, software, and test tools.

5. **Test Execution**:

- **Objective**: Execute test cases and identify defects.
- **Activities**: Run tests, log results, and capture evidence.

6. **Defect Reporting**:

- **Objective**: Document and prioritize defects.
- **Activities**: Report issues, classify severity, and assign to developers.

7. **Defect Retesting and Regression Testing**:

- **Objective**: Verify defect fixes and ensure no new issues arise.
- **Activities**: Re-execute failed tests, perform regression testing, and validate fixes.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ TDD is particularly effective in scenarios such as:
### Core Principles

- **Red-Green-Refactor Cycle:**

- **Red:** Write a test that fails.
- **Green:** Write code to pass the test.
- **Refactor:** Clean up the code while ensuring that tests still pass.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ keywords:
A Keploy eBPF is a language-agnostic library that offers APIs to do the following:

1. Capture all the network calls like

- API Request
- Dependency calls
- API Response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,26 @@ Behavior Driven Development (BDD) is an Agile methodology that emphasizes collab
## BDD Fundamentals

1. **Collaboration and Communication:**

- BDD fosters close collaboration among developers, testers, and business stakeholders.
- Open communication ensures that everyone has a shared understanding of the requirements and desired behavior.

2. **User Stories:**

- BDD starts with user stories written from the perspective of the end user, typically formatted as:
"As a [role], I want [feature] so that [benefit]."

3. **Scenarios and Examples:**

- Detailed scenarios illustrate specific behaviors of the software using the Given-When-Then format.
- These scenarios serve as clear acceptance criteria that define when a user story is complete.

4. **Gherkin Language:**

- BDD employs Gherkin, a simple, human-readable syntax that uses keywords like Given, When, Then, And, and But to structure scenarios.

5. **Acceptance Criteria:**

- Scenarios double as acceptance criteria, ensuring all functional requirements are testable and clearly defined.

6. **Automated Testing:**
Expand All @@ -52,12 +57,15 @@ Behavior Driven Development (BDD) is an Agile methodology that emphasizes collab
## Techniques of BDD

1. **Three Amigos Meetings:**

- A collaborative session involving a developer, tester, and business analyst to discuss and refine user stories and scenarios, ensuring alignment across teams.

2. **Example Mapping:**

- A technique to break down user stories into concrete examples, helping to identify edge cases and clarify requirements.

3. **Writing Gherkin Scenarios:**

- Scenarios are written in Gherkin syntax. For example:
```gherkin
Scenario: User logs in successfully
Expand All @@ -67,6 +75,7 @@ Behavior Driven Development (BDD) is an Agile methodology that emphasizes collab
```

4. **Automating Scenarios with BDD Tools:**

- Tools like Cucumber, SpecFlow, Behave, JBehave, Gauge, and Reqnroll parse Gherkin syntax and link it to executable test code. For example, using Cucumber with Java:

```java
Expand All @@ -87,9 +96,11 @@ Behavior Driven Development (BDD) is an Agile methodology that emphasizes collab
```

5. **Continuous Integration (CI) and Continuous Delivery (CD):**

- BDD scenarios are integrated into CI/CD pipelines to run automated tests with every build, ensuring that new changes do not break existing functionality.

6. **Living Documentation:**

- BDD scenarios act as up-to-date documentation that evolves with the system, making it accessible and understandable to both technical and non-technical stakeholders.

7. **Refactoring:**
Expand Down
Loading
Loading