lex-bot-tester का समर्थन करता है का उपयोग कर एक रूपरेखा और उपकरण संवादी परीक्षण अमेज़न एलेक्सा और लेक्स के लिए तैयार करना है।
कौशल के एक अनुरूपित संस्करण का उपयोग करने के बजाय यह एलेक्सा से निपटने के लिए मौजूदा SMAPI का उपयोग करता है।
परीक्षण urutu
नामक टूल द्वारा मैन्युअल रूप से या स्वचालित रूप से जेनरेट किए जा सकते हैं। अभी, कोड जनरेशन python
है लेकिन कौशल कार्यान्वयन किसी भी समर्थित भाषा में हो सकता है।
आप कमांड लाइन से कौशल के साथ बातचीत, बातचीत परिभाषित करने के बाद, तैयार किए गए कोड इस
#! /usr/bin/env python
import sys
import unittest
from lex_bot_tester.aws.alexa.alexaskilltest import AlexaSkillTest
verbose = True
class GeneratedTests(AlexaSkillTest):
def test_book_my_trip_reserve_car(self):
"""
Test generated by urutu on 2018-02-21 01:24:51
"""
skill_name = 'BookMyTripSkill'
intent = 'BookCar'
conversation = [{'slot': None, 'text': 'ask book my trip to reserve a car', 'prompt': None},
{'slot': 'CarType', 'text': 'midsize',
'prompt': 'What type of car would you like to rent, Our most popular options are economy, midsize, and luxury'},
{'slot': 'PickUpCity', 'text': 'vancouver',
'prompt': 'In what city do you need to rent a car?'},
{'slot': 'PickUpDate', 'text': 'tomorrow',
'prompt': 'What day do you want to start your rental?'},
{'slot': 'ReturnDate', 'text': 'next week',
'prompt': 'What day do you want to return the car?'},
{'slot': 'DriverAge', 'text': '25', 'prompt': 'How old is the driver for this rental?'}]
simulation_result = self.conversation_text(skill_name, intent, conversation, verbose=verbose)
self.assertSimulationResultIsCorrect(simulation_result, verbose=verbose)
if __name__ == '__main__':
unittest.main()
तरह लग रहा है, इसकी विस्तृत व्याख्या और Testing Alexa Skills — Autogenerated tests पर कुछ वीडियो नहीं है।
स्रोत
2018-02-22 17:13:12