@appliqation/automation-sdk 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  A powerful SDK for integrating Playwright test results with the Appliqation test management portal.
4
4
 
5
5
  **What it does:**
6
- - ✅ **Auto-configuration** - Configure with just an API key (NEW!)
7
6
  - ✅ Automatically creates test runs in Appliqation
8
7
  - ✅ Handles browser authentication with JWT tokens
9
8
  - ✅ Reports test results (passed/failed/skipped) to your portal
@@ -42,19 +41,6 @@ Before you begin, ensure you have:
42
41
 
43
42
  Follow these steps in order to integrate the SDK with your Playwright tests.
44
43
 
45
- > **🎉 NEW: Simplified Configuration**
46
- > You now only need **one configuration value** to get started! Just provide your API key and the SDK automatically fetches your project ID and environment. This reduces setup from 3 required values to just 1.
47
- >
48
- > ```bash
49
- > # Before: 3 required values
50
- > APPLIQATION_API_KEY=...
51
- > APPLIQATION_PROJECT_KEY=... # ❌ No longer required
52
- > APPLIQATION_ENVIRONMENT=... # ❌ No longer required
53
- >
54
- > # After: 1 required value
55
- > APPLIQATION_API_KEY=... # ✅ That's it!
56
- > ```
57
-
58
44
  **📌 Important:** Appliqation reporting is **opt-in**. You must either set `APPQ_ENABLE=1` environment variable or add `-- --appq` flag to your test command to send results to Appliqation. Without enabling reporting, tests run normally but results are not reported.
59
45
 
60
46
  ### Step 1: Install the SDK
@@ -73,25 +59,20 @@ npm install @appliqation/automation-sdk dotenv
73
59
 
74
60
  Create a `.env` file in your project root with your Appliqation credentials:
75
61
 
76
- **File:** `.env` (Simplified - Recommended)
62
+ **File:** `.env`
77
63
  ```bash
78
- # 🎉 NEW: Auto-Configuration - Only API key required!
79
- # The SDK automatically fetches project ID and environment from your API key
64
+ # IMPORTANT: No spaces around = signs, no trailing slashes on URLs
80
65
 
81
66
  APPLIQATION_API_KEY=appq_live_xxxxxxxxxxxxxxxxxxxx
67
+ APPLIQATION_PROJECT_KEY=your-project-key-here
82
68
  TEST_APP_URL=https://www.example.com # App under test (Playwright baseURL)
83
69
  ```
84
70
 
85
- **That's it!** The SDK will automatically:
86
- - Fetch your project ID from the API key
87
- - Detect available environments
88
- - Use the default environment
89
-
90
- **How to get your API key:**
91
- - Go to your Appliqation project settings
92
- - Navigate to Settings > API Keys
93
- - Generate a new API key
94
- - Copy the API key (starts with `appq_live_`)
71
+ **How to get these values:**
72
+ - `APPLIQATION_API_KEY` - Found in your project settings
73
+ - `APPLIQATION_PROJECT_KEY` - Found in your project settings
74
+ - `TEST_APP_URL` - The site you’re testing (e.g., https://www.amazon.in). Used as Playwright `baseURL`.
75
+ -
95
76
 
96
77
  **⚠️ Add .env to .gitignore** to keep credentials secret:
97
78
  ```bash
@@ -100,50 +81,20 @@ echo ".env" >> .gitignore
100
81
 
101
82
  ---
102
83
 
103
- <details>
104
- <summary><strong>Advanced: Manual Configuration (Optional)</strong></summary>
105
-
106
- If you prefer to specify project ID and environment manually (or need backward compatibility), you can use the traditional configuration:
107
-
108
- ```bash
109
- # Traditional configuration - Still supported!
110
- APPLIQATION_API_KEY=appq_live_xxxxxxxxxxxxxxxxxxxx
111
- APPLIQATION_PROJECT_KEY=1162 # Optional: Auto-fetched if not provided
112
- APPLIQATION_ENVIRONMENT=Production # Optional: Uses default if not provided
113
- TEST_APP_URL=https://www.example.com
114
- ```
115
-
116
- **When to use manual configuration:**
117
- - You want to override the auto-detected environment
118
- - You're testing the SDK in development
119
- - You have specific environment requirements
120
- - Backward compatibility with existing setups
121
-
122
- **Benefits of auto-configuration:**
123
- - Simpler setup (1 value instead of 3)
124
- - Less configuration errors
125
- - Automatic environment validation
126
- - Easy to get started for new users
127
-
128
- </details>
129
-
130
- ---
131
-
132
84
  ### Step 3: Update playwright.config.js
133
85
 
134
86
  Update your Playwright configuration to use the SDK's built-in features:
135
87
 
136
- **File:** `playwright.config.js` (Simplified)
88
+ **File:** `playwright.config.js`
137
89
 
138
90
  ```javascript
139
91
  const { defineConfig } = require('@playwright/test');
140
92
  require('dotenv').config(); // Load .env variables
141
93
 
142
- // SDK configuration - Auto-configuration enabled!
94
+ // SDK configuration
143
95
  const appliqationConfig = {
144
96
  apiKey: process.env.APPLIQATION_API_KEY,
145
- // projectKey: Auto-fetched from API key! ✨
146
- // environment: Auto-detected default environment! ✨
97
+ projectKey: process.env.APPLIQATION_PROJECT_KEY,
147
98
 
148
99
  // Optional settings
149
100
  autoCreateRun: true, // Automatically create run on test start
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appliqation/automation-sdk",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "Appliqation Automation SDK with API key authentication, custom run titles, and framework-specific reporters",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",