Sunteți pe pagina 1din 3

Business Inject Scripting System

The UAT CCDC Scoring Engine can only truly emulate an actual CCDC
environment if there is a properly working Inject system. Injects are tasks that resemble a
request from either the boss or from a client and needs to be fulfilled within a certain
amount of time. The addition of these tasks to the competition adds a level of stress that
helps with truly assessing the skills of a CCDC team. After picking out some different
options for the language of the script Python 3 was selected.
The script uses a time based counter to determine if a predetermined inject will be
appended to the dashboard of the website. While the scores on the dashboard are counted
another counter is testes against the inject script in the background. The script takes this
counter value and looks to see if the counter value for an inject matches and if it does the
script outputs the inject in HTML format and appends it to the dashboard. The script also
creates its own timestamps based off of the server it is running on to allow the inject to
have Start and End times dynamically displayed. The injects themselves are saved into a
comma separated value file or CSV. The script calls this file for checking and uses the
data within it to output the injects. This way injects can be added into the challenge on
the fly by only editing the CSV file rather than the script itself.

The above script is written to show the process of reading the tickval and looking
through the CSV file for injects that match. The inject.csv file is where the data is stored.
The inject.csv file will be where all of the injects that need to be displayed are saved. This
is where one would add an inject to the challenge. The number is incremental for
organization and the runtick is when the inject will append to the page. One tick is

equal to three seconds so when adding an inject this needs to be taken into consideration.
The rest of the information is rather strait forward. The endtick however is no longer
used in the system so it can be ignored but an arbitrary value needs to be put in for it to
maintain the proper value spacing. The timenum is how many minutes the inject will
last and will generate the end time.

The value of 2 was given (equal to 6 seconds on the scoring engine) and found 2
injects that matched. Each one is then output in HTML format with current timestamps.
This way the output only needs to be appended to the page without further editing of the
data.

As shown the same data shows up on the website properly formatted once the
counter value is ran against the script and matches the inject tickval value.
Here are screenshots of the python script and CSV file that are currently running
on the server.

S-ar putea să vă placă și