Skip to content

Commit

Permalink
feat: final revamp
Browse files Browse the repository at this point in the history
Signed-off-by: Animesh Pathak <[email protected]>
  • Loading branch information
Sonichigo committed Jan 3, 2025
1 parent c57fd92 commit f2624be
Show file tree
Hide file tree
Showing 7 changed files with 275 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* Hotfix: Changed primary color to black to resolve conflict with Docusaurus' default primary orange after disabling Tailwind preflight CSS. Added font size and line height adjustments to compensate for the removal of Tailwind preflight. */

/* --ifm-color-primary-lighter: #ffb575; */
font-size:18px;
font-size:14px;
line-height: 1.6;
--ifm-color-primary: #000;
--ifm-color-primary-lighter: #FFF;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
---
id: behaviour-driven-development
title: What is Behavior Driven Development (BDD)?
title: "Behavior Driven Development : Beginner's Guide to Collaboration"
sidebar_label: Behaviour Driven Development
description: Collaborative approach aligning software development with business goals through clear, readable test scenarios.
description: Learn how BDD bridges the gap between developers, testers, and business stakeholders with practical examples, tools, and techniques.
seoTitle: "Behavior Driven Development : Beginner's Guide to Collaboration"
seoDescription: Learn how BDD bridges the gap between developers, testers, and business stakeholders with practical examples, tools, and techniques.
tags:
- explanation
- Glossary
keywords:
- API
- BDD
- Behavior Driven Development
- Behavior Driven Development Tools
- BDD Testing Tools
- Behavior Driven Testing
- Test Automation
- Software Testing
- Software Testing Best Practices
- Test Automation
---

