Skip to content
Closed
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
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v5
with:
node-version: '18.0.0'
node-version: '20.0.0'

- name: Install Dependencies
run: npm install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prettify_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0

- name: Prettify code
uses: creyD/prettier_action@v4.3
uses: creyD/prettier_action@v4.6
with:
# This part is also where you can pass other options, for example:
prettier_version: 2.8.8
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/vale-lint-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
reporter: github-pr-check
# Fails the action if there are errors
fail_on_error: true
# Lint the files in the "versioned_docs/version-2.0.0/" directory
files: 'versioned_docs/version-2.0.0'
# Lint the files in the "versioned_docs/version-3.0.0/" directory
files: 'versioned_docs/version-3.0.0'
# Specify the Vale version
version: 3.0.3
env:
Expand Down
1 change: 0 additions & 1 deletion docs/hacktoberfest/contribution-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ 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,7 +19,6 @@ 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
7 changes: 0 additions & 7 deletions versioned_docs/version-1.0.0/java/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,13 @@ 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 @@ -75,7 +71,6 @@ 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 @@ -93,7 +88,6 @@ 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 All @@ -109,7 +103,6 @@ Sync dependencies or to _build.gradle_:
```

- **Configure Environment Variables** (optional)

- `APP_NAME` (default APP_NAME = myApp)
- `APP_PORT` (default APP_PORT = 6789)
- `KEPLOY_URL` (default KEPLOY_URL = localhost:6789/api)
Expand Down
13 changes: 2 additions & 11 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,15 +39,12 @@ 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 @@ -181,12 +178,10 @@ _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 Expand Up @@ -214,9 +209,7 @@ _NOTE: You will be required to set the `javaagent` again in your test profile ju
</plugin>
```

{'<'}/details{'>'}

2. If you want coverage report also add Jacoco plugin to your _pom.xml_.
{'<'}/details{'>'} 2. If you want coverage report also add Jacoco plugin to your _pom.xml_.

{'<'}details{'>'}{'<'}summary{'>'}
Add plugin
Expand Down Expand Up @@ -259,9 +252,7 @@ _NOTE: You will be required to set the `javaagent` again in your test profile ju
</plugin>
```

{'<'}/details{'>'}

3. Run your tests using command : `mvn test`.
{'<'}/details{'>'} 3. Run your tests using command : `mvn test`.

It will create .html files as test-reports which can be found in your target folder !!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,21 @@ 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 @@ -57,15 +52,12 @@ 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 @@ -75,7 +67,6 @@ 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 @@ -96,11 +87,9 @@ 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,55 +38,43 @@ 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:**

- Testing the scalability and performance of integrated systems under various conditions and loads requires specialized tools and expertise, posing resource-intensive challenges. This involves simulating real-world usage patterns, peak loads, and stress conditions to ensure the system can handle high traffic and data volumes without degradation. Additionally, identifying performance bottlenecks, memory leaks, and concurrency issues requires in-depth analysis and profiling. Ensuring that the system scales efficiently with increasing load and maintains optimal performance across different environments adds another layer of complexity.

Addressing these challenges requires careful planning, collaboration between development and testing teams, and the adoption of effective testing strategies and tools. This is where Keploy comes into the play.

### 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,7 +26,6 @@ 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,37 +20,30 @@ 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,7 +61,6 @@ 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,7 +14,6 @@ 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
Loading
Loading