Hot answers tagged

6

Let me try to explain this in simple words so that we don't get confused with different jargon used with Selenium. Selenium 2 API, (Google) WebDriver, Selenium WebDriver are same things. Why we call it Selenium WebDriver because it is combination of Selenium (from ThoughtWorks) and WebDriver (from Google). We call it Selenium 2 also since WebDriver ...


5

Did you try changing the line endings? Maybe SonarQube is expecting either linux or windows line endings and the file was saved with the opposite.


4

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 always returns that data that you expect/need for the test. You can also start a seperate mock-server manually and use that to test against. Read more at http://...


4

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). findElements returns a list of matching elements, or otherwise an empty list. With the Java API, you would solve the problem by calling findElements and then ...


4

"How to eat an elephant? One bite at a time." --- The scope of your question is so wide, that it is not possible to shows all subtle differences between different technologies you list. It would be more useful for you to focus on a single problem (e.g., interaction with Web browser) and then search for technology that helps you solve this problem. Therefore, ...


3

Phil is right with how customizable it is. After a quick search, I found a couple of export/import plugins. A more important question may be however, why are the testers using a separate instance from the developers? Doing a constant export/import is just going to create additional overhead. It's all fine and well if you update once, but, wouldn't the ...


2

Mantis is totally customisable so you could probably get someone to code a solution up - the database is open and the code is there for you to do whatever you want. It does mean coding in php though...


2

Yes, it definetely makes sense to use it in a language you are comfortable with. PHPUnit has Selenium integration out of the box, did you look at the introduction in the PHPUnit manual? Selenium has its quirks, but is widely used, so there is a lot of information about it available. There are other projects, though, like http://phantomjs.org/. If you are not ...


2

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. It also gives you some metrics on unit-test coverage. I find the historical aspect of this metric to be helpful. As code is added and/or refactored, I like ...


2

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 its a rules based system and open-source you could add more rules that are test-ability specific, maybe its possible to borrow rules from other products.


2

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 haven't given you enough time to test everything (been there!). I would therefor focus on the high risk and areas of ambiguity. By which I mean, if you read ...


2

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 how to wait for elements with Ranorex: http://www.ranorex.com/support/user-guide-20/test-automation-code-examples.html#c3197


2

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. Do something with user profile as user like change password. Create a customer/subscriber/item. Add account to cust/item. Add billing details. Add address. Add ...


2

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 do it already. It works without MAMP too - but that is how I did it - so feel free to work without MAMP. My final tests are based on the sample data provided ...


2

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 the status of these commands like success and or failures. Code analysis programs can be started and reported on with Jenkins, but this is not something that ...


2

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/tr and Xpath of any field could be //table/tbody/descendant::td Additionally, you should not test it for visibility, but for presence in DOM. Visibility ...


2

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. Report the job status. You can mitigate conflicts using a branching model like Gitflow, so developers can merge more frequently and only send PR without conflicts....


1

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(...). Like: wait.until(ExpectedConditions.visibilityOfElementLocated (By.xpath("//*[text()='TEXT_OF_FLASH_MESSAGE']"))); Make sure you have ...


1

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 help. I do not know if this is feasible in Semaphore, but you can run multiple tests at once. Especially if the time is caused by the slow application, test ...


1

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 ).If something found try to resolve that. Another thing would be check the resource utilization of your windows PC ,common problem can be the Read Write speed ...


1

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 world, there is the xdist plugin that allows to parallelize tests across CPUs and separate machines prioritize and fail fast - make sure the critical tests are ...


1

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 bullet (nothing is), but it can help you to decrease test runtime. If you go that way, you may want (possibly on a separate build server) to run separate, full ...


1

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) Incorporate e2e GUI tests as effeciently as possible, add them when there is real benefit of having them and run them independently in parallel to cut down execution ...


1

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::visibilityOfElementLocated(WebDriverBy::cssSelector('#nav-galleries .dropdown-menu')) );


1

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


1

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 should re-write the behat.yml, the context mentioned in behat.yml is wrong. It should be as follow. default:
 suites:
 default:
 ...


1

@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 needed involve the end user / stakeholder for review application. Later you can review again the test plan and strategy and make improvement from past ...


1

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


1

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 your system work together correctly. CRUD tests like this are pretty common integration tests in my experience. It is possible that there is something worth unit ...


1

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: cd /User/Documents/Selenium Execute following command to run the server java -jar selenium-server-standalone-2.33.0.jar This will start selenium server. ...


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