Recently, I configured my ongoing project to operate using Selenium and PhantomJS. (Similar configuration as shown here: ) Despite this setup, I have been encountering the following error: {"errorMessage":"Can only set Cookies for the current domain","re ...
Currently, I am conducting a whitebox test where the parent class and all interfaces are thoroughly tested. To ensure coverage, I have added the following doc comment: /** * @covers \Pat\Environment\PHP\Autoloader\Psr0<extende ...
After creating some phpunit selenium code for file upload, I noticed it functions properly on my local setup. The file path specified is: $filePath = getcwd(). "/Images/test_Image1.png" However, when running the same code on Jenkins (using SauceLabs), ...
Is there a way to always configure PHPStorm to use the phpunit.xml in a project's directory by default? The variable {PROJECT_DIRECTORY} doesn't seem to be working as expected. To set this up, go to Default Settings -> Languages & Frameworks -> ...
I am attempting to perform testing on my Laravel 5 web service using phpunit. As a newcomer to this testing framework, I am encountering some difficulties. The application relies on JWT for authentication, which is passed in headers with each request. To ...
Currently, I am in the process of writing functional tests for a Zend application. These tests are executed using PHPUnit and a wrapper called https://github.com/chibimagic/WebDriver-PHP In order to handle the extensive use of JavaScript and AJAX in the a ...
Currently, I am in the process of writing a unit test to verify if the method publish() has been called at least once. Here is a snippet from my test class: <?php namespace App\Tests\Unit; use Aws\Sns\SnsClient; use Exception; use ...
Testing is a new adventure for me, so please bear with me. I've managed to set up Selenium with Pear, PHPUnit, and the Sauce Labs class SauceOnDemandTestCase.php. Running simple tests worked fine, but as I moved on to more complex ones, I started encounter ...
Whenever I try to assign the value, it doesn't seem to work as expected. var $title = "name=order[contact][title]" ; var $title_val = "label=Mr" ; public function fillCustomerInfo() { $this->select($this->title, $title_val); ...
Recently, I have been using PHPUnit and Selenium Server for testing my Yii Application on a Windows XP operating system. I installed PHPUnit_Selenium (1.0.1) and followed the instructions provided in this forum post to set everything up: http://www.yiifram ...
When it comes to writing PHPUnit tests for ajax endpoints, I find it easy when the user doesn't need to be logged in. However, for the specific endpoint I want to test, the user must be logged in and I need to programmatically retrieve the cookie as part o ...
Is it feasible to use Selenium (preferably in combination with PHPUnit Selenium) to detect colors on a webpage? I have banners on my site, and some of them do not reload properly. It's strange because I can access their elements, but all I see on the ...
I am very new to Selenium and I am currently trying to configure PHPUnit with Selenium 2 by following a tutorial at https://www.youtube.com/watch?v=zva_GETXimI Here is what I have done so far: 1. Installed PHPUnit using PHAR as per the instructions here: ...
I am currently working on a ZF application where I had abstract parent classes located in the library directory. Initially, Netbeans was able to generate test skeletons for the child classes effortlessly and I could run the tests without any issues. After ...
Currently, I am working with cakephp 3, selenium facebook web driver, and phpunit. One issue that I am facing is the inability to access pages that require authentication. Despite trying to add the same auth session used in my controller unit tests, it ha ...
While conducting Selenium tests remotely with PHPUnit and Firefox, a peculiar issue arises where onChange events do not trigger as they normally would when a user is manually operating the browser. To address this, it has been suggested to enable the focus ...
Incorporating my custom assertion into Laravel's base TestCase class is something I'm working on. Here is a snippet of what it looks like: <?php namespace TestsMine; use TestsTestCase; class SomeTest extends TestCase { public function testSomet ...
I've been utilizing env.php to store my configurations, which is why I'm looking to implement dependency injection in my test class in order to access the configs. How can I inject the config class 'MagentoFrameworkAppDeploymentConfig' into my test clas ...
I have successfully tested my application module and another module separately. However, I would like to run all tests (both for the application module and the other module) together in order to generate a clover report for Jenkins. What steps should I tak ...
I've been experimenting with testing my Laravel system using the DatabaseTransactions trait. The issue I'm facing is that it only rolls back the transaction after all tests on a TestCase have been executed. Is there a way to ensure a fresh database instanc ...
Is there a way to retrieve the domain name in unittest? If not, how is this typically addressed? In general, there is no need for the domain name in UnitTest because you can use something like /edit.html and it works correctly. However, for Selenium test ...
After setting up a functional dev environment on my Android tablet, I am now looking to incorporate PHPUnit for running unit tests. Currently, I am utilizing Palapa Web Server with lighttpd 1.4.35 and php 5.5.15. Upon attempting to run php phpunit.phar - ...
I am currently working on a test scenario where I need to submit a blank form, wait for 10 seconds for the page to reload, and then verify if error messages are displayed. For this task, I am using Selenium2 which I initiate with the following command: j ...
While running all tests using PHPUnit, I've set up a wrapper that initiates an instance of Apache, then launches the Selenium standalone server, followed by creating the Chrome Remote Webdriver instance at http://localhost:4444/wd/hub. This process ru ...
Having trouble with Phinx migrations not working on sqlite memory in version 0.9.2. My app has a simple table (product). However, after running the migration, the product table does not exist: use Symfony\Component\Yaml\Yaml; use Phinx&bsol ...
After following the Codeception Quick Start instructions diligently, I proceeded to run the initial example test using PhpBrowser... # Codeception Test Suite Configuration # # [further comments omitted] # actor: AcceptanceTester modules: enabled: ...
Is there a way to automate the starting and stopping of the Selenium RC server while running phpunit tests? I was thinking of creating a bash script like this (which unfortunately does not work): java -jar ~/bin/selenium-server-standalone-2.0b3.jar & ...
My goal is to execute multiple tests with a shared session, all starting with a login process. <?php class ExampleTest extends PHPUnit_Framework_TestCase { /** * @var RemoteWebDriver */ protected $webDriver; ...
To ensure our project stays current and can benefit from the latest developments, we made the upgrade from Laravel 5.1 to 5.2 yesterday. After spending some time tweaking our codebase, everything appears to be functioning normally, except for the fact that ...
After following a helpful article by Rafael Dohms on debugging PHPUnit tests in NetBeans with Xdebug, I encountered some issues. When trying to debug in NetBeans and running tests using the command line, NetBeans would switch from "waiting for connection" ...
During my testing, I've come across some confusing reports. For instance: https://i.stack.imgur.com/hfRlM.png https://i.stack.imgur.com/0IDlG.png Another interesting case is: Why does xdebug label 587 and 588 as not executed while 589 is marked as ...
I am facing a challenge with my PHPUnit tests, which involve connecting to servers worldwide that occasionally experience timeouts. Instead of failing the test immediately upon server timeout, I would like to have the option to retry the test multiple tim ...
When I try to execute all test files in a directory by running phpunit tests/path/to/directory, it works fine. However, if I attempt to run two directories containing test files using the command phpunit tests/path/1 tests/path/2, where 1 and 2 are direc ...
For our current project, we have set up a system where we run PHPUnit tests using Selenium and Curl on a separate development server. Server B hosts an Apache server which serves the website. To begin the testing process, server A synchronizes the project ...
Currently, I am attempting to integrate Panther with PhpUnit in my project. However, I am encountering an issue when trying to log a user in the following manner: $client = static::createPantherClient(); /** @var User $user */ $use ...
In my setup, I have implemented phpunit to test a specific webpage where normal users are able to click a button that inserts data into a mysql database. With the help of PHPUnit/Selenium extension, I can automate user clicks on buttons like this: <?p ...
I'm currently testing an HTML builder through unit testing. My goal is to confirm that the output content matches the expected content, while allowing for some leniency when it comes to white space. More specifically, I am not concerned with whether the w ...
Whenever I try to utilize one of the standard PHPUnit Selenium assertions, the test fails and an error message is displayed: Error: Command cannot have multiple method arguments. The correct usage according to is: void assertElementValueEquals(string $ ...