browserstack-tester

1
0
Source

Тестирование веб-интерфейса MikoPBX через BrowserStack. Запуск PHPUnit тестов с Selenium WebDriver в облачных браузерах. Использовать для автоматизированного тестирования админ-панели, проверки форм, навигации и интерактивных элементов.

Install

mkdir -p .claude/skills/browserstack-tester && curl -L -o skill.zip "https://mcp.directory/api/skills/download/7782" && unzip -o skill.zip -d .claude/skills/browserstack-tester && rm skill.zip

Installs to .claude/skills/browserstack-tester

About this skill

BrowserStack Web UI Tester

Тестирование веб-интерфейса MikoPBX через BrowserStack. Запуск PHPUnit тестов с Selenium WebDriver в облачных браузерах. Использовать для автоматизированного тестирования админ-панели, проверки форм, навигации и интерактивных элементов.

Prerequisites

BrowserStack Local must be running on the host machine:

# In a separate terminal on macOS host:
cd ~/PhpstormProjects/mikopbx/Core/tests/AdminCabinet
./start-browserstack-local.sh

This creates a secure tunnel between BrowserStack cloud browsers and local PBX server.

Running Tests

Basic Test Execution

# Run specific test file
docker exec -t mikopbx_tests-refactoring /bin/sh -c "
  cd /offload/rootfs/usr/www &&
  SERVER_PBX=https://172.16.33.72 \
  BROWSERSTACK_DAEMON_STARTED=true \
  BROWSERSTACK_LOCAL_IDENTIFIER=local_test \
  php vendor/bin/phpunit \
  --configuration tests/Unit/phpunit.xml \
  tests/AdminCabinet/Tests/YourTest.php"

Run Specific Test Method

docker exec -t mikopbx_tests-refactoring /bin/sh -c "
  cd /offload/rootfs/usr/www &&
  SERVER_PBX=https://172.16.33.72 \
  BROWSERSTACK_DAEMON_STARTED=true \
  BROWSERSTACK_LOCAL_IDENTIFIER=local_test \
  php vendor/bin/phpunit \
  --configuration tests/Unit/phpunit.xml \
  tests/AdminCabinet/Tests/NetworkInterfacesTest.php \
  --filter testAddNewVLAN"

Run Multiple Tests

# Use pipe (|) to run multiple test methods
--filter 'testAddNewVLAN|testStaticRoutes|testIPv6ManualConfiguration'

Environment Variables

VariableDescriptionDefault
SERVER_PBXPBX server URLhttps://172.16.33.72
BROWSERSTACK_DAEMON_STARTEDSkip local tunnel starttrue
BROWSERSTACK_LOCAL_IDENTIFIERTunnel identifierlocal_test

Test Structure

All tests extend MikoPBXTestsBase:

class MyFeatureTest extends MikoPBXTestsBase
{
    public function setUp(): void
    {
        parent::setUp();
        $this->setSessionName("Test: My Feature Name");
    }

    public function testMyFeature(): void
    {
        // Navigate to page
        $this->clickSidebarMenuItemByHref("/admin-cabinet/my-feature/modify/");
        $this->waitForAjax();

        // Interact with form
        $this->changeInputField('fieldName', 'value');
        $this->selectDropdownItem('dropdown-id', 'option-value');
        $this->changeCheckBoxState('checkbox-name', true);

        // Submit and verify
        $this->submitForm('form-id');
        $this->assertInputFieldValueEqual('fieldName', 'value');
    }
}

Key Helper Methods

Navigation

  • clickSidebarMenuItemByHref($href) - Navigate via sidebar menu
  • changeTabOnCurrentPage($tabId) - Switch tabs
  • waitForAjax() - Wait for AJAX requests to complete

Form Interactions

  • changeInputField($name, $value) - Set input field value
  • selectDropdownItem($id, $value) - Select dropdown option
  • changeCheckBoxState($name, $checked) - Toggle checkbox
  • submitForm($formId) - Submit form

Assertions

  • assertInputFieldValueEqual($name, $expected) - Check input value
  • assertCheckBoxStageIsEqual($name, $expected) - Check checkbox state
  • assertMenuItemSelected($id, $value) - Check dropdown selection

Test Files Location

  • Test classes: tests/AdminCabinet/Tests/
  • Base class: tests/AdminCabinet/Lib/MikoPBXTestsBase.php
  • PHPUnit config: tests/Unit/phpunit.xml
  • Test data factories: tests/AdminCabinet/Tests/Data/

BrowserStack Dashboard

View test recordings and logs at: https://automate.browserstack.com/dashboard/

Common Patterns

Wait for Element

self::$driver->wait(10, 500)->until(
    WebDriverExpectedCondition::visibilityOfElementLocated(
        WebDriverBy::id('element-id')
    )
);

Find Element by XPath

$element = self::$driver->findElement(
    WebDriverBy::xpath("//div[contains(@class, 'my-class')]")
);

CSS Selector

$rows = self::$driver->findElements(
    WebDriverBy::cssSelector('#my-table tbody tr:not(.template)')
);

References

openapi-analyzer

mikopbx

Извлечение и анализ OpenAPI 3.1.0 спецификации из MikoPBX для валидации эндпоинтов. Использовать при проверке соответствия API, генерации тестов, проверке схем эндпоинтов или интеграции с навыками endpoint-validator и api-test-generator.

41

restapi-translations

mikopbx

Управление переводами REST API ключей (rest_*) для MikoPBX. Автоматически находит отсутствующие русские ключи в RestApi.php и синхронизирует их с исходным кодом. Использовать при проверке переводов API, после добавления новых endpoints или перед релизом.

00

sqlite-inspector

mikopbx

Проверка консистентности данных в SQLite баз данных MikoPBX после операций REST API. Использовать при валидации результатов API, отладке проблем с данными, проверке связей внешних ключей или инспектировании CDR записей для тестирования.

640

api-test-generator

mikopbx

Генерация полных Python pytest тестов для REST API эндпоинтов с валидацией схемы. Использовать при создании тестов для новых эндпоинтов, добавлении покрытия для CRUD операций или валидации соответствия API с OpenAPI схемами.

40

translations

mikopbx

Управление многоязычными переводами на 29 языков с приоритетом русского языка. Использовать при добавлении новых переводов, переводе на все языки, проверке консистентности или удалении устаревших ключей.

30

babel-compiler

mikopbx

Транспиляция ES6+ JavaScript в ES5 для совместимости с браузерами используя Docker-based Babel компилятор. Использовать при транспиляции JavaScript файлов после внесения изменений в ES6+ исходный код.

30

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

9521,094

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

846846

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

571699

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

548492

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

673466

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

514280

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.