emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
To: Ben Alexander <bva@alexanderonline.org>
Cc: emacs-orgmode Org-Mode <emacs-orgmode@gnu.org>
Subject: Re: How you can help
Date: Thu, 23 Oct 2008 18:26:22 +0200	[thread overview]
Message-ID: <87r6679t1t.fsf@kassiopeya.MSHEIMNETZ> (raw)
In-Reply-To: <752DA813-1B66-4FD1-B28E-3C23176BA13D@alexanderonline.org> (Ben Alexander's message of "Thu, 23 Oct 2008 15:55:41 +0100")

Ben,

I added this to the new page on worg. Please tell me: is it OK for you,
if I simply add your ideas there??

What do the others think?


Ben Alexander <bva@alexanderonline.org> writes:
> The tutorial I'd need to write a test is one which lays out code I could copy
> and paste to do the following
>
> * setup the test environment
>   - create a test directory
>   - create a sample test.org file
>   - put the cursor in a particular place
>
> * run the command we need to test
>   - hit the 'TAB' key, or C-c C-c (some folks might need to be reminded how to
> find out exactly what command is actually being run  when you hit a keystroke.
> And some of me might need to be told what  lisp-code to use when the keystroke
> runs different commands at  different places in a file)
>   - reformat a table
>   - clock in/out
>   - create the agenda
>   - export .html .ics .dvi file
> * How do we specify the correct result???
>   - check that the headline folded properly.  What's the lisp code for getting
> the folded string as displayed?
>   - check that the cursor is where it should be? especially when the cursor is
> near elipses...
>   - check that the agenda is built properly.  What's the lisp code for getting
> the agenda as a string?
>   - check that the exported files are correct.  Maybe the right suggestion is to
> run the export on two different files, so the test  can focus on the 'diff'
> between them.  That way different people who  run the same test on different
> hosts can get the same result.


Please, if you find time, add the rest somewhere there?
If not, I'll take a closer look tonight and check in what's interesting
(which seems to be all of it, actually).


http://www.emacswiki.org/emacs-fr/UnitTesting:

Does this mean to add code to Org's *.el files? This would mean a lot of
work for Carsten :-( OK, once done... 

But:
sh> grep -r defun lisp/ | wc -l
1290

Checking in/out of every function makes 2580 places to check. I can't
estimate the effort, actually, because I never did Unit testing. I guess
this number much higher than needed?

Could anyone with testing expierience estimate?



While I think automated tests are a great thing to do and I'm happy to
see this reaction on the list :-), I still think we should also provide
the 'simple' tests without additional dependencies (when will package
management make it into emacs...). And I'd like to keep the effort and
impact for Carsten as small as possible. He will have to check each and
every patch because of feeling, and actually being, responsible for the
code.

Another question: will the code compile in emacs without the testing
framework installed? Probably yes.

Should we try to think of those 'simple test packages' as the more
_DATA_ part of other tests? This would mean one could code an automated
test without the need to create data too, since we have the data
seperated. Again, I'd like to keep the hurdles low for everyone
involved. When automated testing turns out to be a foolish easy and rock
solid, this could change.


* Three basic approaches:

  1 Simple data and setup packages.
  2 Code, that executes org commands and test for correct output,
    no changes in Org's code needed.
  3 Test framework with changes to Org's code.

I'd promote a combination from 1 and 2, and see, how far it goes.




DATA
  +--- d1
  +--- d2
  +--- d3

TESTS
  +---t-a
  +---t-b
  +---t-c

Now one would run test t-a over d1, d2, d3.
Still a programmer could use d1 to fix a bug in d1 and finally push the
fix for automated testing against d2 and d3.


bug X
tester verifies (is ist bug? how to reproduce...)
tester adds X to dX (message -> list or programmer)
programmer installs dX
programmer fixes bugX
programmer push   (message -> list or tester)
tester tests against d1, d2, d3

where tester = [human|machine] preferable human (simplicity)


Should we track the dependencies between code and tests?

Suppose one has worked on a.el.
Shure more than one test has to run.
Example: org-publish.el contains code common to LaTeX-export,
HTML-export... 



Regards,

-- 
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover

Tel.:  +49 (0)511 - 36 58 472
Fax:   +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
Http:  www.emma-stil.de

  reply	other threads:[~2008-10-23 16:24 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-23 12:04 How you can help Ben Alexander
2008-10-23 13:43 ` Bernt Hansen
2008-10-23 15:04   ` Sebastian Rose
2008-10-23 15:49     ` Richard Riley
2008-10-23 16:22       ` Ben Alexander
2008-10-23 17:02       ` Sebastian Rose
2008-10-24 12:13         ` Richard Riley
2008-10-24 15:39           ` Sebastian Rose
2008-10-24 16:27           ` Manish
2008-10-24 18:41             ` Avdi Grimm
2008-10-23 19:13       ` Avdi Grimm
2008-10-24 12:19         ` Richard Riley
2008-10-23 16:19     ` Bernt Hansen
2008-10-24  5:05       ` Carsten Dominik
2008-10-23 17:01   ` Jason F. McBrayer
2008-10-23 23:46     ` Eric Schulte
2008-10-23 14:20 ` Sebastian Rose
2008-10-23 14:50   ` Manish
2008-10-23 15:46     ` Eric Schulte
2008-10-23 16:18       ` Avdi Grimm
2008-10-23 14:55   ` Ben Alexander
2008-10-23 16:26     ` Sebastian Rose [this message]
2008-10-23 16:42       ` Avdi Grimm
2008-10-23 17:33         ` Sebastian Rose
2008-10-23 19:10           ` Avdi Grimm
2008-10-24 21:09           ` Tom Breton (Tehom)
2008-10-24 18:33         ` Ben Alexander
2008-10-24 18:44           ` Avdi Grimm
2008-10-24 19:02             ` Jeff Mickey
2008-10-26 19:49             ` org-cycle broken when cursor is at ellipses Ben Alexander
2008-10-26 21:31               ` Cameron Horsburgh
2008-10-27  8:47                 ` Carsten Dominik
2008-10-27  8:47               ` Carsten Dominik
     [not found]       ` <D43ED86C-EFD4-4BA8-8528-4F82DB11D625@alexanderonline.org>
2008-10-23 17:12         ` How you can help Sebastian Rose
2008-10-23 15:08 ` Sebastian Rose
     [not found] <E1Kt27M-0008Tx-0J@box188.bluehost.com>
2008-10-23 16:11 ` Robert Goldman
  -- strict thread matches above, loose matches on Subject: below --
2008-10-23  7:35 Carsten Dominik
2008-10-23  8:12 ` Manish
2008-10-23  9:24 ` Sebastian Rose
2008-10-23 10:28   ` Sebastian Rose
2008-10-23 15:23 ` Russell Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r6679t1t.fsf@kassiopeya.MSHEIMNETZ \
    --to=sebastian_rose@gmx.de \
    --cc=bva@alexanderonline.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).