-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add timefreezing to keploy cloud (#330)
* docs: add docs for time freezing feature Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com> * docs: change in the dockerfile step of time freeze Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com> * docs: change in the dockerfile step of time freeze for diff arch Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com> * docs: add timefreezing to keploy cloud Signed-off-by: Neha Gupta <gneha21@yahoo.in> --------- Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com> Signed-off-by: Neha Gupta <gneha21@yahoo.in> Co-authored-by: gouravkrosx <gouravgreatkr@gmail.com>
- Loading branch information
1 parent
e290bb4
commit 3163f6c
Showing
2 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
82 changes: 82 additions & 0 deletions
82
versioned_docs/version-2.0.0/keploy-cloud/time-freezing.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
--- | ||
id: time-freezing | ||
title: Time Freezing | ||
sidebar_label: Time Freezing | ||
tags: | ||
- explanation | ||
- feature guide | ||
- jwt | ||
- time sensitive fields | ||
keywords: | ||
- time freezing | ||
- keploy cloud | ||
- jwt | ||
- time sensitive fields | ||
--- | ||
|
||
## Introduction 📘 | ||
|
||
### Why Time Freezing? ❄️ | ||
|
||
While making tests, **time-sensitive objects like JWT tokens are a challenge** as they expire, leading to test failures. This increases the maintenance effort of test suites and also impacts reliability. | ||
|
||
### What is Time Freezing? ⏳ | ||
|
||
With Keploy Cloud users will be able to **freeze/rollback the time in every test run, back to when the test case was recorded.** | ||
|
||
This allows developers to ensure time-sensitive objects don’t expire or change, **making tests consistent and more reliable.** | ||
|
||
## Usage 🛠️ | ||
|
||
### Running on Linux or Windows(WSL) 🐧💻 | ||
|
||
For native Linux, Windows(WSL) environments, simply **add the `--freezeTime` flag** when running your tests, like so: | ||
|
||
```bash | ||
keploy test -c "<appCmd>" --freezeTime | ||
``` | ||
|
||
Voila! Your tests will now run with time freezing enabled. | ||
|
||
### Running on Docker 🐳 | ||
|
||
For Docker-based applications, you'll need to make a few adjustments to your Dockerfile to utilize this feature: | ||
|
||
1. First, check your system architecture | ||
|
||
```sh | ||
uname -a | ||
``` | ||
|
||
2. Download the the appropriate time freeze agent for your architecture & set the `LD_PRELOAD` Environment Variable in your Dockerfile | ||
|
||
### amd64/x86_64 🖥️ | ||
|
||
```Dockerfile | ||
# Download the time freeze agent | ||
ADD https://keploy-enterprise.s3.us-west-2.amazonaws.com/releases/latest/assets/freeze_time_amd64.so /lib/keploy/freeze_time_amd64.so | ||
|
||
# Set LD_PRELOAD environment variable to use freeze_time_amd64.so | ||
ENV LD_PRELOAD=/lib/keploy/freeze_time_amd64.so | ||
``` | ||
|
||
OR | ||
|
||
### arm64/aarch64 📱 | ||
|
||
```Dockerfile | ||
# Download the time freeze agent | ||
ADD https://keploy-enterprise.s3.us-west-2.amazonaws.com/releases/latest/assets/freeze_time_arm64.so /lib/keploy/freeze_time_arm64.so | ||
|
||
# Set LD_PRELOAD environment variable to use freeze_time_arm64.so | ||
ENV LD_PRELOAD=/lib/keploy/freeze_time_arm64.so | ||
``` | ||
|
||
3. Re-Build your Docker image. | ||
4. Now **add the `--freezeTime` flag** when running your tests with Keploy, like so: | ||
|
||
```bash | ||
keploy test -c "<appCmd>" --freezeTime | ||
``` | ||
|
||
Voila! Your tests will now run with time freezing enabled. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters