Projektvorstellung VoiceXML Test Framework

13
Raphael Groner 1 / 13 VoiceXML Test-Framework VoiceXML Test-Framework Unit Testing von sprachbasierten Applikationen Projektvorstellung

description

Testgetriebene Entwicklung von sprachbasierten Applikationen mit XML und Java

Transcript of Projektvorstellung VoiceXML Test Framework

Page 1: Projektvorstellung VoiceXML Test Framework

Raphael Groner 1 / 13

VoiceXML Test-FrameworkVoiceXML Test-Framework

Unit Testing vonsprachbasierten Applikationen

Projektvorstellung

Page 2: Projektvorstellung VoiceXML Test Framework

Raphael Groner 2 / 13

Unit Testing

● Elementarer Bestandteil von TDD und BDD● Wichtig für Extreme Programming und Scrum● Standards und Normen, ISTQB®● Komponententest (Entwickler)● Integrationstest (Neue Idee!)● JUnit → Assert… Methoden

Page 3: Projektvorstellung VoiceXML Test Framework

Raphael Groner 3 / 13

VoiceXML

● Wozu? → Kommunikationstheorie– Natürliche Sprache– Interaktion Mensch – Maschine (per Sprache!)

● Eigener W3C Standard, basiert auf XML– Version 2.1 ist aktuell– Version 3.0 als Entwurf

● Deployment wie HTML● Editoren, Generatoren

Page 4: Projektvorstellung VoiceXML Test Framework

Raphael Groner 4 / 13

Einsatzgebiete

● Logistik: „Pick by Voice“– Kommissionieren von Waren und Inventur im Lager

– Sprachgesteuerte Weisung von Arbeitskräften

– Kontrollen durch z.B. Abfrage von Prüfkennungen

● Auskunft per Telefon und Ansagen– Fahrplan (z.B. Deutsche Bahn), Börse, Wetter, …

– Call Center: Häufig auftretende Prozesse (FAQ)

– Verkehrsleitung bei Navigationsgeräten

Page 5: Projektvorstellung VoiceXML Test Framework

Raphael Groner 5 / 13

Frameworks

● Voxeo Phono (Javascript), Prophecy IVR Platform

● OpenVXI (C): BladeWareVXML, publicVoiceXML

● Voice-unit (Java, JUnit)

● JWebUnit, HtmlUnit, HttpUnit (web unit tests)

● Voice Prover, PAGI, Empirix Hammer (Last/Penetration)

● SoftRobot (Systemtest)

Page 6: Projektvorstellung VoiceXML Test Framework

Raphael Groner 6 / 13

VoiceXML + Java = JVoiceXML

● Verschiedene Implementierungen:– Spracherkennung und -ausgabe, Gestiken

– JSAPI, JTAPI, Marc, Mary, Red5, Kinect, …

● Textschnittstelle (interface TextListener)Methode Nachricht

started() Server gestartet

connected(InetSocketAddress) Verbindung hergestellt

outputSsml(SsmlDocument) Ausgabe (Parameterwert) empfangen

expectingInput() Bereit für eine Eingabe

inputClosed() Wartezeit für Eingabe überschritten

disconnected() Verbindung beendet

Page 7: Projektvorstellung VoiceXML Test Framework

Raphael Groner 7 / 13

Anforderungsanalyse

Page 8: Projektvorstellung VoiceXML Test Framework

Raphael Groner 8 / 13

Prototyp (Grobkonzept)

Page 9: Projektvorstellung VoiceXML Test Framework

Raphael Groner 9 / 13

Automat

Page 10: Projektvorstellung VoiceXML Test Framework

Raphael Groner 10 / 13

Beispiel - VoiceXML

<?xml version="1.0" encoding="UTF-8"?><vxml xmlns="http://www.w3.org/2001/vxml" version="2.1"><form> <field name="answer"> <grammar src="yesno.srgs" type="application/srgs+xml"/> <prompt>Do you like this example?</prompt> <filled> <if cond="answer=='yes'"> You like this example. <else/> You do not like this example. </if> </filled> </field></form></vxml>

Page 11: Projektvorstellung VoiceXML Test Framework

Raphael Groner 11 / 13

Beispiel - TestCase @Test public void testInputYes() { createConversation("yes"); supervisor.process(); } @Test public void testInputNoFail() { createConversation("no"); boolean failed = false; try { supervisor.process(); } catch (AssertionFailedError e) { failed = true; } Assert.assertEquals(true,failed); } private void createConversation(String answer) { Conversation conversation = supervisor.init(call); conversation.addOutput("Do you like this example?"); conversation.addInput(answer); conversation.addOutput("You like this example."); }

Page 12: Projektvorstellung VoiceXML Test Framework

Raphael Groner 12 / 13

Geplante Erweiterungen

● Synchroner Durchlauf● Cucumber für BDD● Hamcrest für Pattern, XPath● Checkstyle● Simulation anderer Engines

Page 13: Projektvorstellung VoiceXML Test Framework

Raphael Groner 13 / 13

Danke!

Fragen?Fragen?http://www.jvoicexml.org

[email protected]