diff --git a/build/run-testsapp.grunt.js b/build/run-testsapp.grunt.js index 74a463ad6..2e3630c5d 100644 --- a/build/run-testsapp.grunt.js +++ b/build/run-testsapp.grunt.js @@ -6,6 +6,11 @@ module.exports = { //Construct and validate the arguments var args = { 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(){ @@ -16,9 +21,7 @@ module.exports = { tnsPath: "tns", emulatorProcessIdentifier:".*emulator64-x86", emuAvdName:"Api19", - androidRuntimePath:"/Users/erjan/tns-android.tgz", outfile:"./TestRunResult.txt", - androidRuntimePath: "/Users/erjan/tns-android.tgz", androidFrameworkArgument: " --frameworkPath=/Users/erjan/tns-android.tgz", workingDir:".testsapprun", diff --git a/running-tests.md b/running-tests.md new file mode 100644 index 000000000..5a44b18a6 --- /dev/null +++ b/running-tests.md @@ -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"] +```