MCPcopy Index your code
hub / github.com/tanelpoder/0xtools / create_basic_suite

Method create_basic_suite

xtop/tests/test_runner.py:134–161  ·  view source on GitHub ↗

Create basic functionality test suite

(self)

Source from the content-addressed store, hash-verified

132 print(f"Set XCAPTURE_DATADIR environment variable to point to xcapture output")
133
134 def create_basic_suite(self) -> TestSuite:
135 """Create basic functionality test suite"""
136 suite = TestSuite("Basic Tests", "Core functionality tests")
137
138 # Base command template
139 base_cmd = f"python3 ../xtop-test.py -d {self.datadir} --from '{self.from_time}' --to '{self.to_time}'"
140
141 tests = [
142 ("basic_query", "Basic dynamic query",
143 f"{base_cmd} --limit 5 --format simple"),
144
145 ("group_by", "GROUP BY columns",
146 f"{base_cmd} -g 'state,username,comm' --limit 5 --format simple"),
147
148 ("computed_cols", "Computed columns",
149 f"{base_cmd} -g 'state,filenamesum,comm2' --limit 5 --format simple"),
150
151 ("where_clause", "WHERE clause filtering",
152 f"{base_cmd} -g 'state,comm' -w \"state IN ('SLEEP', 'RUN')\" --limit 5 --format simple"),
153
154 ("time_columns", "Time bucket columns",
155 f"{base_cmd} -g 'HH,MI,state' --limit 5 --format simple"),
156 ]
157
158 for name, desc, cmd in tests:
159 suite.add_test(TestCase(name, desc, cmd))
160
161 return suite
162
163 def create_latency_suite(self) -> TestSuite:
164 """Create latency analysis test suite"""

Callers 1

run_allMethod · 0.95

Calls 3

add_testMethod · 0.95
TestSuiteClass · 0.85
TestCaseClass · 0.85

Tested by

no test coverage detected