[common][mlsingleshot][TWDAPI-278 Add invokeAsync() API] 30/260730/1
authortangkaiyuan <kaiyuan.tang@samsung.com>
Thu, 1 Jul 2021 18:22:43 +0000 (02:22 +0800)
committertangkaiyuan <kaiyuan.tang@samsung.com>
Thu, 1 Jul 2021 18:22:52 +0000 (02:22 +0800)
Change-Id: I3c09107246a9023ab4b925487b78d162744294b1
Signed-off-by: tangkaiyuan <kaiyuan.tang@samsung.com>
16 files changed:
common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync.html [new file with mode: 0755]
common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_AbortError.html [new file with mode: 0755]
common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_errorCallback_TypeMismatch.html [new file with mode: 0755]
common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_errorCallback_invalid_cb.html [new file with mode: 0755]
common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_errorCallback_invoked.html [new file with mode: 0755]
common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_exist.html [new file with mode: 0755]
common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_inTensorsData_TypeMismatch.html [new file with mode: 0755]
common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_inTensorsData_misarg.html [new file with mode: 0755]
common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_misarg.html [new file with mode: 0755]
common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback.html [new file with mode: 0755]
common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback_TypeMismatch.html [new file with mode: 0755]
common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback_invalid_cb.html [new file with mode: 0755]
common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback_misarg.html [new file with mode: 0755]
common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_with_errorCallback.html [new file with mode: 0755]
common/tct-mlsingleshot-tizen-tests/tests.full.xml
common/tct-mlsingleshot-tizen-tests/tests.xml

