Test environment for [enter language here]

I am looking for a test environment for automatic language testing without much testing support . As I understand it, I need an infrastructure that can run VDF tests using some form of protocol. I would rather spend my time writing tests than writing VDF code to interact with the test environment, so a very preferred lightweight protocol.

Slim with Fitnesse seems like a good candidate, but I am interested in all the recommendations.

The ability to use the same test structure in all programming languages ​​will be an additional bonus.

+3
source share
1 answer

It is assumed that you are working at the API level. If I read this incorrectly and you work at the GUI level, you are more likely to consider something like selenium or watir.

Do you think that you write your own simple test environment that outputs the results of TAP (test protocol of something) and then parses it using grind or TAP2HTML?

Seriously, the TAP output looks like this:

1..7
ok 1 - hello world with null value returns 'hello world' string
ok 2 - hello world with bob returns 'hello, bob'
ok 3 - hello world with 123 return 'hello, 123'
ok 4 - hello world with 5K string return hello plus string
ok 5 - special characters
ok 6 - internationalization, fr
ok 7 - internationalization, ja
Looks like you failed 0 tests of 7.

( 5, 1..7 - )

ASCII. globals, numTestsTotal numTestExecuted :

sub ok (boolean bExpected, string comment) {
  if (bExpected) {
    print "ok " . numTestsExecuted . " "  . comment . "\n";    
  }else {
    print "not ok" . numTeststotal . " " . comment . "\n";
  }
  numTestsExecuted++;
}


sub eq(int iExpected, int iResult, string comment) {
  if (iExpected==iResult) {
     print "ok " . numTestsExecuted . " " . comment . "\n";
  } else {
     print "not ok" . numTestsExecuted . " " . comment . \n";
  }
  numTestsExecuted++;
}

, .

eq , - ..

. TAP: http://testanything.org/wiki/index.php/Main_Page

Test::More

, , eq() "" ok(). . .

, TAP .

+4

Source: https://habr.com/ru/post/1708136/


All Articles