Skip to content

Commit 56a1a66

Browse files
committed
update readme
1 parent 64600e4 commit 56a1a66

File tree

3 files changed

+27
-17
lines changed

3 files changed

+27
-17
lines changed

README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
# Basjoofan
2-
A cloud native HTTP API test and performance test service
2+
Cloud Native API Testing and Performance Testing Script Language
33

4-
[core](https://github.com/basjoofan/core) Command line tool for executing test scripts (preview version available)
4+
Basjoofan is a scripting language specifically designed for modern API testing and performance testing. It provides a concise and intuitive syntax that enables developers and test engineers to quickly write and execute interface test cases. The project adopts a cloud-native architecture, supporting the entire testing workflow from local development to cloud deployment.
55

6-
[vscode](https://github.com/basjoofan/vscode) SCode extension for developing test scripts (preview version available)
7-
8-
[flow](https://github.com/basjoofan/flow) Web service for manually or automatically executing test scripts in cloud resources (under development)
6+
## ✨ Features
7+
* Natural language-like test script writing
8+
* Built-in HTTP request support without complex configuration
9+
* Intuitive assertion syntax
10+
* Containerized deployment for easy scaling
911

12+
## 🚀 Start
1013
Let's start with a simple GET request:
1114
```
12-
let host = "httpbingo.org";
15+
let host = "httpbin.org";
1316
1417
rq get`
1518
GET https://{host}/get
16-
Host: {host}
17-
Connection: close
1819
`[status == 200]
1920
```
20-
Using the rq keyword to define a request named get and assert that the response status code equals 200.
21+
Using the rq keyword to define a request named get and assert response status code equals 200.
2122
```
2223
test get {
2324
let response = get->;
@@ -31,3 +32,12 @@ You can use the CLI tool with basjoofan test get to execute this test case. You
3132
For VSCode users: test script files need to end with .fan extension. Once automatically recognized, executable test blocks will have a run button added. Click the run button to execute the test case.
3233

3334
Interested folks are welcome to try it out! I'd really appreciate any feedback you might have. Thanks!
35+
36+
37+
## 📄 License
38+
MIT and Apache 2.0, allowing free use, modification, and distribution.
39+
40+
## 🚧 Plans
41+
* [flow](https://github.com/basjoofan/flow) Web service for manually or automatically executing test scripts in cloud resources (under development)
42+
* [vsc](https://github.com/basjoofan/vsc) VSCode extension for developing test scripts (preview version available)
43+
* [zed](https://github.com/basjoofan/zed) Zed extension for developing test scripts (not started)

cmd/src/command.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub async fn eval(text: String, source: &mut Source, context: Option<Context>) -
6060

6161
pub async fn test(
6262
name: Option<String>,
63-
tasks: u32,
63+
task: u32,
6464
duration: Duration,
6565
number: u32,
6666
path: Option<PathBuf>,
@@ -83,14 +83,14 @@ pub async fn test(
8383
}
8484
});
8585
let mut set = task::JoinSet::new();
86-
let (sender, mut receiver) = sync::mpsc::channel(tasks as usize);
86+
let (sender, mut receiver) = sync::mpsc::channel(task as usize);
8787
match name {
8888
Some(name) => {
8989
match source.test(&name) {
9090
Some(test) => {
9191
let continuous = Arc::new(AtomicBool::new(true));
92-
let maximun = number / tasks;
93-
for task in 0..tasks {
92+
let maximun = number / task;
93+
for task in 0..task {
9494
let continuous = continuous.to_owned();
9595
let sender = sender.to_owned();
9696
let mut writer = writer(record.as_ref(), task).await;

cmd/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ enum Commands {
2323
/// Test name
2424
#[command()]
2525
name: Option<String>,
26-
/// Tasks
26+
/// Task
2727
#[arg(short, long, default_value_t = 1)]
28-
tasks: u32,
28+
task: u32,
2929
/// Duration
3030
#[arg(short, long, value_parser = parse_duration)]
3131
duration: Option<Duration>,
@@ -53,7 +53,7 @@ async fn main() {
5353
}
5454
Some(Commands::Test {
5555
name,
56-
tasks,
56+
task,
5757
duration,
5858
number,
5959
path,
@@ -64,7 +64,7 @@ async fn main() {
6464
Some(duration) => (duration, u32::MAX),
6565
None => (Duration::MAX, number),
6666
};
67-
command::test(name, tasks, duration, number, path, record, stat).await;
67+
command::test(name, task, duration, number, path, record, stat).await;
6868
}
6969
None => {
7070
command::repl().await;

0 commit comments

Comments
 (0)