diff --git a/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync.html b/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync.html
new file mode 100755 (executable)
index 0000000..319ea7e
--- /dev/null
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2021 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Chen Chen <chen89.chen@samsung.com>
+
+-->
+<html>
+<head>
+<title>SingleShot_invokeAsync</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/mlsinglecommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: SingleShot_invokeAsync
+//==== LABEL Check if SingleShot:invokeAsync method work properly
+//==== SPEC Tizen Web API:TBD:MLSingleShot:SingleShot:invokeAsync M
+//==== SPEC_URL TBD
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR MMINA
+
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}), model, tensorsInfo, tensorsData, retValue, successCallback;
+t.step(function () {
+    add_result_callback(function () {
+        try {
+            tensorsData.dispose();
+            tensorsInfo.dispose();
+            model.close();
+        } catch (err) {
+            // do nothing in case dispose throw an exception
+        }
+    });
+    successCallback = t.step_func(function (tensorsDataOut) {
+        console.log("invokeAsync() successCallback invoked");
+        tensorsDataOut.dispose();
+    });
+    model = tizen.ml.single.openModel(TENSORFLOW_LITE_MODEL_PATH);
+
+    tensorsInfo = new tizen.ml.TensorsInfo();
+    tensorsInfo.addTensorInfo("tensor", "UINT8", [3, 224, 224]);
+    tensorsData = tensorsInfo.getTensorsData();
+
+    retValue = model.invokeAsync(tensorsData, successCallback);
+    assert_type(retValue, "undefined", "Incorrect return type.");
+    t.done();
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_AbortError.html b/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_AbortError.html
new file mode 100755 (executable)
index 0000000..958fe0f
--- /dev/null
@@ -0,0 +1,67 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2021 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Chen Chen <chen89.chen@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>SingleShot_invokeAsync_AbortError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/mlsinglecommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: SingleShot_invokeAsync_AbortError\r
+//==== LABEL Check if SingleShot:invokeAsync throw AbortError if tensorsData invalid\r
+//==== SPEC Tizen Web API:TBD:MLSingleShot:SingleShot:invokeAsync M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), model, tensorsInfo, tensorsData, successCallback;\r
+t.step(function () {\r
+    add_result_callback(function () {\r
+        try {\r
+            tensorsData.dispose();\r
+            tensorsInfo.dispose();\r
+        } catch (err) {\r
+            // do nothing in case dispose throw an exception\r
+        }\r
+    });\r
+    successCallback = t.step_func(function (tensorsDataOut) {\r
+        tensorsDataOut.dispose();\r
+        assert_unreached("invokeAsync() successCallback invoked");\r
+    });\r
+    model = tizen.ml.single.openModel(TENSORFLOW_LITE_MODEL_PATH);\r
+    tensorsInfo = new tizen.ml.TensorsInfo();\r
+    tensorsInfo.addTensorInfo("tensor", "UINT8", [3, 224, 224]);\r
+    tensorsData = tensorsInfo.getTensorsData();\r
+    model.close();\r
+    assert_throws({name: 'AbortError'}, function () {\r
+        model.invokeAsync(tensorsData, successCallback);\r
+    }, "AbortError should be thrown.");\r
+    t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
diff --git a/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_errorCallback_TypeMismatch.html b/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_errorCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..8ca0bf4
--- /dev/null
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2021 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Chen Chen <chen89.chen@samsung.com>
+
+-->
+<html>
+<head>
+<title>SingleShot_invokeAsync_errorCallback_TypeMismatch</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/mlsinglecommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: SingleShot_invokeAsync_errorCallback_TypeMismatch
+//==== LABEL Check if SingleShot:invokeAsync with incorrect errorCallback type throws an exception
+//==== SPEC Tizen Web API:TBD:MLSingleShot:SingleShot:invokeAsync M
+//==== SPEC_URL TBD
+//==== PRIORITY P2
+//==== TEST_CRITERIA MC
+
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}), model, tensorsData, tensorsInfo, conversionTable, i, successCallback;
+t.step(function () {
+    add_result_callback(function () {
+        try {
+            tensorsData.dispose();
+            tensorsInfo.dispose();
+            model.close();
+        } catch (err) {
+            // do nothing in case dispose throw an exception
+        }
+    });
+    successCallback = t.step_func(function (tensorsDataOut) {
+        tensorsDataOut.dispose();
+        assert_unreached("invokeAsync() successCallback invoked");
+    });
+    model = tizen.ml.single.openModel(TENSORFLOW_LITE_MODEL_PATH);
+    tensorsInfo = new tizen.ml.TensorsInfo();
+    tensorsInfo.addTensorInfo("tensor", "UINT8", [3, 224, 224]);
+    tensorsData = tensorsInfo.getTensorsData();
+    conversionTable = getTypeConversionExceptions("functionObject", true);
+    for (i = 0; i < conversionTable.length; i++) {
+        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+            model.invokeAsync(tensorsData, successCallback, conversionTable[i][0]);
+        }, "Exception should be thrown - given incorrect errorCallback");
+    }
+    t.done();
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_errorCallback_invalid_cb.html b/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_errorCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..652efe5
--- /dev/null
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2021 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Chen Chen <chen89.chen@samsung.com>
+
+-->
+<html>
+<head>
+<title>SingleShot_invokeAsync_errorCallback_invalid_cb</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/mlsinglecommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: SingleShot_invokeAsync_errorCallback_invalid_cb
+//==== LABEL Check if SingleShot::invokeAsync() method throws exception when errorCallback is invalid
+//==== SPEC Tizen Web API:TBD:MLSingleShot:SingleShot:invokeAsync M
+//==== SPEC_URL TBD
+//==== PRIORITY P2
+//==== TEST_CRITERIA MTCB
+
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}), model, tensorsInfo, tensorsData, successCallback, invalidErrorCallback;
+t.step(function () {
+    add_result_callback(function () {
+        try {
+            tensorsData.dispose();
+            tensorsInfo.dispose();
+            model.close();
+        } catch (err) {
+            // do nothing in case dispose throw an exception
+        }
+    });
+    successCallback = t.step_func(function (tensorsDataOut) {
+        tensorsDataOut.dispose();
+        assert_unreached("invokeAsync() successCallback invoked");
+    });
+    invalidErrorCallback = {
+        errorCallback : t.step_func(function (error) {
+            assert_unreached("invokeAsync() errorCallback invoked");
+        })
+    };
+    model = tizen.ml.single.openModel(TENSORFLOW_LITE_MODEL_PATH);
+
+    tensorsInfo = new tizen.ml.TensorsInfo();
+    tensorsInfo.addTensorInfo("tensor", "UINT8", [3, 224, 224]);
+    tensorsData = tensorsInfo.getTensorsData();
+
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+        model.invokeAsync(tensorsData, successCallback, invalidErrorCallback);
+    }, "TypeMismatchError should be thrown - given incorrect errorCallback.");
+    t.done();
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_errorCallback_invoked.html b/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_errorCallback_invoked.html
new file mode 100755 (executable)
index 0000000..ff8f225
--- /dev/null
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2021 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Chen Chen <chen89.chen@samsung.com>
+
+-->
+<html>
+<head>
+<title>SingleShot_invokeAsync_errorCallback_invoked</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/mlsinglecommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: SingleShot_invokeAsync_errorCallback_invoked
+//==== LABEL Check if errorCallback of SingleShot::invokeAsync() can be invoked
+//==== SPEC Tizen Web API:TBD:MLSingleShot:SingleShot:invokeAsync M
+//==== SPEC_URL TBD
+//==== PRIORITY P2
+//==== TEST_CRITERIA MERRCB
+
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}), model, tensorsData, tensorsInfo, successCallback, errorCallback;
+t.step(function () {
+    add_result_callback(function () {
+        try {
+            tensorsData.dispose();
+            tensorsInfo.dispose();
+            model.close();
+        } catch (err) {
+            // do nothing in case dispose throw an exception
+        }
+    });
+    successCallback = t.step_func(function (tensorsDataOut) {
+        tensorsDataOut.dispose();
+        assert_unreached("invokeAsync() successCallback invoked");
+    });
+    errorCallback = t.step_func(function (error) {
+        assert_equals(error.name, "TimeoutError", "Incorrect error name");
+        t.done();
+    });
+    model = tizen.ml.single.openModel(TENSORFLOW_LITE_MODEL_PATH);
+    tensorsInfo = new tizen.ml.TensorsInfo();
+    tensorsInfo.addTensorInfo("tensor", "UINT8", [3, 224, 224]);
+    tensorsData = tensorsInfo.getTensorsData();
+
+    model.setTimeout(1);
+    model.invokeAsync(tensorsData, successCallback, errorCallback);
+
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_exist.html b/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_exist.html
new file mode 100755 (executable)
index 0000000..0d0b8b8
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2021 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Chen Chen <chen89.chen@samsung.com>
+
+-->
+<html>
+<head>
+<title>SingleShot_invokeAsync_exist</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/mlsinglecommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: SingleShot_invokeAsync_exist
+//==== LABEL Check if SingleShot:invokeAsync() method exists
+//==== SPEC Tizen Web API:TBD:MLSingleShot:SingleShot:invokeAsync M
+//==== SPEC_URL TBD
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+    var model;
+    model = tizen.ml.single.openModel(
+    TENSORFLOW_LITE_MODEL_PATH, null, null, "TENSORFLOW_LITE", "ANY");
+
+    check_method_exists(model, "invokeAsync");
+    model.close();
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_inTensorsData_TypeMismatch.html b/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_inTensorsData_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..53bb679
--- /dev/null
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2021 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Chen Chen <chen89.chen@samsung.com>
+
+-->
+<html>
+<head>
+<title>SingleShot_invokeAsync_inTensorsData_TypeMismatch</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/mlsinglecommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: SingleShot_invokeAsync_inTensorsData_TypeMismatch
+//==== LABEL Check if SingleShot:invokeAsync with incorrect inTensorsData type throws an exception
+//==== SPEC Tizen Web API:TBD:MLSingleShot:SingleShot:invokeAsync M
+//==== SPEC_URL TBD
+//==== PRIORITY P2
+//==== TEST_CRITERIA MC
+
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}), model, conversionTable, i, successCallback;
+t.step(function () {
+    add_result_callback(function () {
+        try {
+            model.close();
+        } catch (err) {
+            // do nothing in case dispose throw an exception
+        }
+    });
+    successCallback = t.step_func(function (tensorsDataOut) {
+        tensorsDataOut.dispose();
+        assert_unreached("invokeAsync() successCallback invoked");
+    });
+    model = tizen.ml.single.openModel(TENSORFLOW_LITE_MODEL_PATH);
+    conversionTable = getTypeConversionExceptions("object", false);
+    for (i = 0; i < conversionTable.length; i++) {
+        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+            model.invokeAsync(conversionTable[i][0], successCallback);
+        }, "Exception should be thrown - given incorrect inTensorsData");
+    }
+    t.done();
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_inTensorsData_misarg.html b/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_inTensorsData_misarg.html
new file mode 100755 (executable)
index 0000000..73897e1
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2021 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Chen Chen <chen89.chen@samsung.com>
+
+-->
+<html>
+<head>
+<title>SingleShot_invokeAsync_inTensorsData_misarg</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/mlsinglecommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: SingleShot_invokeAsync_inTensorsData_misarg
+//==== LABEL Check if SingleShot:invokeAsync() throws exception when inTensorsData argument is missing
+//==== SPEC Tizen Web API:TBD:MLSingleShot:SingleShot:invokeAsync M
+//==== SPEC_URL TBD
+//==== PRIORITY P2
+//==== TEST_CRITERIA MMA
+
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}), model, successCallback;
+t.step(function () {
+    add_result_callback(function () {
+        try {
+            model.close();
+        } catch (err) {
+            // do nothing in case dispose throw an exception
+        }
+    });
+    successCallback = t.step_func(function (tensorsDataOut) {
+        tensorsDataOut.dispose();
+        assert_unreached("invokeAsync() successCallback invoked");
+    });
+    model = tizen.ml.single.openModel(TENSORFLOW_LITE_MODEL_PATH);
+
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+        model.invokeAsync(null, successCallback);
+    }, "Not given inTensorsData.");
+    t.done();
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_misarg.html b/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_misarg.html
new file mode 100755 (executable)
index 0000000..06fe727
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2021 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Chen Chen <chen89.chen@samsung.com>
+
+-->
+<html>
+<head>
+<title>SingleShot_invokeAsync_misarg</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/mlsinglecommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: SingleShot_invokeAsync_misarg
+//==== LABEL Check if SingleShot:invokeAsync() throws exception when all argument is missing
+//==== SPEC Tizen Web API:TBD:MLSingleShot:SingleShot:invokeAsync M
+//==== SPEC_URL TBD
+//==== PRIORITY P2
+//==== TEST_CRITERIA MMA
+
+test(function () {
+    var model;
+    model = tizen.ml.single.openModel(TENSORFLOW_LITE_MODEL_PATH);
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+        model.invokeAsync();
+    }, "Not given any argument.");
+    model.close();
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback.html b/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback.html
new file mode 100755 (executable)
index 0000000..a144299
--- /dev/null
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2021 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Chen Chen <chen89.chen@samsung.com>
+
+-->
+<html>
+<head>
+<title>SingleShot_invokeAsync_successCallback</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/mlsinglecommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: SingleShot_invokeAsync_successCallback
+//==== LABEL Test whether SingleShot::invokeAsync::successCallback is called with argument of valid argument and proper type
+//==== SPEC Tizen Web API:TBD:MLSingleShot:SingleShot:invokeAsync M
+//==== SPEC_URL TBD
+//==== PRIORITY P1
+//==== TEST_CRITERIA COBA CBT
+
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}), model, tensorsInfo, tensorsData, successCallback;
+t.step(function () {
+    add_result_callback(function () {
+        try {
+            tensorsData.dispose();
+            tensorsInfo.dispose();
+            model.close();
+        } catch (err) {
+            // do nothing in case dispose throw an exception
+        }
+    });
+    successCallback = t.step_func(function (tensorsDataOut) {
+        assert_type(tensorsDataOut, "object", "tensorsData isn't an object");
+        assert_own_property(tensorsDataOut, "count", "tensorsData doesn't have count property");
+        assert_own_property(tensorsDataOut, "tensorsInfo", "tensorsData doesn't have tensorsInfo property");
+        assert_not_equals(tensorsDataOut, null, "tensorsData should not be null");
+        assert_not_equals(tensorsDataOut, undefined, "tensorsData should not be undefined");
+        tensorsDataOut.dispose();
+        t.done();
+    });
+    model = tizen.ml.single.openModel(TENSORFLOW_LITE_MODEL_PATH);
+    tensorsInfo = new tizen.ml.TensorsInfo();
+    tensorsInfo.addTensorInfo("tensor", "UINT8", [3, 224, 224]);
+    tensorsData = tensorsInfo.getTensorsData();
+
+    model.invokeAsync(tensorsData, successCallback);
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback_TypeMismatch.html b/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..e39a559
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2021 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Chen Chen <chen89.chen@samsung.com>
+
+-->
+<html>
+<head>
+<title>SingleShot_invokeAsync_successCallback_TypeMismatch</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/mlsinglecommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: SingleShot_invokeAsync_successCallback_TypeMismatch
+//==== LABEL Check if SingleShot:invokeAsync with incorrect successCallback type throws an exception
+//==== SPEC Tizen Web API:TBD:MLSingleShot:SingleShot:invokeAsync M
+//==== SPEC_URL TBD
+//==== PRIORITY P2
+//==== TEST_CRITERIA MC
+
+test(function () {
+    var model, conversionTable, i, tensorsData, tensorsInfo;
+
+    model = tizen.ml.single.openModel(TENSORFLOW_LITE_MODEL_PATH);
+    tensorsInfo = new tizen.ml.TensorsInfo();
+    tensorsInfo.addTensorInfo("tensor", "UINT8", [3, 224, 224]);
+    tensorsData = tensorsInfo.getTensorsData();
+    conversionTable = getTypeConversionExceptions("functionObject", false);
+    for (i = 0; i < conversionTable.length; i++) {
+        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+            model.invokeAsync(tensorsData, conversionTable[i][0]);
+        }, "Exception should be thrown - given incorrect successCallback");
+    }
+    tensorsData.dispose();
+    tensorsInfo.dispose();
+    model.close();
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback_invalid_cb.html b/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..4429f82
--- /dev/null
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2021 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Chen Chen <chen89.chen@samsung.com>
+
+-->
+<html>
+<head>
+<title>SingleShot_invokeAsync_successCallback_invalid_cb</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/mlsinglecommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: SingleShot_invokeAsync_successCallback_invalid_cb
+//==== LABEL Check if SingleShot::invokeAsync() method throws exception when successCallback is invalid
+//==== SPEC Tizen Web API:TBD:MLSingleShot:SingleShot:invokeAsync M
+//==== SPEC_URL TBD
+//==== PRIORITY P2
+//==== TEST_CRITERIA MTCB
+
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}), model, tensorsInfo, tensorsData, invalidSuccessCallback;
+t.step(function () {
+    add_result_callback(function () {
+        try {
+            tensorsData.dispose();
+            tensorsInfo.dispose();
+            model.close();
+        } catch (err) {
+            // do nothing in case dispose throw an exception
+        }
+    });
+    invalidSuccessCallback = {
+        successCallback : t.step_func(function (tensorsDataOut) {
+            tensorsDataOut.dispose();
+            assert_unreached("invokeAsync() successCallback invoked");
+        })
+    };
+    model = tizen.ml.single.openModel(TENSORFLOW_LITE_MODEL_PATH);
+
+    tensorsInfo = new tizen.ml.TensorsInfo();
+    tensorsInfo.addTensorInfo("tensor", "UINT8", [3, 224, 224]);
+    tensorsData = tensorsInfo.getTensorsData();
+
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+        model.invokeAsync(tensorsData, invalidSuccessCallback);
+    }, "TypeMismatchError should be thrown - given incorrect successCallback.");
+    t.done();
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback_misarg.html b/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback_misarg.html
new file mode 100755 (executable)
index 0000000..58a5960
--- /dev/null
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2021 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Chen Chen <chen89.chen@samsung.com>
+
+-->
+<html>
+<head>
+<title>SingleShot_invokeAsync_successCallback_misarg</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/mlsinglecommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: SingleShot_invokeAsync_successCallback_misarg
+//==== LABEL Check if SingleShot:invokeAsync() throws exception when successCallback argument is missing
+//==== SPEC Tizen Web API:TBD:MLSingleShot:SingleShot:invokeAsync M
+//==== SPEC_URL TBD
+//==== PRIORITY P2
+//==== TEST_CRITERIA MMA
+
+test(function () {
+    var model, tensorsInfo, tensorsData;
+
+    model = tizen.ml.single.openModel(TENSORFLOW_LITE_MODEL_PATH);
+    tensorsInfo = new tizen.ml.TensorsInfo();
+    tensorsInfo.addTensorInfo("tensor", "UINT8", [3, 224, 224]);
+    tensorsData = tensorsInfo.getTensorsData();
+
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+        model.invokeAsync(tensorsData);
+    }, "Not given successCallback.");
+
+    tensorsData.dispose();
+    tensorsInfo.dispose();
+    model.close();
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_with_errorCallback.html b/common/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_with_errorCallback.html
new file mode 100755 (executable)
index 0000000..6a95e27
--- /dev/null
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2021 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Chen Chen <chen89.chen@samsung.com>
+
+-->
+<html>
+<head>
+<title>SingleShot_invokeAsync_with_errorCallback</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/mlsinglecommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: SingleShot_invokeAsync_with_errorCallback
+//==== LABEL Check if SingleShot::invokeAsync() with errorCallback works properly
+//==== SPEC Tizen Web API:TBD:MLSingleShot:SingleShot:invokeAsync M
+//==== SPEC_URL TBD
+//==== PRIORITY P1
+//==== TEST_CRITERIA MOA MR
+
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}), model, tensorsInfo, tensorsData, retValue, successCallback, errorCallback;
+t.step(function () {
+    add_result_callback(function () {
+        try {
+            tensorsData.dispose();
+            tensorsInfo.dispose();
+            model.close();
+        } catch (err) {
+            // do nothing in case dispose throw an exception
+        }
+    });
+    successCallback = t.step_func(function (tensorsDataOut) {
+        console.log("invokeAsync() successCallback invoked");
+        tensorsDataOut.dispose();
+    });
+    errorCallback = t.step_func(function (error) {
+        assert_unreached("invokeAsync() errorCallback invoked");
+    });
+    model = tizen.ml.single.openModel(TENSORFLOW_LITE_MODEL_PATH);
+
+    tensorsInfo = new tizen.ml.TensorsInfo();
+    tensorsInfo.addTensorInfo("tensor", "UINT8", [3, 224, 224]);
+    tensorsData = tensorsInfo.getTensorsData();
+
+    retValue = model.invokeAsync(tensorsData, successCallback, errorCallback);
+    assert_type(retValue, "undefined", "Incorrect return type.");
+    t.done();
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
index c7f00b6e9bcfaea4d726e90f65d520ecd5b10999..0cd86693a30b6c45d8054d7f0e6c2f12ee2f848a 100755 (executable)
           </spec>
         </specs>
       </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync method work properly" type="compliance" status="approved" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P1" id="SingleShot_invokeAsync">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="SingleShot" element_type="method" element_name="invokeAsync" specification="MLSingleShot" section="TBD" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/mlsingleshot.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync throw AbortError if tensorsData invalid " type="compliance" status="approved" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P1 " id="SingleShot_invokeAsync_AbortError">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_AbortError.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="SingleShot" element_type="method" element_name="invokeAsync" specification="MLSingleShot" section="TBD" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/mlsingleshot.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync with incorrect errorCallback type throws an exception" type="compliance" status="approved" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_errorCallback_TypeMismatch">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_errorCallback_TypeMismatch.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="SingleShot" element_type="method" element_name="invokeAsync" specification="MLSingleShot" section="TBD" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/mlsingleshot.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if SingleShot::invokeAsync() method throws exception when errorCallback is invalid" type="compliance" status="approved" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_errorCallback_invalid_cb">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_errorCallback_invalid_cb.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="SingleShot" element_type="method" element_name="invokeAsync" specification="MLSingleShot" section="TBD" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/mlsingleshot.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if errorCallback of SingleShot::invokeAsync() can be invoked" type="compliance" status="approved" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_errorCallback_invoked">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_errorCallback_invoked.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="SingleShot" element_type="method" element_name="invokeAsync" specification="MLSingleShot" section="TBD" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/mlsingleshot.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync() method exists" type="compliance" status="approved" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P0" id="SingleShot_invokeAsync_exist">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="SingleShot" element_type="method" element_name="invokeAsync" specification="MLSingleShot" section="TBD" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/mlsingleshot.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync with incorrect inTensorsData type throws an exception" type="compliance" status="approved" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_inTensorsData_TypeMismatch">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_inTensorsData_TypeMismatch.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="SingleShot" element_type="method" element_name="invokeAsync" specification="MLSingleShot" section="TBD" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/mlsingleshot.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync() throws exception when inTensorsData argument is missing" type="compliance" status="approved" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_inTensorsData_misarg">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_inTensorsData_misarg.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="SingleShot" element_type="method" element_name="invokeAsync" specification="MLSingleShot" section="TBD" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/mlsingleshot.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync() throws exception when all argument is missing" type="compliance" status="approved" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_misarg">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_misarg.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="SingleShot" element_type="method" element_name="invokeAsync" specification="MLSingleShot" section="TBD" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/mlsingleshot.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Test whether SingleShot::invokeAsync::successCallback is called with argument of valid argument and proper type" type="compliance" status="approved" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P1" id="SingleShot_invokeAsync_successCallback">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="SingleShot" element_type="method" element_name="invokeAsync" specification="MLSingleShot" section="TBD" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/mlsingleshot.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync with incorrect successCallback type throws an exception" type="compliance" status="approved" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_successCallback_TypeMismatch">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback_TypeMismatch.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="SingleShot" element_type="method" element_name="invokeAsync" specification="MLSingleShot" section="TBD" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/mlsingleshot.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if SingleShot::invokeAsync() method throws exception when successCallback is invalid" type="compliance" status="approved" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_successCallback_invalid_cb">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback_invalid_cb.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="SingleShot" element_type="method" element_name="invokeAsync" specification="MLSingleShot" section="TBD" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/mlsingleshot.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync() throws exception when successCallback argument is missing" type="compliance" status="approved" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_successCallback_misarg">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback_misarg.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="SingleShot" element_type="method" element_name="invokeAsync" specification="MLSingleShot" section="TBD" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/mlsingleshot.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if SingleShot::invokeAsync() with errorCallback works properly" type="compliance" status="approved" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P1" id="SingleShot_invokeAsync_with_errorCallback">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_with_errorCallback.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="SingleShot" element_type="method" element_name="invokeAsync" specification="MLSingleShot" section="TBD" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/mlsingleshot.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
       <testcase purpose="Check if SingleShot:invoke error occur throws an exception " type="compliance" status="approved" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P1 " id="SingleShot_invoke_AbortError">
         <description>
           <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invoke_AbortError.html</test_script_entry>
index d7cb17378f422735914ce4075306c633ca131e26..b551d521d2dfbe3df92b6a2a8b9cce406b4ca678 100755 (executable)
           <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invoke.html</test_script_entry>
         </description>
       </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync method work properly" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P1" id="SingleShot_invokeAsync">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync throw AbortError if tensorsData invalid " component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P1 " id="SingleShot_invokeAsync_AbortError">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_AbortError.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync with incorrect errorCallback type throws an exception" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_errorCallback_TypeMismatch">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_errorCallback_TypeMismatch.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if SingleShot::invokeAsync() method throws exception when errorCallback is invalid" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_errorCallback_invalid_cb">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_errorCallback_invalid_cb.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if errorCallback of SingleShot::invokeAsync() can be invoked" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_errorCallback_invoked">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_errorCallback_invoked.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync() method exists" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P0" id="SingleShot_invokeAsync_exist">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync with incorrect inTensorsData type throws an exception" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_inTensorsData_TypeMismatch">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_inTensorsData_TypeMismatch.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync() throws exception when inTensorsData argument is missing" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_inTensorsData_misarg">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_inTensorsData_misarg.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync() throws exception when all argument is missing" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_misarg">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_misarg.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Test whether SingleShot::invokeAsync::successCallback is called with argument of valid argument and proper type" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P1" id="SingleShot_invokeAsync_successCallback">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync with incorrect successCallback type throws an exception" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_successCallback_TypeMismatch">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback_TypeMismatch.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if SingleShot::invokeAsync() method throws exception when successCallback is invalid" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_successCallback_invalid_cb">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback_invalid_cb.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if SingleShot:invokeAsync() throws exception when successCallback argument is missing" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P2" id="SingleShot_invokeAsync_successCallback_misarg">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_successCallback_misarg.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if SingleShot::invokeAsync() with errorCallback works properly" component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P1" id="SingleShot_invokeAsync_with_errorCallback">
+        <description>
+          <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invokeAsync_with_errorCallback.html</test_script_entry>
+        </description>
+      </testcase>
       <testcase purpose="Check if SingleShot:invoke error occur throws an exception " component="Tizen Web Device APIs/TBD/MLSingleShot" execution_type="auto" priority="P1 " id="SingleShot_invoke_AbortError">
         <description>
           <test_script_entry>/opt/tct-mlsingleshot-tizen-tests/mlsingleshot/SingleShot_invoke_AbortError.html</test_script_entry>