mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Add more parameters. Add a basic readme for running the tests
This commit is contained in:
@@ -6,6 +6,11 @@ module.exports = {
|
|||||||
//Construct and validate the arguments
|
//Construct and validate the arguments
|
||||||
var args = {
|
var args = {
|
||||||
platform: grunt.option("platform")
|
platform: grunt.option("platform")
|
||||||
|
tnsPath: grunt.option("tnsPath")
|
||||||
|
emulatorProcessIdentifier: grunt.option("emuPId")
|
||||||
|
emuAvdName: grunt.option("avdNameToStart")
|
||||||
|
outFile: grunt.option("logFilePath")
|
||||||
|
androidRuntimePath: grunt.option("androidRuntimePath")
|
||||||
};
|
};
|
||||||
|
|
||||||
(function validateInput(){
|
(function validateInput(){
|
||||||
@@ -16,9 +21,7 @@ module.exports = {
|
|||||||
tnsPath: "tns",
|
tnsPath: "tns",
|
||||||
emulatorProcessIdentifier:".*emulator64-x86",
|
emulatorProcessIdentifier:".*emulator64-x86",
|
||||||
emuAvdName:"Api19",
|
emuAvdName:"Api19",
|
||||||
androidRuntimePath:"/Users/erjan/tns-android.tgz",
|
|
||||||
outfile:"./TestRunResult.txt",
|
outfile:"./TestRunResult.txt",
|
||||||
androidRuntimePath: "/Users/erjan/tns-android.tgz",
|
|
||||||
androidFrameworkArgument: " --frameworkPath=/Users/erjan/tns-android.tgz",
|
androidFrameworkArgument: " --frameworkPath=/Users/erjan/tns-android.tgz",
|
||||||
|
|
||||||
workingDir:".testsapprun",
|
workingDir:".testsapprun",
|
||||||
|
|||||||
29
running-tests.md
Normal file
29
running-tests.md
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
Running NativeScript Tests
|
||||||
|
=========================
|
||||||
|
|
||||||
|
|
||||||
|
# Details
|
||||||
|
NativeScript is a framework for building applications on mobile devices. Many
|
||||||
|
of its components are UI elements which get tested most efficiently on the
|
||||||
|
respective device or simulator/emulator. Thus, running the tests involves
|
||||||
|
the following steps:
|
||||||
|
- Create a NativeScript project
|
||||||
|
- Build it to a native image
|
||||||
|
- Start a simulator/emulator
|
||||||
|
- Deploy the application image
|
||||||
|
- Start the application
|
||||||
|
- Monitor its output
|
||||||
|
- Gather test output
|
||||||
|
|
||||||
|
# Prerequisites
|
||||||
|
- Node JS
|
||||||
|
- grunt
|
||||||
|
- NativeScript CLI
|
||||||
|
- Android/iOS setup
|
||||||
|
- expect
|
||||||
|
|
||||||
|
# Sample run:
|
||||||
|
```
|
||||||
|
grunt testsapp --platform=Android [--tnsPath="tns"] --emuPId=".*emulator64-x86"
|
||||||
|
--emuAvdName="Api19" [--logFilePath="./TestRunResult.txt"] [--androidRuntimePath="./tns-android.tgz"]
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user