Interactive Templates

Berry Language Showcase

From simple single-step validations to enterprise-grade sequence tests with environment configurations and secret decryption.

Select Scenario

Kitchen Sink

Explore the comprehensive features of the Berry scripting language. This script showcases all available nodes, blocks, variable declarations, API definitions, data extraction, and logic assertions.

Concepts Showcased

  • Variable pointers & secret decryption
  • Multiple HTTP methods (GET, POST, PUT)
  • Headers and Body payload interpolation
  • Step-by-step stateful execution
  • Cross-step variable references
  • Complex logical check conditions (==, >=, OR)
Run in Playground
templates / kitchen-sink.berry
1 ## ---------------------------------------------------------
2 ## FLEXIBERRY KITCHEN SINK DEMONSTRATION FILE
3 ## ---------------------------------------------------------
4 ## This file showcases every syntax, token, and grammar rule
5 ## that the Berry compiler is capable of parsing.
6
7 Var @PROD Production Config
8 - envName: 'production'
9 - timeout_ms: 5000
10 - isDebug: false
11
12 Var DefaultUser
13 - username: 'admin_rintu'
14 - password: 'super_secret_password'
15
16 Api POST #authenticateUser Login to the system
17 Url https://api.example.com/v1/auth/login
18 Header
19 - Content-Type: 'application/json'
20 - Accept: 'application/json'
21 Body JSON `
22 {
23 "username": "{{username}}",
24 "password": "{{password}}"
25 }
26 `
27
28 Api GET #getUserProfile Fetch the user data
29 Url https://api.example.com/v1/users/{{userId}}
30 Header
31 - Authorization: 'Bearer {{authToken}}'
32 - Accept: 'application/json'
33
34 Api PUT #updateUser Update user status
35 Url https://api.example.com/v1/users/{{userId}}
36 Header
37 - Content-Type: 'application/json'
38 - Authorization: 'Bearer {{authToken}}'
39 Body JSON `
40 {
41 "status": "active",
42 "preferences": {
43 "notifications": true
44 }
45 }
46 `
47
48 Task Complete User Lifecycle Flow
49
50 Step Call Api authenticateUser
51 Params
52 - username: username
53 - password: password
54 Capture
55 - authToken: response.token
56 - returnedUserId: response.user.id
57 Check
58 - $.status == 200 OR $.status == 201
59 - Step.1.authToken != null
60
61 Step Call Api getUserProfile
62 Params
63 - userId: Step.1.returnedUserId
64 - authToken: Step.1.authToken
65 Capture
66 - currentStatus: response.status
67 Check
68 - $.status == 200
69 - response.username == DefaultUser.username
70
71 Step Call Api updateUser
72 Params
73 - userId: Step.1.returnedUserId
74 - authToken: Step.1.authToken
75 Check
76 - $.status >= 200
77 - $.status < 300
78 - response.status == 'active'
79