我的测试脚本中有几个测试用例..我希望可以选择仅通过命令行运行其中一个测试用例。例如,在我的情况下,如果我只想运行“ api容器端点”怎么办
describe('Real Time Services Script', () => {
it('Should trigger Real Time Services endpoints and the test cases to pass ', async () => {
let data = await realTimeServices.main(configRTS[process.env.TEST_ENV]);
expect(data).to.be.ok;
expect(data).to.have.property('status');
expect(data.status).to.equal('200');
});
});
describe('API container endpoint', () => {
it('Trigger /api/container/v1/ endpoint and return 200 ', async () => {
let data = await script.apiContainerV1(configContent[process.env.TEST_ENV].url);
expect(data).to.be.an('object');
expect(data).to.have.property('statusCode');
expect(data.statusCode).to.equal(200);
});
it('Trigger /api/container/v1/?type=episode endpoint and return 200 ', async () => {
let data = await script.apiContainerV1Episode(configContent[process.env.TEST_ENV].url);
expect(data).to.be.an('object');
expect(data).to.have.property('statusCode');
expect(data.statusCode).to.equal(200);
});
});