Search Results

Search found 10010 results on 401 pages for 'a b testing'.

Page 110/401 | < Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >

  • Given a short (2-week) sprint, is it ever acceptable to forgo TDD to "get things done"?

    - by Ben Aston
    Given a short sprint, is it ever acceptable to forgo TDD to "get things done" within the sprint. For example a given piece of work might need say 1/3 of the sprint to design the object model around an existing implementation. Under this scenario you might well end up with implemented code, say half way through the sprint, without any tests (implementing unit tests during this "design" stage would add significant effort and the tests would likely be thrown away a few times until the final "design" is settled upon). You might then spend a day or two in the second week adding in unit / integration tests after the fact. Is this acceptable?

    Read the article

  • What's your development setup? (Talking right now to my boss)

    - by Flinkman
    How do I tell my boss, that I need endless cpu power to automate my daily job? By the way, what's your setup, now in sep, 2008. How fast disks? How much memory? How many cores? How big screen? (Ok, what the hell are you doing, you may ask. I'm working in multiple environments, vmware. Have couple of build-systems running, for compatibility tests. These build systems are automated. The setup of the build system is also. Is there an another way?) Thanks!

    Read the article

  • Running single integration test quickly in Grails

    - by Prakash
    Is it possible to quickly run single/all integration test in a class quickly in Grails. The test-app comes with heavy baggage of clearing of all compiled files and generating cobertura reports hence even if we run single integration test, the entire code base is compiled,instrumented and the cobertura report is getting generated. For our application this takes more than 2 minutes. If it was possible to quickly run one integration test and get a rapid feedbck, it would be immensely helpful. Thanks

    Read the article

  • Default Values Specflow Step Definitions

    - by Gavin Osborn
    I'm starting out in the world of SpecFlow and I have come across my first problem. In terms of keeping my code DRY I'd like to do the following: Have two scenarios: Given I am on a product page And myfield equals todays date Then... Given I am on a product page And myfield equals todays date plus 4 days Then... I was hoping to use the following Step Definition to cover both variants of my And clause: [Given(@"myfield equals todays date(?: (plus|minus) (\d+) days)?")] public void MyfieldEqualsTodaysDate(string direction, int? days) { //do stuff } However I keep getting exceptions when SpecFlow tries to parse the int? param. I've checked the regular expression and it definitely parses the scenario as expected. I'm aware that I could so something as crude as method overloading etc, I was just wondering if SpecFlow supported the idea of default parameter values, or indeed another way to achieve the same effect. Many Thanks

    Read the article

  • Unitesting JSPs

    - by Avi Y
    Hi, I would like to ask you what technologies exist out there for creating unitests for JSPs. I am already aware of the HtmlUnit/HttpUnit/JWebUnit/Selenium possibilities. Thank you!

    Read the article

  • How do I structure my tests with Python unittest module?

    - by persepolis
    I'm trying to build a test framework for automated webtesting in selenium and unittest, and I want to structure my tests into distinct scripts. So I've organised it as following: base.py - This will contain, for now, the base selenium test case class for setting up a session. import unittest from selenium import webdriver # Base Selenium Test class from which all test cases inherit. class BaseSeleniumTest(unittest.TestCase): def setUp(self): self.browser = webdriver.Firefox() def tearDown(self): self.browser.close() main.py - I want this to be the overall test suite from which all the individual tests are run. import unittest import test_example if __name__ == "__main__": SeTestSuite = test_example.TitleSpelling() unittest.TextTestRunner(verbosity=2).run(SeTestSuite) test_example.py - An example test case, it might be nice to make these run on their own too. from base import BaseSeleniumTest # Test the spelling of the title class TitleSpelling(BaseSeleniumTest): def test_a(self): self.assertTrue(False) def test_b(self): self.assertTrue(True) The problem is that when I run main.py I get the following error: Traceback (most recent call last): File "H:\Python\testframework\main.py", line 5, in <module> SeTestSuite = test_example.TitleSpelling() File "C:\Python27\lib\unittest\case.py", line 191, in __init__ (self.__class__, methodName)) ValueError: no such test method in <class 'test_example.TitleSpelling'>: runTest I suspect this is due to the very special way in which unittest runs and I must have missed a trick on how the docs expect me to structure my tests. Any pointers?

    Read the article

  • How do I unit test the methods in a method object?

    - by Sancho
    I've performed the "Replace Method with Method Object" refactoring described by Beck. Now, I have a class with a "run()" method and a bunch of member functions that decompose the computation into smaller units. How do I test those member functions? My first idea is that my unit tests be basically copies of the "run()" method (with different initializations), but with assertions between each call to the member functions to check the state of the computation. (I'm using Python and the unittest module.)

    Read the article

  • Detecting use after free() on windows. (dangling pointers)

    - by The Rook
    I'm trying to detect "Use after free()" bugs, otherwise known as "Dangling pointers". I know Valgrind can be used to detect "Use after free" bugs on the *nix platform, but what about windows? What if I don't have the source? Is there a better program than Valgrind for detecting all dangling pointers in a program? A free and open source would be preferred , but I'll use a commercial solution if it will get the job done.

    Read the article

  • Is there an equivalent to RSpec's before(:all) in MiniTest?

    - by bergyman
    Since it now seems to have replaced TestUnit in 1.9.1, I can't seem to find an equivalent to this. There ARE times when you really just want a method to run once for the suite of tests. For now I've resorted to some lovely hackery along the lines of: Class ParseStandardWindTest < MiniTest::Unit::TestCase @@reader ||= PolicyDataReader.new(Time.now) @@data ||= @@reader.parse def test_stuff transaction = @@data[:transaction] assert true, transaction end end

    Read the article

  • Boost Test dynamically or statically linked?

    - by Halt
    We use Boost statically linked with our app but now I wan't to use Boost Test with an external test runner and that requires the tests themselves to link dynamically with Boost.Test through the use of the required BOOST_TEST_DYN_LINK define. Is this going to be a problem or is the way Boost Test links completely unrelated to the way the other Boost libraries are linked? Thx.

    Read the article

  • Where should test classes be stored in the project?

    - by limc
    I build all my web projects at work using RAD/Eclipse, and I'm interested to know where do you guys normally store your test's *.class files. All my web projects have 2 source folders: "src" for source and "test" for testcases. The generated *.class files for both source folders are currently placed under WebContent/WEB-INF/classes folder. I want to separate the test *.class files from the src *.class files for 2 reasons:- There's no point to store them in WebContent/WEB-INF/classes and deploy them in production. Sonar and some other static code analysis tools don't produce an accurate static code analysis because it takes account of my crappy yet correct testcase code. So, right now, I have the following output folders:- "src" source folder compiles to WebContent/WEB-INF/classes folder. "test" source folder compiles to target/test-classes folder. Now, I'm getting this warning from RAD:- Broken single-root rule: A project may not contain more than one output folder. So, it seems like Eclipse-based IDEs prefer one project = one output folder, yet it provides an option for me to set up a custom output folder for my additional source folder from the "build path" dialog, and then it barks at me. I know I can just disable this warning myself, but I want to know how you guys handle this. Thanks.

    Read the article

  • Is there a Java unit-test framework that auto-tests getters and setters?

    - by Michael Easter
    There is a well-known debate in Java (and other communities, I'm sure) whether or not trivial getter/setter methods should be tested. Usually, this is with respect to code coverage. Let's agree that this is an open debate, and not try to answer it here. There have been several blog posts on using Java reflection to auto-test such methods. Does any framework (e.g. jUnit) provide such a feature? e.g. An annotation that says "this test T should auto-test all the getters/setters on class C, because I assert that they are standard". It seems to me that it would add value, and if it were configurable, the 'debate' would be left as an option to the user.

    Read the article

  • FRIEND_TEST in Google Test - possible circular dependency?

    - by Mihaela
    I am trying to figure out how FRIEND_TEST works in Google Tests. http://code.google.com/p/googletest/wiki/AdvancedGuide#Private_Class_Members I am looking at the following item, trying to implement it in my code: // foo.h #include "gtest/gtest_prod.h" // Defines FRIEND_TEST. class Foo { ... private: FRIEND_TEST(FooTest, BarReturnsZeroOnNull); int Bar(void* x); }; // foo_test.cc ... TEST(FooTest, BarReturnsZeroOnNull) { Foo foo; EXPECT_EQ(0, foo.Bar(NULL)); // Uses Foo's private member Bar(). } In the code above, the piece that I can't see, is that foo_test.cc must include foo.h, in order to have access to Foo and Bar(). [Perhaps it works differently for Google ? in my code, I must include it] That will result in circular dependency... Am I missing something ?

    Read the article

  • Can I write a test without any assert in it ?

    - by stratwine
    Hi, I'd like to know if it is "ok" to write a test without any "assert" in it. So the test would fail only when an exception / error has occured. Eg: like a test which has a simple select query, to ensure that the database configuration is right. So when I change some db-configuration, I re-run this test and check if the configuration is right. ? Thanks!

    Read the article

  • Execute JavaScript from within a C# assembly

    - by ScottKoon
    I'd like to execute JavaScript code from within a C# assembly and have the results of the JavaScript code returned to the calling C# code. It's easier to define things that I'm not trying to do: I'm not trying to call a JavaScript function on a web page from my code behind. I'm not trying to load a WebBrowser control. I don't want to have the JavaScript perform an AJAX call to a server. What I want to do is write unit tests in JavaScript and have then unit tests output JSON, even plain text would be fine. Then I want to have a generic C# class/executible that can load the file containing the JS, run the JS unit tests, scrap/load the results, and return a pass/fail with details during a post-build task. I think it's possible using the old ActiveX ScriptControl, but it seems like there ought to be a .NET way to do this without using SilverLight, the DLR, or anything else that hasn't shipped yet. Anyone have any ideas? update: From Brad Abrams blog namespace Microsoft.JScript.Vsa { [Obsolete("There is no replacement for this feature. Please see the ICodeCompiler documentation for additional help. http://go.microsoft.com/fwlink/?linkid=14202")] Clarification: We have unit tests for our JavaScript functions that are written in JavaScript using the JSUnit framework. Right now during our build process, we have to manually load a web page and click a button to ensure that all of the JavaScript unit tests pass. I'd like to be able to execute the tests during the post-build process when our automated C# unit tests are run and report the success/failure alongside of out C# unit tests and use them as an indicator as to whether or not the build is broken.

    Read the article

  • Rails + RSpec problem

    - by FancyDancy
    I have just installed Rspec and Rspec-rails. When i try to run the test, it says: rake aborted! Command /opt/local/bin/ruby -I"lib" "/opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/spec" "spec/controllers/free_controller_spec.rb" --options "/Volumes/Trash/dev/app/trunk/spec/spec.opts" failed Full log here: http://pastie.org/939211 However, my second "test" application with sqlite works with it. I think the problem is in my DB. My ruby version is 1.8.7, i use mysql as database. My files: specs/spec_helper.rb config/environment.rb config/environments/test.rb List of my gems My test is just: require 'spec_helper' describe FreeController do it "should respond with success" do get 'index' response.should be_success end end I really can't understand the error, so i don't know how to fix it.. Additional question: should i use a fixtures and ActiveRecord, if i going to use Machinist for creating test data? What should i do to disable them?

    Read the article

  • Test-driven Development: Writing tests for private / protected variables

    - by Chetan
    I'm learning TDD, and I have a question about private / protected variables. My question is: If a function I want to test is operating on a private variable, how should I test it? Here is the example I'm working with: I have a class called Table that contains an instance variable called internalRepresentation that is a 2D array. I want to create a function called multiplyValuesByN that multiplies all the values in the 2D array by the argument n. So I write the test for it (in Python): def test_multiplyValuesByN (self): t = Table(3, 3) # 3x3 table, filled with 0's t.set(0, 0, 4) # Set value at position (0,0) to 4 t.multiplyValuesByN(3) assertEqual(t.internalRepresentation, [[12, 0, 0], [0, 0, 0], [0, 0, 0]]) Now, if I make internalRepresentation private or protected, this test will not work. How am I supposed to write the test so it doesn't depend on internalRepresentation but still tests that it looks correct after calling multiplyValuesByN?

    Read the article

  • Junit 4 test suite and individual test classes

    - by Hypnus
    I have a JUnit 4 test suite with BeforeClass and AfterClass methods that make a setup/teardown for the following test classes. What I need is to run the test classes also by them selves, but for that I need a setup/teardown scenario (BeforeClass and AfterClass or something like that) for each test class. The thing is that when I run the suite I do not want to execute the setup/teardown before and after each test class, I only want to execute the setup/teardown from the test suite (once). Is it possible ? Thanks in advance.

    Read the article

  • Second Unit Test Not Running

    - by TomJ
    I am having trouble getting my Method B test to run. The logic is fine, but when the unit tests are run, only Method A will run. If Method A and B are switched in terms of spots, only Method B will run. So clearly the code is wrong at some point. Do I need to call method B's test from inside method A in order to get both unit tests to run? I'm pretty new to C#, so forgive my basic question. using redacted; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; namespace UnitTests { [TestClass()] public class ClassTest { public TestContext TestContext{get;set;} [TestMethod()] public void MethodATest() { the unit test } [TestMethod()] public void MethodBTest() { the unit test } } }

    Read the article

< Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >