Ticket #9007 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

I can not import test cases

Reported by: christopher.paredes@lazos.cl Assigned to: seccanj
Priority: highest Component: TestManagerForTracPlugin
Severity: normal Keywords:
Cc: andres.kaiser@lazos.cl 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

06.png (134.0 kB) - added by christopher.paredes@lazos.cl on 07/21/11 05:34:09.
datos.csv (4.3 kB) - added by christopher.paredes@lazos.cl on 07/21/11 05:34:40.
api.py (26.3 kB) - added by seccanj on 08/07/11 13:10:21.
Modified api.py
modified_datos.csv (4.3 kB) - added by seccanj on 08/07/11 13:11:09.
Modified datos.csv

Change History

07/21/11 05:34:09 changed by christopher.paredes@lazos.cl

  • attachment 06.png added.

07/21/11 05:34:40 changed by christopher.paredes@lazos.cl

  • attachment datos.csv added.

07/21/11 05:35:06 changed by anonymous

  • cc set to andres.kaiser@lazos.cl.

07/21/11 05:39:26 changed by anonymous

  • release changed from 0.11 to 0.12.

08/07/11 13:09:53 changed 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

08/07/11 13:10:21 changed by seccanj

  • attachment api.py added.

Modified api.py

08/07/11 13:11:09 changed by seccanj

  • attachment modified_datos.csv added.

Modified datos.csv

08/12/11 16:15:23 changed by christopher.paredes@lazos.cl

Hello Roberto,

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

08/12/11 16:21:33 changed 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

08/13/11 21:11:26 changed by seccanj

  • status changed from assigned to closed.
  • resolution set to fixed.

Add/Change #9007 (I can not import test cases)




Change Properties
Action