Giter Site home page Giter Site logo

scriptcs-testing-script-packs's Introduction

scriptcs script pack testing app

This is a console application designed to run smoke tests against all Script Packs published on NuGet, ahead of a scriptcs release.

The list of Script Packs is maintained in packs.txt in the project source folder. Each entry contains two comma delimited items - the name of the script pack and the name of the type which should be used in Require<T>() when running the test. An item in this list can be ignored by prefixing the line with //.

The list was seeded by running nuget list scriptcs -pre and then (painstakingly) curating the output.

If your Script Pack is not in the list, please send a PR which adds it. This will ensure that the scriptcs core team will run the tests against your Script Pack before a release to ensure it is still compatible.

Test details

It should be noted that, in it's current form, this app only performs an extremely basic test. The following steps are performed for each script pack.

  • A directory is created for the script pack in the project output folder and is used as the working directory for all further steps.
  • The script pack is installed by executing scriptcs -install {Script Pack name} -pre. Note that if the latest version of a Script Pack is pre-release, that version will be used.
  • A start.csx file is created containing the following script, with T replaced with the name of the type provided in packs.txt:
var pack = Require<T>();
Console.WriteLine(pack);
  • The script is run by executing scriptcs start.csx -log debug.

Building the app

  • Command line: Run build.cmd (Windows) or build.sh (*nix).
  • Visual Studio*: build like any other solution.

* Substitute 'Visual Studio with your IDE/posh text editor of choice

Running the app

First, change the ScriptCsExe configuration item to point to your copy of scriptcs.exe.

  • Command line: edit packs.config
  • Visual Studio: edit App.config

To run the tests for all script packs:

  • Command line: navigate to the project output folder and execute packs (Windows) or mono packs (*nix)
  • Visual Studio: brutalise the appropriate shortcut key with your favourite finger, e.g. F5 in Visual Studio.

To run the tests for specific script packs, provide the names of the script packs as arguments (case-insensitive):

  • Command line: packs scriptcs.nancy scriptcs.adder (Windows) or mono packs scriptcs.nancy scriptcs.adder (*nix)
  • Visual Studio: set the arguments in the Debug tab of the project properties.

If there are any failures, you will see them both in the console output and in the log file packs.log. For more detail about a particular failure, see packs-install.{Script Pack name}.log (for installation failures) or packs-run.{Script Pack name}.log (for script running failures).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.