Bonjour,
voici les requêtes concernant une campagne avec itération d'une part et avec "test suite" d'autres part. Il faut juste remplacer les variables i[i]dCampagne, idIteration, idTestSuite [/i]par les bonnes valeurs.
Sinon je vous transmets en pièce jointe, l'export réalisé en PHP.
Il suffit d'appeler le dossier export_squash dans la page d'accueil de squash via un lien contenant la bonne url sur la page de connexion ou d'accueil.
Il faut pour cela installer php et un serveur apache ou WAMP
le fichier en pièce jointe [b]export_squash.zip[/b] à décompresser dans le répertoire www de wamp ou dans le répertoire [b]htdocs [/b]de apache.
Cet export permet d'exporter une campagne de test au format HTML ou Excel
[u][b]les requêtes (fonctionnent sur une base MySQL)[/b][/u]
[u]avec itération[/u]
(SELECT p.name, cln.name, i.name, tcln.name 'nom', tcln.description 'description', tcs.step_order 'cas', ats.action, ats.expected_result, ats.test_step_id, itpl.item_test_plan_order 'ordre'
[pre] FROM test_case_steps tcs[/pre]
[pre] INNER JOIN action_test_step ats ON tcs.step_id = ats.test_step_id[/pre]
[pre] INNER JOIN test_case_library_node tcln ON tcln.tcln_id = tcs.test_case_id[/pre]
[pre] INNER JOIN project p ON p.project_id = tcln.project_id[/pre]
[pre] INNER JOIN campaign_library_node cln ON cln.project_id = p.project_id[/pre]
[pre] INNER JOIN iteration_test_plan_item itpi ON itpi.tcln_id = tcln.tcln_id[/pre]
[pre] INNER JOIN item_test_plan_list itpl ON itpl.item_test_plan_id = itpi.item_test_plan_id[/pre]
[pre] INNER JOIN iteration i ON i.iteration_id = itpl.iteration_id[/pre]
[pre] INNER JOIN campaign c ON c.cln_id = cln.cln_id[/pre]
[pre] INNER JOIN campaign_iteration ci ON ci.campaign_id = c.cln_id[/pre]
[pre] WHERE i.iteration_id=".$idIteration." and cln.cln_id =".$idCampagne."[/pre]
[pre] group by ats.test_step_id) [/pre]
[pre] UNION[/pre]
[pre] (SELECT p.name, cln.name, i.name, CONCAT_WS('>',tcln.name,tcln2.name) 'nom', tcln.description, CONCAT_WS('_',tcs.step_order,tcs2.step_order) 'cas', ats.action, ats.expected_result, ats.test_step_id,itpl.item_test_plan_order 'ordre'[/pre]
[pre] FROM test_case_steps tcs[/pre]
[pre] INNER JOIN call_test_step cts ON cts.test_step_id=tcs.step_id -- jointure sur l'étape[/pre]
[pre] INNER JOIN test_case_steps tcs2 ON tcs2.test_case_id=cts.called_test_case_id [/pre]
[pre] INNER JOIN action_test_step ats ON ats.test_step_id=tcs2.step_id[/pre]
[pre] INNER JOIN test_case_library_node tcln ON tcln.tcln_id = tcs.test_case_id -- père[/pre]
[pre] INNER JOIN test_case_library_node tcln2 ON tcln2.tcln_id = tcs2.test_case_id -- fils[/pre]
[pre] INNER JOIN project p ON p.project_id = tcln.project_id[/pre]
[pre] INNER JOIN campaign_library_node cln ON cln.project_id = p.project_id[/pre]
[pre] INNER JOIN iteration_test_plan_item itpi ON itpi.tcln_id = tcln.tcln_id[/pre]
[pre] INNER JOIN item_test_plan_list itpl ON itpl.item_test_plan_id = itpi.item_test_plan_id[/pre]
[pre] INNER JOIN iteration i ON i.iteration_id = itpl.iteration_id[/pre]
[pre] INNER JOIN campaign c ON c.cln_id = cln.cln_id[/pre]
[pre] INNER JOIN campaign_iteration ci ON ci.campaign_id = c.cln_id[/pre]
[pre] WHERE i.iteration_id=".$idIteration." and cln.cln_id =".$idCampagne."[/pre]
[pre] GROUP BY ats.test_step_id)[/pre]
[pre] ORDER BY ordre asc, cas asc[/pre]
[u]avec "test suite"[/u]
[pre]SELECT p.name, cln.name, i.name, ts.name 'test suite', tcln.name 'nom', cln.description 'description', tcs.step_order 'cas', ats.action, ats.expected_result, ats.test_step_id, itpl.item_test_plan_order 'ordre'[/pre]
[pre] FROM test_case_steps tcs[/pre]
[pre] INNER JOIN action_test_step ats ON tcs.step_id = ats.test_step_id[/pre]
[pre] INNER JOIN test_case_library_node tcln ON tcln.tcln_id = tcs.test_case_id[/pre]
[pre] INNER JOIN project p ON p.project_id = tcln.project_id[/pre]
[pre] INNER JOIN campaign_library_node cln ON cln.project_id = p.project_id[/pre]
[pre] INNER JOIN iteration_test_plan_item itpi ON itpi.tcln_id = tcln.tcln_id[/pre]
[pre] INNER JOIN item_test_plan_list itpl ON itpl.item_test_plan_id = itpi.item_test_plan_id[/pre]
[pre] INNER JOIN iteration i ON i.iteration_id = itpl.iteration_id[/pre]
[pre] INNER JOIN campaign c ON c.cln_id = cln.cln_id[/pre]
[pre] INNER JOIN campaign_iteration ci ON ci.campaign_id = c.cln_id[/pre]
[pre] INNER JOIN test_suite ts ON ts.id=itpi.test_suite[/pre]
[pre] WHERE i.iteration_id=".$idIteration. " and cln.cln_id =".$idCampagne." and itpi.test_suite=".$idTestSuite."[/pre]
[pre] group by ats.test_step_id) [/pre]
[pre] UNION[/pre]
[pre] (SELECT p.name, cln.name, i.name, ts.name 'test suite', CONCAT_WS('>',tcln.name,tcln2.name) 'nom', tcln.description, CONCAT_WS('_',tcs.step_order,tcs2.step_order) 'cas', ats.action, ats.expected_result, ats.test_step_id,itpl.item_test_plan_order 'ordre'[/pre]
[pre] FROM test_case_steps tcs[/pre]
[pre] INNER JOIN call_test_step cts ON cts.test_step_id=tcs.step_id -- jointure sur l'étape (cas des so[url=
http://www.squashtest.org/index.php/sup ... mode-reply#] Sauvegarder [/url]us test)[/pre]
[pre] INNER JOIN test_case_steps tcs2 ON tcs2.test_case_id=cts.called_test_case_id [/pre]
[pre] INNER JOIN action_test_step ats ON ats.test_step_id=tcs2.step_id[/pre]
[pre] INNER JOIN test_case_library_node tcln ON tcln.tcln_id = tcs.test_case_id -- père[/pre]
[pre] INNER JOIN test_case_library_node tcln2 ON tcln.tcln_id = tcs2.test_case_id -- fils[/pre]
[pre] INNER JOIN project p ON p.project_id = tcln.project_id[/pre]
[pre] INNER JOIN campaign_library_node cln ON cln.project_id = p.project_id[/pre]
[pre] INNER JOIN iteration_test_plan_item itpi ON itpi.tcln_id = tcln.tcln_id[/pre]
[pre] INNER JOIN item_test_plan_list itpl ON itpl.item_test_plan_id = itpi.item_test_plan_id[/pre]
[pre] INNER JOIN iteration i ON i.iteration_id = itpl.iteration_id[/pre]
[pre] INNER JOIN campaign c ON c.cln_id = cln.cln_id[/pre]
[pre] INNER JOIN campaign_iteration ci ON ci.campaign_id = c.cln_id[/pre]
[pre] INNER JOIN test_suite ts ON ts.id=itpi.test_suite[/pre]
[pre] WHERE i.iteration_id=".$idIteration. " and cln.cln_id =".$idCampagne." and itpi.test_suite= ".$idTestSuite."[/pre]
[pre] group by ats.test_step_id)[/pre]
[pre] ORDER BY ordre asc, cas asc"[/pre]