hawkinswnaf / commotion-test Goto Github PK
View Code? Open in Web Editor NEWThis project forked from seamustuohy/commotion-test
This project forked from seamustuohy/commotion-test
============================ Dependencies: ============================ * Python 2.6-7 ============================ How to run tests: ============================= python run_tests.py [flags] ============================ Flags: ============================ -s [option] Suite:This flag chooses a specific test suite. Currently only "all" is implemented -v [level] Verbose: This flag sets the verbosity level to 2. This will show passed tests in the log file. Otherwise only failed tests and standard metric output is shown in the logfiles. -l [name] LogFile: This flag will allow you to choose a non-standard logfile name. ============================ Config File: ============================ should be in the location: commotion-test/config should have the following format: node=123.546.789.10 server=867.530.9.0 server=777.777.777.777 node=666.666.666.666 ============================= To Create a new test set: Copy this bare unittest into your code and go from there. ============================ import unittest import os, time #setUp and tearDown requirements class testFunctions(unittest.TestCase): def setUp(self): num = 1 date_string = time.strftime("%Y-%m-%d") metric_dir = "logs/"+date_string+"("+str(num)+")" while os.path.isdir("logs/"+date_string+"("+str(num+1)+")"): num += 1 metric_dir = "logs/"+date_string+"("+str(num)+")" self.log = open(metric_dir+"/THIS_IS_THE_METRIC_FILE_NAME_YOU_WANT", "a") self.log.write(time.strftime("Test Time: %Y-%m-%d %H:%M:%S")) def tearDown(self): self.log.close() def test_A_thing(self): self.log.write("This is how you write to the metrics file") #Note: Don't write any unittest assertions that may fail with one, but not all devices. Run your assertion tests after getting the metric data from your nodes so that a failure does not halt the metric gathering.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.