betty icon indicating copy to clipboard operation
betty copied to clipboard

Betty unit test.

Open ghost opened this issue 10 years ago • 20 comments

Add OS executor test suite.

ghost avatar May 16 '14 15:05 ghost

Add DateTime executor unit test.

ghost avatar May 16 '14 15:05 ghost

I think that it is not very good approach when you add functionality just to make test pass. I've implemented my vision of module test in #101 . I think it's a little better than that version because it allows strictly check if module methods was correct.

igorrKurr avatar May 20 '14 18:05 igorrKurr

  1. OS executor test suite. Update: Change the way it tests the specified module functionality as suggested by Jeff Pickhardt. Now the test suite is more robust.

ghost avatar May 20 '14 19:05 ghost

  1. DateTime executor test suite. Update: Change the way it tests the specified module functionality as suggested by Jeff Pickhardt. Now the test suite is more robust.

ghost avatar May 20 '14 20:05 ghost

  1. Count executor test suite.

ghost avatar May 20 '14 20:05 ghost

  1. Find executor test suite.

ghost avatar May 20 '14 20:05 ghost

I think that it is not very good approach when you add functionality just to make test pass. I've implemented my vision of module test in #101 . I think it's a little better than that version because it allows strictly check if module methods was correct

Nope. The purpose of these test suites are not checking the correctness of specified module methods. The correct purpose is to see that does the specified module return our preferred command or not?

ghost avatar May 20 '14 20:05 ghost

  1. Internet executor test suite.

ghost avatar May 20 '14 21:05 ghost

@pickhardt need you to participate here. @pannous need you to participate here.

ghost avatar May 20 '14 21:05 ghost

The correct purpose is to see that does the specified module return our preferred command or not?

Yes, but you've said what I mean.In your new tests you've checked functionality.But in previous version you've not.So my comment was about that.Now your tests seem to be ok.

Nope. The purpose of these test suites are not checking the correctness of specified module methods.

You test module here.So as much aspects you'd test as better your test suite is.I understand that you can't write test on help methods, but all other methods module functionality depends on are better to cover.Maybe not now, but it is good practice when your test coverage is high.

igorrKurr avatar May 21 '14 04:05 igorrKurr

The new tests you wrote are pretty good, @Ch0c0late. @igorrKurr's approach to testing is better because he tests the actual command response, and because he doesn't add functionality to the actual code just for the purposes of testing.

I can't automatically merge this pull request due to merge conflicts. Probably because I just merged this one https://github.com/pickhardt/betty/pull/101/files Can you fix the merge conflicts?

pickhardt avatar May 21 '14 05:05 pickhardt

@pickhardt Should I merge the upstream change(those the @igorrKurr wrote) into this branch?

ghost avatar May 21 '14 06:05 ghost

Yeah, you'll have to merge the current dev into your branch.

Sent from my Android. On May 20, 2014 11:10 PM, "Muhammad Hussein Nasrollahpour" < [email protected]> wrote:

@pickhardt https://github.com/pickhardt Should I merge the upstream change(those the @igorrKurr https://github.com/igorrKurr wrote) into this branch?

Reply to this email directly or view it on GitHubhttps://github.com/pickhardt/betty/pull/88#issuecomment-43715580 .

pickhardt avatar May 21 '14 06:05 pickhardt

@pickhardt Thanks. I'm going to merge it.

ghost avatar May 21 '14 06:05 ghost

@pickhardt Merged dev into betty unit-test branch. Hope it works correctly.

ghost avatar May 21 '14 07:05 ghost

@pickhardt Wrote test for all of betty's modules.

ghost avatar May 27 '14 10:05 ghost

These integration tests look great!

In terms of test style, can I get someone to look at #129

brysgo avatar Jul 30 '14 14:07 brysgo

@brysgo Took a look at it. Looks good.

ghost avatar Jul 30 '14 14:07 ghost

Getting these tests in is high priority for me. I'm going to merge in my fun tests and we can use the test configuration from it here.

brysgo avatar Jul 30 '14 15:07 brysgo

If you rebase this off the current dev branch, you can run bundle then rake to run the tests.

brysgo avatar Jul 30 '14 15:07 brysgo