Modify

Opened 3 years ago

Closed 3 years ago

#9007 closed defect (fixed)

I can not import test cases

Reported by: christopher.paredes@… Owned by: seccanj
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@… 3 years ago.
datos.csv (4.3 KB) - added by christopher.paredes@… 3 years ago.
api.py (26.3 KB) - added by seccanj 3 years ago.
Modified api.py
modified_datos.csv (4.3 KB) - added by seccanj 3 years ago.
Modified datos.csv

Download all attachments as: .zip

Change History (10)

Changed 3 years ago by christopher.paredes@…

Changed 3 years ago by christopher.paredes@…

comment:1 Changed 3 years ago by anonymous

  • Cc andres.kaiser@… added; anonymous removed

comment:2 Changed 3 years ago by anonymous

  • Trac Release changed from 0.11 to 0.12

comment:3 Changed 3 years ago by seccanj

  • Status changed from new to assigned

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 3 years ago by seccanj

Modified api.py

Changed 3 years ago by seccanj

Modified datos.csv

comment:4 Changed 3 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 3 years ago by seccanj

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 3 years ago by seccanj

  • Resolution set to fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Action
as closed The owner will remain seccanj.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.