Behavior-driven development (BDD) is an Agile software development methodology that encourages collaboration between developers, testers, and business stakeholders. BDD is based on the idea that the best way to ensure that software meets the needs of its users is to write tests that describe the desired behavior of the software in plain language.
Expand Down Expand Up @@ -136,17 +145,17 @@ One of the core practices in BDD is the creation of automated tests based on the
Here are some of the popular BDD automation tools:
1. **Cucumber:** [Cucumber](https://github.com/cucumber/cucumber-js) is a free and open-source BDD tool that uses the Gherkin syntax for writing test cases in plain English. It can be programmed in several languages, including Java, Ruby, and JavaScript.
1. **Cucumber:** Cucumber is a free and open-source BDD tool that uses the Gherkin syntax for writing test cases in plain English. It can be programmed in several languages, including Java, Ruby, and JavaScript. Learn how to implement BDD with tools like Cucumber - [read now](https://keploy.io/blog/community/bdd-testing-with-cucumber)!
2. **Behave:** Behave is a behavior-driven testing tool written in Python that supports the Gherkin syntax and can be used in tandem with other testing frameworks like Pytest and Unittest.
3. **JBehave:** JBehave is a Gherkin-based, Java-based BDD tool that supports many testing frameworks, including JUnit and TestNG.
4. **SpecFlow:** [SpecFlow](https://github.com/SpecFlowOSS/SpecFlow) is a BDD tool that interfaces with Microsoft Studio and other .NET tools and employs the Gherkin syntax for writing specifications. It can be programmed in C# and Visual Basic, among other languages.
4. **SpecFlow:** SpecFlowis a BDD tool that interfaces with Microsoft Studio and other .NET tools and employs the Gherkin syntax for writing specifications. It can be programmed in C# and Visual Basic, among other languages.
5. **Gauge:** Gauge is an open-source BDD tool that employs a markdown-based syntax to describe tests. It can be programmed in Java, Ruby, and Python, among others.
6. **Reqnroll:** [Reqnroll](https://github.com/reqnroll/Reqnroll) is an open-source Cucumber-style BDD test automation framework for .NET.
6. **Reqnroll:** Reqnroll is an open-source Cucumber-style BDD test automation framework for .NET.
These tools can help to streamline the testing process and improve communication between developers, testers, and stakeholders. This can help to ensure that the software meets the needs of the business and is of high quality.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,38 @@
---
id: unit-test-automation
title: What is Unit Test Automation?
seoTitle: "Understanding Unit Test Automation: A Comprehensive Guide"
seoDescription: "Discover what unit test automation is, its benefits, best practices, and how it streamlines software development for better quality."
title: "Master Unit Test Automation: A Developer’s Essential Guide"
seoTitle: "Master Unit Test Automation: A Developer’s Essential Guide"
seoDescription: Discover how to simplify testing workflows with our expert guide to unit test automation. Tools, benefits, and best practices all in one place!
sidebar_label: Unit Test Automation
description: Simplify Your Testing Workflow with Unit Test Automation. Streamline processes for efficient and effective software testing.
description: Discover how to simplify testing workflows with our expert guide to unit test automation. Tools, benefits, and best practices all in one place!
tags:
- explanation
- Glossary
keywords:
- API
- Unit testing tools
- Test automation
- Automated testing frameworks
- Unit test best practices
- Continuous integration
- Test-driven development (TDD)
- Software testing
- Code quality assurance
- Automated testing benefits
- Unit testing examples
- Python unit tests
- Java unit testing
- Unit testing frameworks comparison
- Mock testing
- Code reliability
- CI/CD testing automation
- Unit test automation for developers
- Unit testing in software development
- Automated test scripts
- Bug detection through unit testing
- Software development testing tools
- ai testing agent
- opensource testing agent
---

Automating Unit Test is the practice of using automated tools and scripts to execute a set of predefined tests on individual units of code. These tests verify that each unit functions as intended, isolating and validating specific functionalities in an automated and repeatable manner.
Expand Down Expand Up @@ -94,11 +117,11 @@ Integrate your unit tests into your CI/CD pipeline to ensure they run automatica

- **Ignoring Test Failures**: Treat failing tests as a critical issue rather than a minor inconvenience. Investigate and fix them promptly to maintain the integrity of your code.

## What are some unit test automation tools?
## Best Tools for Automated Unit Testing

There are many unit testing tools available for a wide range of languages and environments. Some popular tools include:

### Keploy
### How to Use Keploy for Unit Testing

Keploy offers a one-click unit test generation tool that streamlines the testing process for developers. Instead of spending time writing test cases from scratch, you can generate them instantly, allowing you to focus on coding and delivering new features.

Expand All @@ -109,7 +132,7 @@ Keploy offers a one-click unit test generation tool that streamlines the testing
- **Focus on Quality**: Spend more time writing high-quality code while ensuring thorough validation.
![Keploy](../../../../../static/img/glossary/keploy_VS.png)

Get started by downloading the tool from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=Keploy.keployio) and boost your development workflow today!
Learn how to automate unit tests with these tools - [click to explore](https://keploy.io/blog/community/boost-unit-test-efficiency-using-ai-powered-extensions-for-vs-code)!

### pytest (Python)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,30 @@ keywords:
- software testing
- e2e testing
- integration testing
- automated unit testing
- unit test automation tools
- test case generation
- test-driven development
- debugging tools for testing
- JUnit integration
- PHPUnit testing
- PyTest unit tests
- Selenium testing
- test case validation
- dynamic test cases
- unit testing frameworks
- Keploy test automation
- continuous integration testing
- automated testing for developers
- bug detection in unit tests
- test automation best practices
- software quality assurance
- automated test debugging
- unit testing benefits
- test coverage tools
- CI/CD and testing
- ai testing agent
- opensource testing agent
---

## What is Unit Testing?
Expand Down
202 changes: 202 additions & 0 deletions versioned_docs/version-2.0.0/keploy-explained/common-errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
---
id: errors
title: Common Errors in Keploy
sidebar_label: Common Errors
tags:
- explanation
- faq
---

Let's check some of the common errors that you might encounter while working with Keploy!

[](https://camo.githubusercontent.com/74cbc79070c04e7077cfd86981c110678fe434e9269ea8f52eafb37b781cfb4a/68747470733a2f2f646f63732e6b65706c6f792e696f2f696d672f6b65706c6f792d6c6f676f2d6461726b2e7376673f733d32303026763d34)

### 1. Dependency Not Found Error

#### Description:

This error occurs when Keploy cannot locate or access a required dependency, such as a database or external service.

#### Possible Cause:

- The dependency may not be running or is incorrectly configured.
- Networking issues may be preventing Keploy from connecting to external dependencies.

#### Solution:

- Verify that all required services (e.g., databases, third-party APIs) are active and accessible.
- Check the environment variables or configuration files to confirm the correct host and port details.
- Use network diagnostic tools (e.g., ping, traceroute) to identify connectivity issues.

### 2. Unable to Record API Calls

#### Description:

Keploy fails to record incoming API traffic, meaning no tests are generated.

#### Possible Cause:

- Incorrect integration with the application.
- Keploy may not be correctly started with the application, or the SDK is not configured properly.
- The application may not be making API calls that are recognizable by Keploy.

#### Solution:

- Double-check the integration guide for the programming language you’re using.
- Ensure that Keploy is properly hooked into the API layer.
- Check Keploy logs for any missed or skipped requests.

### 3. Test Replay Failure

#### Description:

Keploy is unable to replay recorded API requests.

#### Possible Cause:

- External services or databases may be in a different state than they were during recording.
- Non-deterministic values like timestamps, UUIDs, or random values are causing failures.

#### Solution:

- Leverage Keploy’s mocking capabilities to simulate external services and databases.
- Use configurations to handle or exclude non-deterministic values for consistent comparisons.
- Regularly reset the database state to match the conditions during recording.

### 4. Response Mismatch Error

#### Description:

When Keploy replays API calls, it detects a mismatch between the recorded response and the current response.

#### Possible Cause:

- The application’s behavior has changed, leading to different responses.
- Changes in the response format, status codes, or headers that weren’t present during recording.

#### Solution:

- Review the application changes and determine if the mismatch is expected (e.g., new features).
- If the change is acceptable, update the test baseline to reflect the new behavior.
- Use Keploy’s flexible comparison options to ignore certain fields or values (like timestamps or version numbers).

### 5. Incorrect Test Generation

#### Description:

Keploy generates tests that don’t properly reflect the API interactions.

#### Possible Cause:

- The API interaction may be too complex or involve custom logic that Keploy cannot automatically handle.
- API parameters may be missing or misinterpreted during recording.

#### Solution:

- Review the recorded test cases for correctness.
- Manually adjust the generated tests to include missing or misinterpreted parameters.
- Make use of Keploy’s API to refine the recording process if necessary.

### 6. Database Connection Error during Test Replay

#### Description:

Keploy cannot connect to the database or other external systems during the replay of tests.

#### Possible Cause:

- The test environment may not have access to the same database as the original recording.
- Database credentials or host information could be incorrect or missing in the test environment.

#### Solution:

- Mirror the test environment configuration with the recording setup.
- Use database mocks or stubs for isolated testing.
- Double-check connection strings, credentials, and database availability.

### 7. Missing or Invalid Configuration Error

#### Description:

Keploy cannot find a valid configuration file or encounters errors in the configuration.

#### Possible Cause:

- The Keploy configuration file (keploy.yaml or similar) is missing or contains invalid values.
- Environment variables required by Keploy may not be set.

#### Solution:

- Ensure the configuration file exists and follows the correct format.
- Populate all required fields with valid values.
- Check that environment variables are properly set.

### 8. Timeout Errors

#### Description:

Keploy times out while recording or replaying API calls.

#### Possible Cause:

- Long-running API requests or slow external dependencies can cause timeout issues.
- Keploy may have low timeout settings for API calls.

#### Solution:

- Increase timeout settings in the Keploy configuration.
- Identify and optimize slow-performing APIs or dependencies.
- Use monitoring tools to analyze API performance.

### 9. Insufficient Permissions

#### Description:

Keploy fails due to insufficient permissions when accessing files, networks, or other resources.

#### Possible Cause:

The user or service running Keploy may not have sufficient permissions to access resources like databases, APIs, or file systems.

#### Solution:

- Ensure that the user or service running Keploy has the necessary permissions.
- Review system permissions and provide the required access rights for Keploy to function properly.

### 10. Version Compatibility Issues

#### Description:

Errors occur because of version mismatches between Keploy, its dependencies, or the application it’s testing.

#### Possible Cause:

- Using incompatible versions of Keploy or related SDKs with your application.
- Dependencies of Keploy (e.g., for mocking or replaying) may have updated and broken compatibility.

#### Solution:

- Verify version compatibility for Keploy and its SDKs.
- Consult Keploy documentation or release notes for known issues.
- Use version pinning to maintain a stable environment.

### 11. Unsupported Protocol or API

#### Description:

Keploy does not support the protocol or API structure you are using (e.g., gRPC, SOAP, etc.).

#### Possible Cause:

- The application might use an API or protocol that Keploy doesn’t yet support (e.g., WebSocket, gRPC).

#### Solution:

- Confirm the supported protocols (currently HTTP/REST and GraphQL).
- Consider alternative tools or frameworks for unsupported protocols.

If you’re still encountering issues after trying these solutions, feel free to reach out to the Keploy team or consult the community forums for additional support. Happy testing!

import GetSupport from '../concepts/support.md'

<GetSupport/>
2 changes: 1 addition & 1 deletion versioned_docs/version-2.0.0/keploy-explained/mac-linux.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: mac-linux
title: "Running Keploy Natively on MacOS by setting up a linux env"
sidebar_label: Keploy on MacOS native
sidebar_label: MacOS Native
---

# Running Keploy Natively on MacOS by setting up a linux env
Expand Down
5 changes: 3 additions & 2 deletions versioned_sidebars/version-2.0.0-sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"type": "category",
"label": "Quickstart Guide",
"collapsible": true,
"collapsed": true,
"collapsed": false,
"items": [
{
"type": "category",
Expand Down Expand Up @@ -163,7 +163,8 @@
"collapsible": true,
"collapsed": true,
"items": [
"keploy-explained/faq"
"keploy-explained/faq",
"keploy-explained/errors"
]
}
],
Expand Down

0 comments on commit f2624be

Please sign in to comment.