@@ -24,6 +24,12 @@ TestingBot provides a cloud-based test infrastructure for automated cross-browse
2424 - [ Storage Management] ( #storage-management )
2525 - [ Screenshots] ( #screenshots )
2626 - [ Team Management] ( #team-management )
27+ - [ Codeless Tests] ( #codeless-tests )
28+ - [ CLI Usage] ( #cli-usage )
29+ - [ Installation] ( #installation-1 )
30+ - [ Authentication] ( #authentication )
31+ - [ Available Commands] ( #available-commands )
32+ - [ CLI Examples] ( #cli-examples )
2733- [ Complete Examples] ( #complete-examples )
2834- [ Testing] ( #testing )
2935- [ Contributing] ( #contributing )
@@ -519,6 +525,148 @@ tb.resetCredentials(userId, function(error, result) {});
519525const result = await tb .resetCredentials (userId);
520526```
521527
528+ ### Codeless Tests
529+
530+ Codeless tests allow you to create automated tests without writing code. These tests can be configured to run on a schedule and include AI-powered test generation.
531+
532+ #### getCodelessTests
533+ Retrieves a list of codeless tests
534+
535+ ``` javascript
536+ // Callback style
537+ tb .getCodelessTests (offset, limit, function (error , tests ) {});
538+
539+ // Async/await style
540+ const tests = await tb .getCodelessTests (0 , 10 ); // offset: 0, limit: 10
541+ ```
542+
543+ #### createCodelessTest
544+ Creates a new codeless test
545+
546+ ``` javascript
547+ const testData = {
548+ name: ' My Codeless Test' , // Required: Test name
549+ url: ' https://example.com' , // Required: URL to test
550+ cron: ' 0 0 * * *' , // Optional: Cron schedule
551+ screenshot: true , // Optional: Take screenshots
552+ video: false , // Optional: Record video
553+ idletimeout: 60 , // Optional: Idle timeout in seconds
554+ screenresolution: ' 1920x1080' , // Optional: Screen resolution
555+ ai_prompt: ' Test the login flow' // Optional: AI test agent prompt
556+ };
557+
558+ // Callback style
559+ tb .createCodelessTest (testData, function (error , result ) {});
560+
561+ // Async/await style
562+ const result = await tb .createCodelessTest (testData);
563+ ```
564+
565+ #### updateCodelessTest
566+ Updates an existing codeless test
567+
568+ ``` javascript
569+ const updateData = {
570+ test: {
571+ name: ' Updated Test Name' ,
572+ cron: ' 0 12 * * *'
573+ }
574+ };
575+
576+ // Callback style
577+ tb .updateCodelessTest (updateData, testId, function (error , result ) {});
578+
579+ // Async/await style
580+ const result = await tb .updateCodelessTest (updateData, testId);
581+ ```
582+
583+ #### deleteCodelessTest
584+ Deletes a codeless test
585+
586+ ``` javascript
587+ // Callback style
588+ tb .deleteCodelessTest (testId, function (error , result ) {});
589+
590+ // Async/await style
591+ const result = await tb .deleteCodelessTest (testId);
592+ ```
593+
594+ ## CLI Usage
595+
596+ The TestingBot API package includes a command-line interface for quick access to API functionality.
597+
598+ ### Installation
599+
600+ ``` bash
601+ # Install globally for CLI access
602+ npm install -g testingbot-api
603+
604+ # Or use npx with local installation
605+ npx testingbot < command>
606+ ```
607+
608+ ### Authentication
609+
610+ The CLI uses the same authentication methods as the API client:
611+ - Environment variables: ` TB_KEY ` and ` TB_SECRET ` or ` TESTINGBOT_KEY ` and ` TESTINGBOT_SECRET `
612+ - Configuration file: ` ~/.testingbot ` with ` api_key ` and ` api_secret `
613+
614+ ### Available Commands
615+
616+ ``` bash
617+ # User management
618+ testingbot user info # Get user information
619+ testingbot user update < json> # Update user information
620+
621+ # Test management
622+ testingbot tests list [offset] [limit] # List tests
623+ testingbot tests get < id> # Get test details
624+ testingbot tests delete < id> # Delete a test
625+ testingbot tests stop < id> # Stop a running test
626+
627+ # Codeless tests (Lab)
628+ testingbot lab list [offset] [limit] # List codeless tests
629+ testingbot lab create < json> # Create a codeless test
630+ testingbot lab update < id> < json> # Update a codeless test
631+ testingbot lab delete < id> # Delete a codeless test
632+
633+ # Browsers and devices
634+ testingbot browsers list [type] # List browsers (type: all|web|mobile|real)
635+ testingbot devices list # List all devices
636+ testingbot devices available # List available devices
637+
638+ # Storage
639+ testingbot storage upload < file> # Upload a file
640+ testingbot storage list [offset] [limit] # List stored files
641+ testingbot storage delete < id> # Delete a stored file
642+
643+ # Help
644+ testingbot --help # Show help
645+ testingbot --version # Show version
646+ ```
647+
648+ ### CLI Examples
649+
650+ ``` bash
651+ # Create a codeless test
652+ testingbot lab create ' {
653+ "name": "Homepage Test",
654+ "url": "https://example.com",
655+ "cron": "0 0 * * *",
656+ "screenshot": true,
657+ "ai_prompt": "Test the homepage loads correctly"
658+ }'
659+
660+ # List recent tests
661+ testingbot tests list 0 20
662+
663+ # Get browser list
664+ testingbot browsers list web
665+
666+ # Upload a file to storage
667+ testingbot storage upload ./test-app.zip
668+ ```
669+
522670## Complete Examples
523671
524672### Basic Usage
0 commit comments