Questions tagged [phpunit]
PHPUnit is a free framework for testing PHP-scripts.
16
questions
5
votes
3
answers
600
views
PHPUnit Selenium-2 Test Case BadMethodCallException
I have installed selenium-server-standalone-2.33.0.jar, phpUnit, selenium extension for phpUnit.
This test runs ok:
$this->url('/');
$this->assertEquals('my title',$this->title());
But ...
4
votes
4
answers
7k
views
What automation tools to use with PHP development?
I've used Selenium IDE to test Drupal (PHP) sites but want to create more advanced tests with loops and such. I hear Selenium WebDriver is all the rage, but when I google it, all these terms pop up ...
4
votes
3
answers
2k
views
How do I simulate a right click using Selenium 2 and PHPUnit?
I am trying to execute a functional test using Selenium 2 and PHPUnit.
In the class 'Selenium2TestCase.php', I found this code:
class PHPUnit_Extensions_Selenium2TestCase_SessionCommand_Click ...
3
votes
3
answers
133
views
Which approach should be used for late tests in large projects?
I'm working in a very huge PHP project, but for many reasons the whole project was never tested until now. FYI, the project consists in a lightweight enterprise PHP framework based on Laravel.
My ...
3
votes
1
answer
133
views
A test case needs 5 mins of wait. During these 5 mins I want to run other test cases
A test case needs 5 mins of wait. During these 5 mins I want to run other test cases.
After 5 mins I want to check the necessary condition of 1st test case which is on hold for last 5 mins.
How to ...
3
votes
0
answers
761
views
How to add an assert to an if ..else condition using Phpunit and selenium webdriver
I'm working on test automation for a big project and I'm using Phpunit and as a server I'm using selenium webdriver.
In the source code I'm using asserts like :
$this->assertContains('Project Title'...
3
votes
0
answers
168
views
How to configure Phpunit.xml to use multiple browsers in Phpunit test with selenium webdriver
I'm working on automation test for a big project and I'm using **Phpunit** for functional test and as a server **selenium webdriver**.
I want to execute many tests using **different browsers** , I don'...
2
votes
2
answers
1k
views
Need help to get drop down in a list (phpunit+selenium2)
I am new in Phpunit and selenium2.
Need help to get all the values of drop-down in a list.
<select id="month" class="_5dba" title="Month" name="birthday_month" aria-label="Month">
<option ...
1
vote
1
answer
236
views
PHPUnit Selenium2 calling a function
I am testing with PHPUnit and Selenium2. I am testing the admin panel. So, I need to add Admin Login Test into all my admin panel tests.
I want to create a new Admin Login Test with a new file and I ...
1
vote
1
answer
1k
views
Selenium PHP select dropdown
Trying to select a dropdown and select an item from the list.
Here is the dom for the dropdown.
<li id="nav-galleries" class="dropdown header-dropdown hidden-xs hidden-sm">
<a class="...
1
vote
1
answer
676
views
Selenium File Upload [duplicate]
Having an issue trying to upload a file via php unit through selenium. This is the code for my current attempt.
public function testFileUpload()
{
$filePath = '/Users/cdolan/Desktop/...
1
vote
0
answers
24
views
Adding exception annotation in Phpunit
I'm using assertContains() method and I want to add an exception because during the test, if this return false it's stopped and not running the second test.
I followed the PhpUnit documentation but I ...
1
vote
1
answer
40
views
My Application is in Php, Using XAMPP SQL [closed]
SQL have one field i.e. Date
My application's UI have three drop down
Day
Month
Year
I inserted its value using CONCAT
$c3date= @trim(stripslashes($_POST['c3year']. '-' . $_POST['c3month'] . '-' ...
0
votes
1
answer
689
views
Run the test JS and PHP in parallel via CircleCI
I use circle to run JS and PHP test (Protractor/ Phpunit).
I would like use parallelism to win time but i don't know configure the parallelism. I activate the parallelism in the circle parameters (2 ...
0
votes
1
answer
2k
views
Selenium: Best way to capture unexpected error?
I know how to check values and create tests and do the error handling if something fails, but what I din't found anywhere was the following:
A test case tests specific things. But what when ...
-1
votes
2
answers
57
views
Name for testing routes, controller and views
I am currently writing tests for my Laravel 5.1 application and testing the workflow: input data from view to route to controller and back to view, typically checking for a DB record and a success/...