I have an application which generates XHTML documents which are styled with (mostly) static CSS. I'm currently using XPath and Hamcrest (Java) to verify that the documents are constructed correctly. However, I also need to verify that the correct CSS properties are matched. For example, I would like a test like this:
Given XHTML element...
I have the following code:
private void SetControlNumbers()
{
string controlString = "";
int numberLength = PersonNummer.Length;
switch (numberLength)
{
case (10) :
controlString = PersonNummer.Substring(6, 4);
break;
case (11) :
...
When I create a MVC web application in Visual Studio 2010 it offers also to create a testing project using one of framework from the list.
But I have only VS built-in testing framework in it.
Is it possible to add NUnit there?
...
Can I get the advantages and disadvantages of Manual Unit Testing compare to the Automated process.
...
In TDD(Test Driven Development) development process, how to deal with the test data?
Assumption that a scenario, parse a log file to get the needed column. For a strong test, How do I prepare the test data? And is it properly for me locate such files to the test class files?
...
Possible Duplicate:
F# development and unit testing?
Are there any F# - specific agile software development tools? I'm thinking of things like a unit testing framework.
...
Hi All
I need to start using unit tests in my code . The problem is that i never written unit tests . Can you please recommend me some good sites and book how to write correctly unit tests and to use nunit application .
Thanks a lot for help.
...
I recently upgraded a C# project from .NET 3.5 to .NET 4. I have a method that extracts all MSTest test methods from a given list of MethodBase instances. Its body looks like this:
return null == methods || methods.Count() == 0
? null
: from method in methods
let testAttribute = Attribute.GetCustomAttribute(method,
...
Background Story
I'm working at a software firm developing a test automation framework to replace our old spaghetti tangled system.
Since our system requires a login for almost everything we do, I decided it would be best to use @BeforeMethod, @DataProvider, and @Factory to setup my tests. However, I've run into some issues.
Sample Te...
Basically I have a tear down method that I want to log to the console which test was just run. How would I go about getting that string?
I can get the class name, but I want the actual method that was just executed.
Class testSomething() {
@AfterMethod
public void tearDown() {
system.out.println('The test that just ran ...
I am looking into the unittest package, and I'm not sure of the proper way to structure my test cases when writing a lot of them for the same method. Say I have a fact function which calculates the factorial of a number; would this testing file be OK?
import unittest
class functions_tester(unittest.TestCase):
def test_fact_1(self):...
With NUnit, I could use NUnitForms to test the UI. It's massively cumbersome, but it gets the job done.
Is there something similar for MsTest for the version shipping in VS2008?
...
Our JUnits take a total of 6 hours to run. Is there an easy way to run 1/n of them on n different machines?
...
I'm writing some code (some of which uses W3C's libwww) in C. It's been a while since I've touched ANSI C. Back in the day we rolled our own test framework. Does anybody here have any test frameworks that they recommend for C programming?
Googling around I was inclined to go with Check. It has a page on other unit testing frameworks in ...
I have several custom controls (some kind of frames for content and layout management, like wrap panel), and would like to write unit tests for them. It's hard to find any good examples except Silverlight control toolkit, which has some helper classes to do unit tests and it's quite complicated. For MVVM classes it's easy to write tests...
I need to write a unit test suite for a project I am developing in my spare time. Being a CL newbie I was overwhelmed by the amount of choices for a CL implementation, I spent quite some time to choose one. Now I am facing exactly the same thing with unit test frameworks.
A quick glance at http://www.cliki.net/test%20framework shows 20 ...
I have a project with a lot of classes that use Nhibernate. Now I want to use NUnit to test those classes. Are there specific things I need to consider?
...
Hi,
I have written a test method for a web service in VS2008, using visual studio test framework.
Everything works fine until I enable code coverage for the web service dll in localtestrun.testrunconfig. Then, when I run the test, I get the result "Not executed". Could you give me an idea for this?
Thank you
...
Hello,
I am wrting test's and I have heard some people saying to use self.assertFalse rather than assert False. Why is this and are there any advantages to be had?
Thanks
...
I have been working on an ECMAScript implementation and I am currently working on polishing up the project. As a part of this, I have been writing tests like the following:
[TestMethod]
public void ArrayReduceTest()
{
var engine = new Engine();
var request = new ExecScriptRequest(@"
var a = [1, 2, 3, 4, 5];
a.red...