Lines Matching defs:this
4 * you may not use this file except in compliance with the License.
22 this.id = attr.id;
23 this.supportAsync = true; // 默认异步处理测试用例
24 this.random = false;
25 this.filterValid = [];
26 this.filter = 0;
27 this.flag = false;
28 this.suite = null;
29 this.itName = null;
30 this.testType = null;
31 this.level = null;
32 this.size = null;
33 this.class = null;
34 this.notClass = null;
35 this.timeout = null;
37 this.breakOnError = false;
39 this.stress = null;
40 this.skipMessage = false;
41 this.runSkipped = '';
42 this.filterXdescribe = [];
46 this.coreContext = coreContext;
56 if (this.stress === undefined || this.stress === '' || this.stress === null) {
59 return !this.stress.match(STRESS_RULE) ? 1 : Number.parseInt(this.stress);
67 this.filterValid.push('size:' + size);
74 this.filterValid.push('level:' + level);
82 this.filterValid.push('testType:' + testType);
90 if (!this.isNormalInteger(timeout)) {
91 this.filterValid.push('timeout:' + timeout);
98 this.filterValid.push(`${key}:${params[key]}`);
105 this.filterValid.push('stress:' + params.stress);
114 classArray.forEach(item => !item.match(nameRule) ? this.filterValid.push(`${key}:${params[key]}`) : null);
120 this.basicParamValidCheck(params);
121 this.filterParamValidCheck(params);
123 this.class = params.class;
124 this.notClass = params.notClass;
125 this.flag = params.flag || { flag: false };
126 this.suite = params.suite;
127 this.itName = params.itName;
128 this.filter = params.filter;
129 this.testType = params.testType;
130 this.level = params.level;
131 this.size = params.size;
132 this.timeout = params.timeout;
133 this.dryRun = params.dryRun;
134 this.breakOnError = params.breakOnError;
135 this.random = params.random === 'true' ? true : false;
136 this.stress = params.stress;
137 this.coverage = params.coverage;
138 this.skipMessage = params.skipMessage;
139 this.runSkipped = params.runSkipped;
140 this.filterParam = {
145 this.parseParams();
152 if (this.filter != null) {
158 if (this.testType != null) {
159 testTypeFilter = this.testType.split(',')
160 .map(item => this.filterParam.testType[item] || 0)
163 if (this.level != null) {
164 levelFilter = this.level.split(',')
165 .map(item => this.filterParam.level[item] || 0)
168 if (this.size != null) {
169 sizeFilter = this.size.split(',')
170 .map(item => this.filterParam.size[item] || 0)
173 this.filter = testTypeFilter | sizeFilter | levelFilter;
174 console.info(`${TAG}filter params:${this.filter}`);
178 if (this.suite !== undefined && this.suite !== '' && this.suite !== null) {
179 let suiteArray = this.suite.split(',');
187 if (this.suite !== undefined && this.suite !== '' && this.suite !== null) {
188 filterArray.push(new SuiteAndItNameFilter(currentSuiteName, '', this.suite));
190 if (this.class !== undefined && this.class !== '' && this.class !== null) {
191 filterArray.push(new ClassFilter(currentSuiteName, '', this.class));
193 if (this.notClass !== undefined && this.notClass !== '' && this.notClass !== null) {
194 filterArray.push(new NotClassFilter(currentSuiteName, '', this.notClass));
203 if (this.itName !== undefined && this.itName !== '' && this.itName !== null) {
204 filterArray.push(new SuiteAndItNameFilter(currentSuiteName, desc, this.itName));
206 if (this.class !== undefined && this.class !== '' && this.class !== null) {
207 filterArray.push(new ClassFilter(currentSuiteName, desc, this.class));
209 if (this.notClass !== undefined && this.notClass !== '' && this.notClass !== null) {
210 filterArray.push(new NotClassFilter(currentSuiteName, desc, this.notClass));
212 if (typeof (this.filter) !== 'undefined' && this.filter !== 0 && fi !== 0) {
213 filterArray.push(new TestTypesFilter('', '', fi, this.filter));
222 const targetSuiteArray = this.coreContext.getDefaultService('suite').targetSuiteArray;
223 const targetSpecArray = this.coreContext.getDefaultService('suite').targetSpecArray;
224 const suiteStack = this.coreContext.getDefaultService('suite').suitesStack;
226 const isFullRun = this.coreContext.getDefaultService('suite').fullRun;
227 if (typeof (this.filter) !== 'undefined' && this.filter !== 0 && filter !== 0) {
228 filterArray.push(new TestTypesFilter('', '', filter, this.filter));
234 return nestFilter.filterNotClass(this.notClass, suiteStack, desc);
239 return this.random || false;
243 return this.breakOnError !== 'true' ? false : true;
247 this.supportAsync = value;
251 return this.supportAsync;
280 return this.runSkipped.split(',').some(item => {
281 return item === desc || item.startsWith(desc + '.') || item.startsWith(desc + '#') || desc.startsWith(item + '.') || this.runSkipped === 'skipped';
286 return this.runSkipped.split(',').some(item => {
290 return desc.startsWith(item + '.') || desc.startsWith(item + '#') || this.runSkipped === 'skipped';