Opened 10 years ago

Last modified 3 years ago

#10396 new task

Set up a functional test suite

Reported by: ejucovy Owned by: ejucovy
Priority: normal Component: TracBacksPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0


This plugin would benefit from a functional test suite; it should relatively easy to set up automated functional tests of its behavior, and the code involves several bits that address edge cases in fairly non-self-documenting ways. There are also a number of open feature requests and bug reports that involve fairly complex setups. Having a functional test suite would make the plugin more protected against regressions, more self-documenting, and easier to develop additional features and bugfixes against.

A basic functional test suite should include tests for:

  • the plugin's basic behavior when commenting on an existing ticket with another ticket's reference
  • and when creating a new ticket whose description references another ticket
  • and when editing an existing comment (#6535)
  • and that the behavior is not triggered when including an apparent ticket reference inside a code block (#6846)

crossed with conditions where:

  • the referenced ticket has a comment on it, and that comment is the latest change on the referenced ticket
  • and when referencing a ticket that has never been touched since creation, i.e. has no changelog entries (#9008)
  • and when referencing a ticket whose latest change is not a comment (#9743)

Not all permutations of the above are necessarily needed, but also probably wouldn't hurt; I think it's worth formally distinguishing between demonstrations of the plugin's expected behavior (the first group above) versus tests of the conditions under which the behavior should work as expected (the second group above)

Attachments (0)

Change History (3)

comment:1 Changed 10 years ago by Ryan J Ollos

Cc: Ryan J Ollos added; anonymous removed

comment:2 Changed 10 years ago by ejucovy

Quick correction on the above so I don't get confused again later --

and when editing an existing comment (#6535)

That actually isn't what #6535 is about; that ticket is about ensuring that the "referenced in ..." comments automatically created by TracBacksPlugin are themselves editable by users. That should also be verified in a test.

I believe that TracBacksPlugin is not active at all when editing an existing comment, nor when editing the ticket's description after it's been created. The only conditions under which it's active are a ticket reference in a new ticket's description, and a ticket reference in a new comment on a ticket. (There are open tickets about this I think.)

comment:3 Changed 3 years ago by Ryan J Ollos

Cc: Ryan J Ollos removed

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain ejucovy.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.