Skip to content

Integration Testing

Johannes Ernstsen edited this page Feb 12, 2021 · 2 revisions

The are multiple types of integration testing possible. One is for a client to cast multiple votes with different id's, described in Multiple votes from client, or a run-all integration test creating all participants, voting, and terminating by itself Full Integration Test.

Multiple votes from client

The client can be configured to dispatch multiple randomized votes, as to test the server. This is done by running as such: $EEVHE/bin/run.sh --client --multi=n

This executes the client which dispatches a random vote n times, but keeps most state, such as SSL configuration, meaning it is much more effective than simply running the client normally n times.

After the program terminates it outputs how many votes was cast in favor of each candidate.

Full Integration Test

The stand-alone integration test can be executed using the $EEVHE/bin/integrationTest.sh.

It can also be executed by executing $EEVHE/bin/run.sh $args. The supported arguments are as follows

Argument Description params example/syntax
duration Duration of election time(minutes) --duration=2
vote When votes should be cast start, end, after --vote -start -after
disabledAuthorities Which DA's should not be executed by the automatic test DA ids --disabledAuthorities -1

Example

Example execution is --integrationTest --duration=2 --vote -start -end -after, which is the one used by the integrationTest.sh file. This creates a test taking 2 minutes, with votes cast after voting time is begun, just before it is terminated, and slightly after voting is no longer allowed.

Clone this wiki locally