Giter Club home page Giter Club logo

exactly's People

Contributors

emilkarlen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

exactly's Issues

Utilize all cores

I have a test suite that includes a bunch of test suites/cases that takes about 15 minutes to complete.
It would be great if there will be an option to use N processes simultaneously, similar to make -j 8 option which uses 8 processes to build project.

actor "command-line" should execute arbitrary PROGRAM

It should parse a PROGRAM and execute it as the "action to check".
Any type of program should be supported, as "run" does.

Rename it to a name that indicates that it runs a PROGRAM, e.g. "program-executor".

Any transformation defined for the program should be applied to stdout.

New string/lines-transformer: run PROGRAM

A transformation in terms of a PROGRAM, works like shell pipes - transformation is done by supplying input on stdin and collecting output from stdout.

Currently, the concept for transforming text is "lines transformer". This does not fit so well with a transformation in terms of a PROGRAM, since such a transformation do not necessarily operate on lines, but rather strings (that may represent a sequence of lines).
So, as a preparation for this issue, the "lines transformer" concept maybe should be changed to a "string transformer" concept.

How should non-zero exitcode from PROGRAM be handled? Ignored, or treated as an error, causing the test to HARD_ERROR?

New file-matcher: run PROGRAM

Ability to use an externa program as a file-matcher.

run PROGRAM

Supplying the file to match

The program must be given the name of the file to match.

Would be nice to be able to use different ways to do this, since there is no way that works well in every case.

run -argument first P
run -argument last P
run -replace-argument '{}' P
run -env-var FILE_ARG_VAR P

Broken ?

dev-manfre:~/repos/git/playground/jaxlondon/consumer [master] $ exactly test.case
Traceback (most recent call last):
File "/usr/local/bin/exactly", line 7, in
from exactly_lib.default.default_main_program_setup import main
File "/usr/local/lib/python2.7/site-packages/exactly_lib/default/default_main_program_setup.py", line 14
def default_main_program() -> main_program.MainProgram:
^
SyntaxError: invalid syntax

New files-matcher: run PROGRAM

Ability to use a program as files-matcher

run PROGRAM

Passing files to the program

There are different options for passing the files to match to the program.

  • supplying each file as it's absolute path, one per line on stdin
  • the above but separate paths with null, as xargs -0
  • make the root dir the cwd for the program, and pass relative path names on stdin
  • the above with the root dir passed as argument or env var (see corresponding issue for file-matcher)

inclusion of file with shell style string symbol definitions

It would be convenient to be able to share configuration with shell scripts.

Shell scripts (bash) declare string values by
VAR=VAL

A directive - including-string-defs - could read such a file, and make each VAR=VAL a definition of a string symbol.

File inclusion mechanism

The file inclusion mechanism of shell scripts - source, . - should be implemented as well.

Variable reference mechanism

${NAME}, and maybe also $NAME,
should be a symbol reference (to a string symbol)

Empty lines and space

Empty lines and shell comments should be ignored - it would be good to interpret as much of the shell syntax used for defining simple string variables.

Crash on reading files with invalid (unicode?) characters

$ xly empty-interval.case 
IMPLEMENTATION_ERROR
In [assert]
empty-interval.case, line 42

contents airports.csv
         -transformed-by select line-num <= 10
         equals
         -file expected/airports.csv

Exception:
'ascii' codec can't decode byte 0xc3 in position 118: ordinal not in range(128)

One failing part is the application of the string-transformer in

instructions.assert_.utils.file_contents.parts.file_assertion_part.FileToCheck#_write_transformed_contents

This will give HARD_ERROR

def _write_transformed_contents(self):
    try:
        with self._transformed_file_path.open('w') as dst_file:
            with self.lines() as lines:
                for line in lines:
                    dst_file.write(line)
    except ValueError as ex:
        raise PfhHardErrorException(str(ex))

... but there is also an unidentified failing part

which is, at least, not

exactly_lib.instructions.assert_.utils.file_contents.parts.equality.EqualityContentsAssertionPart#_do_compare

codec handling

solution might be to call open() with an "encoding" argument

See "encoding" attribute of open() in Python doc

see codecs module

Section Document - Each instruction should have a name

Each instruction in a section document should have a name.

This name should be stored together with the instruction in the Section Content Element.

Motivation

Some instructions need to have a name (for different purposes). But each instruction, and instruction config, should not need to handle this themselves. Instead, the framework should supply this information.

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.