Modify

Opened 12 years ago

Closed 12 years ago

#10071 closed defect (invalid)

Do not use apostrophes in test case names

Reported by: pwg831@… Owned by: Roberto Longobardi
Priority: normal Component: TestManagerForTracPlugin
Severity: major Keywords:
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

I happened to put an apostrophe into the name of a test case page and later tried to rename that page. The rename operation had the resulted in an Internal Error:

TypeError: coercing to Unicode: need string or buffer, NoneType found

... and all subsequent access to test catalogs and test cases failed with another Internal error.

The cure is to delete the wiki page and the testcase from the database (table wiki and table testcase.

I've put severity at major - it is unhealthy to people with high blood pressure if it happens in a large set of test cases.

Regards Theodor

PS. TestManager: Really nice work!


TestManager 1.4.10, Python 2.6, RHEL

Python Traceback Most recent call last:

File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 514, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 261, in dispatch
  content_type)
File "/usr/lib/python2.6/site-packages/trac/web/chrome.py", line 843, in render_template
  stream |= self._filter_stream(req, method, filename, stream, data)
File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 132, in __or__
  return Stream(_ensure(function(self)), serializer=self.serializer)
File "/usr/lib/python2.6/site-packages/trac/web/chrome.py", line 994, in inner
  data)
File "build/bdist.linux-x86_64/egg/testmanager/wiki.py", line 124, in filter_stream
  return self._testcase_wiki_view(req, formatter, planid, page_name, stream)
File "build/bdist.linux-x86_64/egg/testmanager/wiki.py", line 374, in _testcase_wiki_view
  tag.input(type='button', value=_("Open a Ticket on this Test Case"), onclick='creaTicket("'+tc_name+'", "", "", "'+summary+'")'),

Attachments (0)

Change History (3)

comment:1 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 12 years ago by Roberto Longobardi

LOL!

OK, I'll take a look at this asap.

Ciao, Roberto

comment:3 Changed 12 years ago by Roberto Longobardi

Resolution: invalid
Status: newclosed

Hi Theodor, I have found some time to work on this problem.

Actually what you are trying to do, i.e. renaming a wiki page that is a test case, catalog or plan, should not be done. This because the page name is carefully crafted by the test manager for its own purposes, and is referenced in parts you may not even imagine ;-)

You should use the "move" test manager functions to move test cases around instead.

If you were trying to change the test case TITLE, instead, this can be easily done by editing the page and changing the text between == and ==.

I'm going to add an exception to be raised when someone tries to rename pages the way you did, prenventing the renaming operatio to occur, and with a meaningful message.

BTW, the problem you encountered was not related to the apostrophe in any way :D

Thanks for your interest in this plkugin and for your help.

Ciao, Roberto

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Roberto Longobardi.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.