Modify

Opened 13 years ago

Closed 13 years ago

#9007 closed defect (fixed)

I can not import test cases

Reported by: christopher.paredes@… Owned by: Roberto Longobardi
Priority: highest Component: TestManagerForTracPlugin
Severity: normal Keywords:
Cc: andres.kaiser@… Trac Release: 0.12

Description

I can not import test cases

I get the following error:

File "build/bdist.linux-x86_64/egg/testmanager/api.py", line 617, 
in _process_imported_testcase_row\n new_tc.insert()\n', '
File "build/bdist.linux-x86_64/egg/tracgenericclass/model.py", line 481,
 in insert\n if not self.pre_insert(db):\n', 
' File "build/bdist.linux-x86_64/egg/testmanager/model.py", line 86, 
in pre_insert\n AbstractWikiPageWrapper.pre_insert(self, db)\n', ' 
File "build/bdist.linux-x86_64/egg/tracgenericclass/model.py", line 934, 
in pre_insert\n wikipage.save(self.author, \'\', self.remote_addr)\n', '
File "/usr/lib/python2.6/site-packages/trac/wiki/model.py", line 126, 
in save\n @self.env.with_transaction(db)\n']

attached more information

Attachments (4)

06.png (134.0 KB) - added by christopher.paredes@… 13 years ago.
datos.csv (4.3 KB) - added by christopher.paredes@… 13 years ago.
api.py (26.3 KB) - added by Roberto Longobardi 13 years ago.
Modified api.py
modified_datos.csv (4.3 KB) - added by Roberto Longobardi 13 years ago.
Modified datos.csv

Download all attachments as: .zip

Change History (10)

Changed 13 years ago by christopher.paredes@…

Attachment: 06.png added

Changed 13 years ago by christopher.paredes@…

Attachment: datos.csv added

comment:1 Changed 13 years ago by anonymous

Cc: andres.kaiser@… added; anonymous removed

comment:2 Changed 13 years ago by anonymous

Trac Release: 0.110.12

comment:3 Changed 13 years ago by Roberto Longobardi

Status: newassigned

Hi Christopher, I'm back from holidays :D

I think I found the problem here. There are a few:

  1. the Python CSV importing functions do not support utf-8 encoded characters, which you have in your CSV file. This means I had to modify the plugin code to provide this support.
  2. You used single quotes (') in your CSV to enclose the test case titles and description => You must use double quotes ("), instead.
  3. You have more double quotes in your test case descriptions that now go in conflict with the double quotes used to enclose the descriptions.

All problems are fixed: 1) Use the modified version of "testman4trac/trunk/testmanager/api.py" that you can find in attachment to this ticket. Build the plugin and replace the egg files. 2) and 3) See as an example the modified_datos.csv attached to this ticket, and make sure you use this format for your CSV.

Let me know if this works.

Ciao, Roberto

Changed 13 years ago by Roberto Longobardi

Attachment: api.py added

Modified api.py

Changed 13 years ago by Roberto Longobardi

Attachment: modified_datos.csv added

Modified datos.csv

comment:4 Changed 13 years ago by christopher.paredes@…

Hello Roberto,

It worked perfectly the solution that you sent us. 1300 Load test cases using csv:) Thanks!

comment:5 Changed 13 years ago by Roberto Longobardi

Glad to be helpful :D

Also feel free to open enhancement requests if you have some nice idea for this plugin development.

Ciao, Roberto

comment:6 Changed 13 years ago by Roberto Longobardi

Resolution: fixed
Status: assignedclosed

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.