This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
#===================================================================== | |
# Selects an android device | |
# Copyright (C) 2012-2022 Diego Torres Milano. All rights reserved. | |
# | |
# The simplest way to invoke this script is creating a function like | |
# this one in your shell startup file: | |
# | |
# ``` | |
# adb () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/opt/jenkins/jenkins-cli install-plugin \ | |
analysis-core \ | |
android-emulator \ | |
android-lint \ | |
ant \ | |
credentials \ | |
cvs \ | |
emmacoveragecolumn \ | |
emma \ | |
external-monitor-job \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect -f | |
# | |
# This Expect script was generated by autoexpect on Wed Jun 29 12:07:46 2016 | |
# Expect and autoexpect were both written by Don Libes, NIST. | |
# | |
# Note that autoexpect does not guarantee a working script. It | |
# necessarily has to guess about certain things. Two reasons a script | |
# might fail are: | |
# | |
# 1) timing - A surprising number of programs (rn, ksh, zsh, telnet, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
import sys | |
import os | |
try: | |
sys.path.insert(0, os.path.join(os.environ['ANDROID_VIEW_CLIENT_HOME'], 'src')) | |
except: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Lex Bot Tester | |
Copyright (C) 2017 Diego Torres Milano | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_conversations_text_book_car(self): | |
bot_name = 'BookTrip' | |
bot_alias = 'BookTripLatest' | |
user_id = 'ClientId' | |
conversation_definition = { | |
'BookCar': [ | |
('reserve a car', DialogState.ELICIT_SLOT, {}), | |
('L.A.', DialogState.ELICIT_SLOT, {}), | |
('next week', DialogState.ELICIT_SLOT, {'PickUpDate': RE_WEEK}), | |
('a month from now', DialogState.ELICIT_SLOT, {'ReturnDate': RE_DATE}), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AlexaSkillManagementClientTests(AlexaSkillTest): | |
def test_book_my_trip_reserve_a_car(self): | |
skill_name = 'BookMyTripSkill' | |
intent = 'BookCar' | |
conversation = [ | |
{'slot': None, 'text': 'ask book my trip to reserve a car'}, | |
{'slot': 'CarType', 'text': 'midsize'}, | |
{'slot': 'PickUpCity', 'text': 'buenos aires'}, | |
{'slot': 'PickUpDate', 'text': 'tomorrow'}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def __plot_dumpsys_meminfo(self, pkg, activity, method=None): | |
self.device.shell("am force-stop %s" % pkg) | |
for n in range(20): | |
if n % 5 == 0: | |
self.device.shell( | |
"run-as %s pgrep -L 10 %s" % (pkg, pkg)) | |
self.device.startActivity("%s/%s" % (pkg, activity)) | |
time.sleep(2) | |
if method: | |
method() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AlexaSkillManagementClientTests(AlexaSkillTest): | |
def test_crypto_get_price(self): | |
skill_name = 'CryptoSkill' | |
intent = 'GetPrice' | |
coin = 'Bitcoin' | |
conversation = [ | |
{'slot': None, 'text': 'ask Crypto what is the {} price?'.format(coin)}, | |
] | |
simulation_result = self.conversation_text(skill_name, intent, conversation, verbose=verbose) | |
self.assertRegex( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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): |
OlderNewer