2022 Developer Survey is open! Take survey.

Hot answers tagged

4 votes

How to verify no /tr /td rows exist in a table?

The Java Webdriver API has two methods for locating elements: findElement and findElements. findElement returns a single element matching the specified criteria (and otherwise throws an exception). ...
user avatar
  • 22.8k
4 votes
Accepted

Testing without external data?

You need to mock the request to the API. Here is a PHP example: https://github.com/InterNations/http-mock/blob/master/doc/start.md What this example does, is start a small fake http server, which ...
user avatar
2 votes

Testability analysis for PHP

Take a look at SonarQube. It has some good code complexity metrics. Since code complexity generally translates to test-ability, it will give you a good idea which areas of the code need refactoring. ...
user avatar
  • 355
2 votes

Testability analysis for PHP

How about the PHP Mess Detector, it generates all kinds of metrics about the code. Although its focus is not test-ability I think cleaning up the "mess" will lead to much better testable code. Since ...
user avatar
2 votes
Accepted

Which approach should be used for late tests in large projects?

Do you have access to the original requirements? If so, I would suggest you go back to these and build yourself a test plan. Because testing has come at the end of the process, my guess is they also ...
user avatar
  • 2,023
2 votes

Automation Testing with Ranorex

Maybe the test playback does not wait long enough for the element to appear, but as you do not give a lot of info about what your are testing and how its a bit of guessing work. I would read up on ...
user avatar
2 votes

Which approach should be used for late tests in large projects?

For the manual tests, I would suggest a cradle to grave approach witrh as large a business scenario as you can find. No idea about your business terms, but e.g.: Create a user. Log in with the user. ...
user avatar
  • 131
2 votes
Accepted

How to verify no /tr /td rows exist in a table?

You can check presence of /td or /tr tag in certain table with XPath. Do remember, that thead can have /td as well. If the table XPath is //table/tbody then XPath of each row is //table/tbody/...
user avatar
  • 1,344
2 votes

How to setup Behat for Magento on Mac with MAMP?

This is my first try to setup Behat Magetest for Magento on my MacOS - my tests run quite well and I want to share my experience. First of all you should download MAMP Pro and Magento, if you did not ...
user avatar
  • 157
2 votes
Accepted

How to perform static code analysis?

Jenkins is a continuous integration server, also known as a build server. It takes the source code and builds it, runs tests and execute any other commands you see fit. Afterwards it can report about ...
user avatar
2 votes

Legacy Code Testing with Jenkins on PHP

You will need some steps to get there: Have you repository system to notify Jenkins about the PR. That will depend on your system. GitHub and Bitbucket have system to do it. Build the PR branch. ...
user avatar
  • 9,813
1 vote

How to perform static code analysis?

SonarLint can be fully integrated with the IntelliJ or Eclipse without any difficulties. https://github.com/SonarSource/sonarlint-intellij
user avatar
1 vote

How to verify laravel default flash messages in selenium?

As per your screen shot there is a pre-defined text that fills your flash message. So what you could do is to set up FluentWait object that would use ExpectedConditions.visibilityOfElementLocated(...)....
user avatar
  • 11.4k
1 vote

Behat tests take over an hour to run

Optimalization of the test code is a key. Shorten, remove or replace any fixed wait states. Try to find hints on technology, you have. For example, use CSS instead of XPath, etc. The Paralelism could ...
user avatar
  • 1,344
1 vote

Behat tests take over an hour to run

One good implementation would be using a selenium grid and try multiple test simultaneously. Next would be carefully debug and examine the places where it take lots of time (eg waitings, DB accessing )...
user avatar
  • 2,093
1 vote

Testing at scale

Some of the things you can do to improve on testing speed: parallelize tests - some of the test runners that I've used before, like py.test and nosetests support running tests in parallel. In py.test ...
user avatar
  • 11.4k
1 vote

Testing at scale

IIRC, coverage.py has a module/plugin/runmode which can analyze the commit and run only tests which exercise changed code. Not sure if PHP has such runmode for coverage. Of course it is not a silver ...
user avatar
1 vote

Testing at scale

Some ways to help in approaching this scenario would be but not limited too: Have the majority of your automated tests at the unit/integration level (much more lightweight than e2e GUI ones) ...
user avatar
  • 924
1 vote
Accepted

Selenium PHP select dropdown

Selenium probably is trying to get the elements before the list is visible. After the click, try to wait: $driver->wait(10, 1000)->until( WebDriverExpectedCondition::...
user avatar
  • 9,813
1 vote
Accepted

Why does behat call my context class twice?

Important: several problems occur because you copy and paste behat.yml from website to your behat.yml - there are sometimes whitespaces, that you can't see but will effect your behat system!!! You ...
user avatar
1 vote

Which approach should be used for late tests in large projects?

@James From my experience, I can suggest you test plan / strategy. Go in Pragmatic but structure is essential. Use Risk application test matrix. Create Test scenario matrix. Use MoSCoW principle. If ...
user avatar
1 vote
Accepted

Testability analysis for PHP

Since there was no tool to do what I needed, I wrote one. https://github.com/edsonmedina/php_testability
user avatar
1 vote

Decoupling Unit Tests

This doesn't sound like code you'd want to unit test, since the purpose of it seems only to be interacting with a database. What you want here is integration testing which will verify that parts of ...
user avatar
1 vote

PHPUnit Selenium-2 Test Case BadMethodCallException

You need to run selenium server before you execute your test cases. Try following steps: Open Terminal / CMD. Navigate to directory where your selenium-server-standalone-2.33.0.jar is stored. E.g: ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible