Ho lavorato con un archivio di documenti utilizzando XQuery (tramite Java e interfacce NET) e chiedevo se qualcuno ha tutte le raccomandazioni per i moduli di test di unità XQuery?Unit Testing XQuery
risposta
Ecco una soluzione rapida di tipo fai-da-te per questo problema:
Poor man's unit testing with XQuery
(collegamento morto).
Questo approccio sembra essere stato abbracciato ed esteso per le prove del progetto xprocxq. Esistono
altri strumenti, ad esempio XTC.
Questo collegamento può sviluppare il tuo sviluppo. Questa è solo un'idea ma puoi svilupparla e migliorarla di più con varie idee di progettazione di casi di test unitari.
dato che Xml è un re nel mondo dei metadati, è abbastanza facile da progettare e gestire.
disegno un Xml test-case da avere tutti i dettagli catturare
- test-dati (ingresso & risultato atteso)
- test-case id
- test-case metodi locali
invocano dinamicamente in base ai dettagli.
Prova XQSuite
E 'piuttosto liscia; ecco la "esempio minimal":
declare namespace test="http://exist-db.org/xquery/xqsuite";
declare function %test:assertEquals("Hello world") local:hello() { "Hello world" };
Inoltre, XSpec funziona a meraviglia per i test XSLT (i risultati dei test HTML fornisce ben formattato, per esempio), ma sembra avere bisogno di un po 'di lavoro con XQuery test. Il progetto sembra essere diventato inattivo negli ultimi anni.
Ci sono diversi framework di unit test XQuery, ma la maggior parte sono un fine particolare scritto per una specifica processore XQuery.Questo non è un elenco completo, ma comprende la maggior parte dei più popolari sono a conoscenza di:
Mark Logic
Roxy Unità Tester https://github.com/marklogic/roxy/wiki/Unit-Testing
XQUT https://github.com/mblakele/xqut
raggi X https://github.com/robwhitby/xray
eXist
XQSuite http://exist-db.org/exist/apps/doc/xqsuite.xml
BaseX
XQuery Modulo Unità http://docs.basex.org/wiki/Unit_Module
- 1. Unit Testing ViewController's Lifecycle
- 2. PHP Unit testing
- 3. Unit Testing MVC Controllers
- 4. Unit Testing e PostSharp
- 5. Unit Testing Embedded Software
- 6. Unit Testing pattern
- 7. Unit Testing Shiny Apps
- 8. Unit Testing EJB
- 9. Unit Testing costruttore iniezione
- 10. SingleResult e unit testing
- 11. ASP.NET MVC Unit Testing - Sessioni
- 12. Unit Testing Interfaces in Python
- 13. Problema Unit Testing in VB.NET
- 14. Unit-testing and boost :: asio
- 15. AngularJS unit testing con ReSharper
- 16. Test Driven Development, Unit Testing
- 17. Unit Testing iPhone Codice che utilizza NSLocalizedString
- 18. unit testing Url.Action (usando Rhino Mocks?)
- 19. Unit subflows nested testing (subflows of subflows)
- 20. Stampa Jersey JSON in Unit Testing
- 21. ASP.NET MVC, RavenDb e Unit Testing
- 22. Unit Testing con NSURLSession per OCMock
- 23. Unit Testing Ember Servizi che prelevano dati
- 24. Cosa unit testing in PHP per iniziare
- 25. Django unit testing per modulo di modifica
- 26. nodo js Unit Testing: beffardo richiede dipendenza
- 27. Unit testing con un file di input
- 28. C++ e Dependency Injection in unit testing
- 29. DotNetNuke Unit Testing Facilities and Tutorials
- 30. Unit Testing e di codificazione design
Blog è andato, collegamento viene interrotto – mbrevoort
hanno aggiornato risposta a riflettere questo –