Tag Info

Hot answers tagged

5

The approach I've seen most often is to have the unit tests as a separate project in the application solution, so they can be run against production code as part of the build process, but are not included in the production code. Some of the reasons for the separation are: Logical separation. You want your unit tests to catch issues with initialization, ...


3

For really good, robust, maintainable UI automated regression, you need code. Using screenshots is bad for several reasons: Even with a fuzz tolerance built in to prevent things like the exact color of the display throwing false positives, there are too many trivial things that can throw a false positive. A change of display resolution will utterly destroy ...


3

Like any other form of automated test, it depends on how you're invoking them and the environment you need to run. If you need a UI user session (which is the common setup) then you're probably not going to be packaging them with the unit tests. Some of the factors to consider are: CodedUI tests are slower than unit tests because they interact with the ...


3

If you have to support multiple versions for your software product I would keep the tests with in the same repository. Then the tests will version with the application itself. Which will make you able to run the tests for older versions with ease. Also you will want your developers to run and maintain the tests. For example when they need to change the ID ...


2

Can any one explain Assert.AreEqual(true, true) Verifies that two specified objects are equal. The assertion fails if the objects are not equal. Displays a message if the assertion fails. example and explanation? Very simple NUnit test: using System; using NUnit.Framework; namespace SampleUnitTest { [TestFixture] public Class SampleTest { ...


2

You can use Assertions to verify something is in a certain state. Normally you compare the actual against the excepted state. Example usage: Do some steps in your application Gather the value of a field Assert that the value is indeed the value you expect Assert.AreEqual(Actual, Expected) This could give an assertion failure if Actual and Expected ...


2

I've found in the past that using a BDD framework like SpecFlow helped me with this. You can start off writing the tests, and slowly start writing the code for it each of the tests as your able to. SpecFlow is great for code re-use, although, it can take some getting used to. An example of this is every time you use "And log in to the application", the ...


2

Take a look at http://msdn.microsoft.com/en-us/library/windows/desktop/ms633494(v=vs.85).aspx, and http://www.pinvoke.net/default.aspx/user32/enumchildwindows.html This is a c# example, but you wrap this in a dll and import into QTP. Also, depending on the window you might be over-engineering a bit. If you top window is the parent, and the window you need ...


1

WGet is a command-line tool used to download files. Here's a good tutorial on how it works; you'll need to call out to the command line from inside your test and execute wGet, then check the file it downloaded. How you do this differs depending on your setup (Java vs C#, Windows vs Linux, et cetera). Basically you want to execute the command wget ...


1

Programs are great at waiting. If your using web driver you can easily add a wait clause like: public static bool WaitFor(this IWebDriver browser, By byLocator, int maxWait = 5) { for (int i = 0; i < maxWait; i++) { if (browser.IsElementPresent(byLocator)) return true; Thread.Sleep(1000); } return false; } ...


1

Start by forgetting about the "micro-controller" and "embedded" parts and design tests like for any other system. Look at the specifications, explicit and implicit, and design tests o cover them. Test tools ? there are a lot of test tools that match your general description and can generate analog signals, RS232 (even your PC can) or digital signals, you'll ...


1

There are many different ways to do this, depending on the tools you have available and the way your server-side code runs. If you have a means to interact with the server via API, you can use that to test server side validation. Alternatively, you can use tools like Fiddlr to directly send parameters and parse responses. Some of the load-testing tools ...


1

It is probably different for each organization/team/product/process, but here is a typical process I have used (starting from new functionality): Identify the key test parameters such as oracles, surfaces (variables like platform, inputs, outputs, etc), and risk areas. Explore the function under scrutiny at the time using multiple manual test sessions. ...


1

Having a robust framework is always a challenge for an Automation Engineer. I had worked on a project in which, we added every single object into the repository and finally found the maintenance activity as a Herculean task. Also, maintaining a local OR for every script will add to more chaos. (I hope you agree to this) With the help of an Automation ...


1

I'm the QA manager of Learni an education startup, and I'm a customer of applitools. Their brilliant app/sdk allows me to do exactly what you're describing, e.g adding one code of line, every time I want to take a screenshot, on the current selenium/appium code test you're already using, send it on the fly to their server, and when the test ends I go to ...



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