Tag Info

Hot answers tagged

16

A few of my thoughts: Be honest that writing automated tests will take more time. If you're doing unit level TDD (which I would recommend as a starting point if you're going to invest in automated testing), you can expect about 30% extra time needed to code a feature. The key here is explaining that this extra 30% (which is probably higher than 30% in ...


10

If the tests aren't 100% automated, they lose a tremendous amount of value. They won't be run reliably, and are a lot more error prone because of the human interaction. If you can't get it 100% automated, remove that test completely, even if it means not testing that piece of functionality for now. As an aside, have you asked for help on stackoverflow? ...


7

I think Selenium as a stand-alone "record and replay" tool is ideal for non-technical users. The idiom of recording my path and then replaying it is intuitive, and the interface, while obviously geared toward non-newbs, isn't too intimidating. Selenium 2 / Selenium RC is obviously a higher order of complexity, and I don't think you can ask a non-programmer ...


7

One thing of definite value is that automate tests can be run continuously; such as every hour on a rebuild or similar. Doing this forces any bugs or regressions out into the open rapidly within hours or days of a programmer working on the offending code, this makes context switching much easier. The second benefit to continuous testing is that it forces ...


6

As far as I can tell, your example closely matches the strong coupling, as it is defined in Wikipedia: Strong coupling occurs when a dependent class contains a pointer directly to a concrete class which provides the required behavior. The dependency cannot be substituted, or its "signature" changed, without requiring a change to the dependent class. ...


6

The purpose of Selenium is to create UI-driven integration tests. Integration tests verify that all components of your system work correctly when deployed together. Integration tests are not a sufficient test strategy and complement other test strategies having a different focus, for example unit-testing and acceptance testing. UI-driven tests are ...


6

Test Expense Once an automatic test is written, it can be run by a computer at the cost of a few joules. The equivalent manual test requires a person on payroll working down a list of instructions. Test Reliability The computer can be trusted to faithfully execute the same test procedure, every time. The human is apt to make mistakes and get lazy. The ...


5

Run Selenium from a separate programming language's testing framework. Guaranteeing the evironment is OK without manually doing any work is really hard to do if you're using the selenium recorder and playing back in their standard test language. You'll need to export the code from the testrunner (or write it yourself) using a language like Java or C# where ...


4

The most important thing when creating tests like this once you get past a trivial number is the idea of symmetric change - a small change in the code should result in a small change in the test suite. For example, let's say you collect someone's name with two text boxes in 100 tests. If you write those tests niavely (or maybe are using record-playback) ...


4

Mostly (depending on your test coverage) bug-free code, and I would say that one of the biggest arguments is when you say to your manager that you can write a test for a discovered bug, ensuring you will always know in the future if that bug comes back :) My opinion is that unit / integration tests are most important, while if you apply some UI pattern like ...


4

Selenium-IDE is designed for the purpose of being used by non-programmers. But my experience is that the scripts that are produced that way (using generated XPath) are very brittle. So create in them should be no problem at all. Managing will be not-so-bad if your application is fairly stable. Or nearly impossible if your application is in development ...


4

Page Object elements should be private. The issue, especially with respect to the Page Object pattern, is that public objects expose their methods, not the page object's methods. If the page object's method would just be clickPrintButton(), there's not much difference, but imagine instead a printOrder() method that needs to click the button and wait for a ...


3

The number of files comprising your tests will be mostly irrelevant - The time spent running the tests themselves will be much greater than the time spent loading and compiling the files. Instead try to keep your test code manageable - group related tests together, and try to keep the files withion the very rough ballpark of 50-500 lines.


3

Not all of the testers are programmer savvy. Teach them. Or, if some are bright enough and others not, separate them out into automated testing and support (mostly replicating problems that others have found). This might sound like an onerous task, but it's really not that hard. They don't need to know about hard-core programming to write tests, simply ...


3

I strongly recommend you ask this question on the Software Quality Assurance & Testing beta site, or search for similar questions that have already been asked there. You will find a much greater depth of experience with using Selenium for record-and-replay QA. Eric's answer is the experience of most QA Engineers who used record-and-playback tools: The ...


2

You won't be testing if Google Graphs work, because that's not your job. What you should test, is if you're sending correct API calls to the external service and if given a well formated reply your application process it as expected.


2

Patrick Wilson Welsh has written a bit about this. I can't begin to re-create his work here, but check it out: http://patrickwilsonwelsh.com/?p=332


2

I think you answered your own question in your question when you asserted "If the tests rely on the framework to define the expected results and then verify them against the output on the webpage, then if the logic in the framework is incorrect, then the defined expected results will also be incorrect and there is a risk that the tests will pass even though ...


2

I've seen that "wait for the user to do something" technique done. It's a bad idea, for a lot of different reasons, but it can be made to work in a limited context. If you do it, obviously you don't have an automated test, but rather one that requires active human observation and interaction. Which means you can't run it as part of a Continuous ...


2

You should be able to use Hudson to kick off a Maven job (Hudson has a Maven plugin http://wiki.hudson-ci.org/display/HUDSON/Maven+2+Project+Plugin works with maven 3) that runs your test, see http://testng.org/doc/maven.html


2

Test code is code that needs to be read, executed and maintained, just like production code, so it should be subjected to the same standards as production code. Just use inheritance, interfaces, whatnot, where it makes sense and where it helps you build a maintainable selenium script. P.S.: the PageObject is a commonly used pattern for Selenium, where you ...


2

There is no "should". Testing is a tool. It's like asking "Should an artist always use oil-based paint". The answer is (of course!) "it depends". The goal of tests are to a) test the product, and b) be well engineered. You can write well-engineered tests in many styles. Your team should do what is most compatible with their skills.


1

My understanding is that Cucumber in Java uses step files that are POJOs and has the ability to do dependency injection via various cucumber extensions - at least, that's what it says in their documentation. As such, unless your specs are very simple and always going to remain that way, you really want to use real instances. Static is contagious - if you ...


1

If I were you, I would take advantage of Seliniums ability to run and get results from arbitrary javascript commands. Let's assume you have a structure something like this: <table id="mytable"> <tr> <th>description</th> <th>appname</th> <tr> <tr> <td>description ...


1

There are different ways that you may try and Hudson is one of them. However, you might not find a good resource or article to follow. Here is a nice walk-through how to succeed - Continuous Integration with Selenium I would also recommend to look at TestNG and Advanced Concepts book for a complete reference.


1

No, IDE is to help in creating tests not to create tests. You will need to code the tests if you want them to be usable and stable. As already suggested make the testers learn the tool. No need to learn hard core programmeing, basic Java would suffice.


1

I've had no problems training non-programming folk to write Selenium tests with relative XPaths in Java/JUnit. The programmer sets it up and writes a basic test template, the tester develops more tests - by recording and then tweaking them. If tester needs anything specific, he asks programmer to write it. Tester needs to have a really basic understanding of ...


1

I think you should lead with the magic points of "lower Cost" and "more Features/unit time" / smaller cycle-time. However before making a case, I'd advise to reflect on your situation. Your question led me to write a blog post on the potential cons of automated testing.



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