org.kurento.test.base.KurentoTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kurento-test Show documentation
Show all versions of kurento-test Show documentation
This project contains test cases for testing Kurento
Java Client and Kurento Media Server.
/*
* (C) Copyright 2015 Kurento (http://kurento.org/)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.kurento.test.base;
import static org.kurento.commons.PropertiesManager.getProperty;
import static org.kurento.test.config.Protocol.FILE;
import static org.kurento.test.config.Protocol.HTTP;
import static org.kurento.test.config.TestConfiguration.KMS_STUN_IP_PROPERTY;
import static org.kurento.test.config.TestConfiguration.KMS_STUN_PORT_PROPERTY;
import static org.kurento.test.config.TestConfiguration.TEST_CONFIG_JSON_DEFAULT;
import static org.kurento.test.config.TestConfiguration.TEST_FILES_DISK_DEFAULT;
import static org.kurento.test.config.TestConfiguration.TEST_FILES_DISK_PROP;
import static org.kurento.test.config.TestConfiguration.TEST_FILES_DISK_PROP_OLD;
import static org.kurento.test.config.TestConfiguration.TEST_FILES_HTTP_DEFAULT;
import static org.kurento.test.config.TestConfiguration.TEST_FILES_HTTP_PROP;
import static org.kurento.test.config.TestConfiguration.TEST_FILES_MONGO_DEFAULT;
import static org.kurento.test.config.TestConfiguration.TEST_FILES_MONGO_PROP;
import static org.kurento.test.config.TestConfiguration.TEST_FILES_S3_DEFAULT;
import static org.kurento.test.config.TestConfiguration.TEST_FILES_S3_PROP;
import static org.kurento.test.config.TestConfiguration.TEST_FILES_S3_PROP_OLD;
import static org.kurento.test.config.TestConfiguration.TEST_FILES_URL_PROP;
import static org.kurento.test.config.TestConfiguration.TEST_ICE_SERVER_CREDENTIAL_PROPERTY;
import static org.kurento.test.config.TestConfiguration.TEST_ICE_SERVER_URL_PROPERTY;
import static org.kurento.test.config.TestConfiguration.TEST_ICE_SERVER_USERNAME_PROPERTY;
import static org.kurento.test.config.TestConfiguration.TEST_NUMRETRIES_PROPERTY;
import static org.kurento.test.config.TestConfiguration.TEST_NUM_NUMRETRIES_DEFAULT;
import static org.kurento.test.config.TestConfiguration.TEST_PRINT_LOG_DEFAULT;
import static org.kurento.test.config.TestConfiguration.TEST_PRINT_LOG_PROP;
import static org.kurento.test.config.TestConfiguration.TEST_PROJECT_PATH_DEFAULT;
import static org.kurento.test.config.TestConfiguration.TEST_PROJECT_PATH_PROP;
import static org.kurento.test.config.TestConfiguration.TEST_RECORD_DEFAULTPATH_PROP;
import static org.kurento.test.config.TestConfiguration.TEST_RECORD_URL_PROP;
import static org.kurento.test.config.TestConfiguration.TEST_SEEK_REPETITIONS;
import static org.kurento.test.config.TestConfiguration.TEST_SEEK_REPETITIONS_DEFAULT;
import java.io.File;
import java.io.FilenameFilter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.junit.Rule;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized.Parameter;
import org.junit.runners.Parameterized.Parameters;
import org.junit.runners.Parameterized.UseParametersRunnerFactory;
import org.kurento.commons.ConfigFileManager;
import org.kurento.test.config.Retry;
import org.kurento.test.config.TestReport;
import org.kurento.test.config.TestScenario;
import org.kurento.test.lifecycle.FailedTest;
import org.kurento.test.lifecycle.FinishedTest;
import org.kurento.test.lifecycle.KurentoBlockJUnit4ClassRunnerWithParametersFactory;
import org.kurento.test.lifecycle.KurentoTestRunner;
import org.kurento.test.lifecycle.KurentoTestWatcher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Base for Kurento tests.
*
* @author Boni Garcia ([email protected])
* @author Micael Gallego ([email protected])
* @since 6.1.1
*/
@RunWith(KurentoTestRunner.class)
@UseParametersRunnerFactory(KurentoBlockJUnit4ClassRunnerWithParametersFactory.class)
public class KurentoTest {
@Rule
public Retry retry = new Retry(numRetries);
@Rule
public KurentoTestWatcher watcher = new KurentoTestWatcher();
@Parameter
public TestScenario testScenario;
@Parameters
public static Collection
© 2015 - 2025 Weber Informatics LLC | Privacy Policy