browserstack-tester
Runs Selenium-based PHPUnit tests against MikoPBX using cloud browsers in BrowserStack.
Install
mkdir -p .claude/skills/browserstack-tester && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7782" && unzip -o skill.zip -d .claude/skills/browserstack-tester && rm skill.zipInstalls to .claude/skills/browserstack-tester
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Тестирование веб-интерфейса MikoPBX через BrowserStack. Запуск PHPUnit тестов с Selenium WebDriver в облачных браузерах. Использовать для автоматизированного тестирования админ-панели, проверки форм, навигации и интерактивных элементов.Key capabilities
- →Execute PHPUnit tests via Selenium
- →Automate admin panel UI testing
- →Verify form submission and navigation
- →Run targeted individual test methods
- →View test recordings in BrowserStack
How it works
Uses Selenium WebDriver to drive cloud browsers that connect to the local MikoPBX instance via a secure tunnel.
Inputs & outputs
When to use browserstack-tester
- →Running UI regression tests
- →Verifying admin panel functionality
- →Validating form submission logic
- →Testing navigation flows in cloud browsers
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
| Variable | Description | Default |
|---|---|---|
SERVER_PBX | PBX server URL | https://172.16.33.72 |
BROWSERSTACK_DAEMON_STARTED | Skip local tunnel start | true |
BROWSERSTACK_LOCAL_IDENTIFIER | Tunnel identifier | local_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 menuchangeTabOnCurrentPage($tabId)- Switch tabswaitForAjax()- Wait for AJAX requests to complete
Form Interactions
changeInputField($name, $value)- Set input field valueselectDropdownItem($id, $value)- Select dropdown optionchangeCheckBoxState($name, $checked)- Toggle checkboxsubmitForm($formId)- Submit form
Assertions
assertInputFieldValueEqual($name, $expected)- Check input valueassertCheckBoxStageIsEqual($name, $expected)- Check checkbox stateassertMenuItemSelected($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
- Test Patterns - Common testing patterns
- Troubleshooting - Common issues and solutions
When not to use it
- →Without a running BrowserStack Local tunnel
- →For non-web interface testing
Prerequisites
Limitations
- →Requires active local tunnel
- →Limited to MikoPBX admin panel UI
How it compares
It enables cloud-based cross-browser testing for a local PBX instance that is otherwise inaccessible to external services.
Compared to similar skills
browserstack-tester side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| browserstack-tester (this skill) | 1 | 7mo | Review | Intermediate |
| wp-testing-core | 6 | 9mo | Review | Intermediate |
| livewire-development | 25 | 6mo | No flags | Intermediate |
| woocommerce-backend-dev | 7 | 3mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by mikopbx
View all by mikopbx →You might also like
wp-testing-core
mikkelkrogsholm
Core WordPress testing procedures and patterns for browser-based plugin testing. Use when testing WordPress plugins, logging into WordPress admin, verifying plugin activation, or navigating WordPress UI.
livewire-development
spatie
Develops reactive Livewire 4 components. Activates when creating, updating, or modifying Livewire components; working with wire:model, wire:click, wire:loading, or any wire: directives; adding real-time updates, loading states, or reactivity; debugging component behavior; writing Livewire tests; or when the user mentions Livewire, component, counter, or reactive UI.
woocommerce-backend-dev
woocommerce
Add or modify WooCommerce backend PHP code following project conventions. Use when creating new classes, methods, hooks, or modifying existing backend code. **MUST be invoked before writing any PHP unit tests.**
php-testing
HoangNguyen0403
Unit and integration testing standards for PHP applications.
woocommerce-dev-cycle
woocommerce
Run tests, linting, and quality checks for WooCommerce development. Use when running tests, fixing code style, or following the development workflow.
woocommerce-email-editor
woocommerce
Setup and develop the WooCommerce block email editor. Use when working on email templates, transactional emails, or the email editor feature.