Questions tagged [phpunit]

PHPUnit is a free framework for testing PHP-scripts.

Filter by
Sorted by
Tagged with
1
vote
1answer
536 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
0answers
22 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 ...
2
votes
0answers
591 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 ...
1
vote
0answers
129 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't know what'...
1
vote
1answer
726 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
votes
2answers
53 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/...
2
votes
3answers
103 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 ...
1
vote
1answer
39 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'] . '-' ...
2
votes
2answers
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 ...
3
votes
1answer
122 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 ...
0
votes
1answer
629 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 ...
1
vote
1answer
235 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 ...
0
votes
1answer
1k 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 ...
5
votes
3answers
562 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
3answers
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
3answers
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 ...