box-js icon indicating copy to clipboard operation
box-js copied to clipboard

Write regression tests

Open CapacitorSet opened this issue 9 years ago • 1 comments
trafficstars

Some ideas:

  • Testing on a blank file to make sure that everything works
  • Testing for frequent mistakes, like simplifying "foo" + "bar".decode() to "foobar".decode()
  • Testing that XML tags and @cc_on are stripped correctly
  • Testing for rewrites inside eval
  • Use various pieces of existing malware (that for some reason at one point or another were not emulated correctly by box-js), deactivate it (eg. replace the payload URLs with https://google.com/robots.txt), and test that they are analysed correctly
  • Test for samples based on codepage-437 encoding, downloading the samples from a local webserver, and verifying that the result is decoded correctly (requires one to study one such sample and "craft" a payload correctly, i.e. so that it can be decoded - obviously can't use real-life payloads)
  • Test for individual components - WScriptShell, XMLHTTP, etc.

CapacitorSet avatar Sep 29 '16 21:09 CapacitorSet

The testing platform - be it Mocha, Jasmine, Should or whatever - will be called by Travis, to automate regression testing.

CapacitorSet avatar Sep 29 '16 21:09 CapacitorSet