Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Clint Hoagland
    @vsComputer_twitter
    ...described as "crappy tests"
    Not sure of the exact minute in the presentation he said it but he described what he does about them: moves them to a folder called "crappy-tests" and then replaces them with good tests when he has time.
    Rey Winters
    @reywinters03
    Ahhh haha yes! To me your throwaway tests are utility scripts
    Kevin Lamping
    @klamping
    @reywinters03 that story makes me crack up, because I can totally see it happening
    Rey Winters
    @reywinters03
    @klamping it was based on a true story ... I believe the actual upper bound limit of users were two 😂
    Kevin Lamping
    @klamping
    haha
    Rey Winters
    @reywinters03
    How many of you have or had created testing frameworks that ultimately were not used by the people you created it for ...?
    Kevin Lamping
    @klamping
    :raised_hand:
    was shut down after a year of development and some use
    Clint Hoagland
    @vsComputer_twitter
    <------- this guy
    Rey Winters
    @reywinters03
    Sigh me as well ...
    Rey Winters
    @reywinters03
    Does anyone here go into the SUT source code and change it to be more testable?
    Natalie J. Bennett
    @njbennett
    "Does anyone here go into the SUT source code and change it to be more testable?"
    All the time!
    I don't like to play the "best practice" card, but it's tremendously valuable. Often a small change in the production code can eliminate giant terrible swaths of test code.
    Kevin Lamping
    @klamping
    agreed. as a front-end dev, I don't mind an ID here and there to make testing easier
    Clint Hoagland
    @vsComputer_twitter
    This is a theological discussion I've argued with many many devs but my position is that code that is more testable is implicitly better and if you can change code to make it more testable it will make the code better. Full stop. So you should.
    Kevin Lamping
    @klamping
    yep
    i can see purists fighting back, but I think it's overwhelmingly worth the drawbacks
    Natalie J. Bennett
    @njbennett
    What kind of arguments do devs have against changing code for test ability?
    I work in a hardcore TDD shop so that viewpoint seems utterly alien
    Kevin Lamping
    @klamping
    well, from an html standpoint, you're adding IDs that don't serve a purpose other than for testing
    in theory that clutters up the code and increase page size
    but that's a pretty far stretch IMO
    Clint Hoagland
    @vsComputer_twitter
    IME bcz it breaks their OO design and "exposes class internals," usually because I want to do shit like inject a mock
    Natalie J. Bennett
    @njbennett
    @vsComputer_twitter ... have they heard about dependency injection?
    Clint Hoagland
    @vsComputer_twitter
    They have and they're against it. (Those that fight me on it)
    Natalie J. Bennett
    @njbennett
    That's fascinating. I was taught dependency injection as an Important Technique as a baby coder, before I learned TDD or even really had the programming knowledge to get what DI was.
    Clint Hoagland
    @vsComputer_twitter
    If you don't agree with TDD in principle and you don't think unit tests are important, dependency inversion doesn't seem all that important either.
    Natalie J. Bennett
    @njbennett
    Hmmm... I agree that it becomes a lot more important if you practice TDD, but I've worked with developers who were suspicious of TDD but valued loosely coupled and swappable components. I've also seen TDD proponents argue that the design changes you make in response to wanting to unit test things are part of what makes TDD a valuable practice.
    Clint Hoagland
    @vsComputer_twitter
    I agree with that. #choir
    Rey Winters
    @reywinters03
    There have been many arguments about changing code for test ability
    1. This is a dynamic table you want me to add ids on all the rows? But it'll change all the time how does that help you
    1. Why do you need that it doesn't help us
    s/1/2
    1. Why are you using that what if I change that in the future? What do you mean then it'll break? That's just useless and more work for the devs
    s/1/3
    Gitter won't let me out in 1. 2. 3. .... Booooo
    Natalie J. Bennett
    @njbennett
    I have less sympathy for people who try to convince you that writing tests conflicts somehow with Good Engineering.
    ... I think Gitter may have lost a bunch of messages from me
    Clint Hoagland
    @vsComputer_twitter
    I only see the two.
    Natalie J. Bennett
    @njbennett
    Yeah. The first one was gonna be-- Choir or not, I want to emphasize that writing and maintaining tests is an established techniques practiced by professionals serious about their craft. There are other techniques you can use to get similar results (good code review with a fanatical devotion to clean code, certain architectural and language decisions) but testing isn't "purists" vs. "those darn testers."
    I do have sympathy for people who are nervous about tests. It's hard to do well, most people aren't taught, and when done badly it can be really painful.
    But see "less sympathy" comment above.
    And changing code for test ability is a big part of the practice of writing tests regularly. It's bedrock:
    Clint Hoagland
    @vsComputer_twitter
    It seems like Rey's in a seat that's A: not at all uncommon and B: an antipattern that kinda sets her up to fail: a "test automator" that isn't on the dev team.
    Rey Winters
    @reywinters03
    What's sad is the things I'm saying is common in about 6 different companies ...
    i can understand why. It's tedious ... Gets in the way of the creative building to have to test each structure.
    And like some other people don't write it why do I have to ... And it's making me look unproductive since testing isn't something I can show ofd
    Off**
    And come on ... Is it really that necessary?