Hot answers tagged

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 ...
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). ...
  • 23.2k
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 ...
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 ...
  • 2,043
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 ...
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. ...
  • 131
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 ...
  • 157
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/...
  • 1,364
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. ...
  • 10.2k
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(...)....
  • 11.5k
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 ...
  • 1,364
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 )...
  • 2,099
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 ...
  • 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 ...
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) ...
  • 934
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::...
  • 10.2k
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
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 ...
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 ...
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: ...

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