Projektvorstellung VoiceXML Test Framework
-
Upload
raphael-groner -
Category
Technology
-
view
575 -
download
1
description
Transcript of Projektvorstellung VoiceXML Test Framework
Raphael Groner 1 / 13
VoiceXML Test-FrameworkVoiceXML Test-Framework
Unit Testing vonsprachbasierten Applikationen
Projektvorstellung
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
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
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
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)
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
Raphael Groner 7 / 13
Anforderungsanalyse
Raphael Groner 8 / 13
Prototyp (Grobkonzept)
Raphael Groner 9 / 13
Automat
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>
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."); }
Raphael Groner 12 / 13
Geplante Erweiterungen
● Synchroner Durchlauf● Cucumber für BDD● Hamcrest für Pattern, XPath● Checkstyle● Simulation anderer Engines