Create basic functionality test suite
(self)
| 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""" |