repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
korpling/ANNIS
annis-service/src/main/java/annis/administration/CorpusAdministration.java
CorpusAdministration.importCorporaSave
public ImportStatus importCorporaSave(boolean overwrite, String aliasName, String statusEmailAdress, boolean waitForOtherTasks, String... paths) { return importCorporaSave(overwrite, aliasName, statusEmailAdress, waitForOtherTasks, Arrays.asList(paths)); }
java
public ImportStatus importCorporaSave(boolean overwrite, String aliasName, String statusEmailAdress, boolean waitForOtherTasks, String... paths) { return importCorporaSave(overwrite, aliasName, statusEmailAdress, waitForOtherTasks, Arrays.asList(paths)); }
[ "public", "ImportStatus", "importCorporaSave", "(", "boolean", "overwrite", ",", "String", "aliasName", ",", "String", "statusEmailAdress", ",", "boolean", "waitForOtherTasks", ",", "String", "...", "paths", ")", "{", "return", "importCorporaSave", "(", "overwrite", ...
Imports several corpora. @param overwrite if false, a conflicting top level corpus is silently skipped. @param aliasName An common alias name for all imported corpora or null @param statusEmailAdress If not null the email adress of the user who started the import. @param waitForOtherTasks If true wait for other import...
[ "Imports", "several", "corpora", "." ]
152a2e34832e015f73ac8ce8a7d4c32641641324
https://github.com/korpling/ANNIS/blob/152a2e34832e015f73ac8ce8a7d4c32641641324/annis-service/src/main/java/annis/administration/CorpusAdministration.java#L725-L732
train
korpling/ANNIS
annis-visualizers/src/main/java/annis/visualizers/component/grid/GridComponent.java
GridComponent.markCoveredTokens
private Long markCoveredTokens(Map<SNode, Long> markedAndCovered, SNode tok) { RelannisNodeFeature f = RelannisNodeFeature.extract(tok); if (markedAndCovered.containsKey(tok) && f != null && f.getMatchedNode() == null) { return markedAndCovered.get(tok); } return f != null ? f.getMatchedNode() : null; }
java
private Long markCoveredTokens(Map<SNode, Long> markedAndCovered, SNode tok) { RelannisNodeFeature f = RelannisNodeFeature.extract(tok); if (markedAndCovered.containsKey(tok) && f != null && f.getMatchedNode() == null) { return markedAndCovered.get(tok); } return f != null ? f.getMatchedNode() : null; }
[ "private", "Long", "markCoveredTokens", "(", "Map", "<", "SNode", ",", "Long", ">", "markedAndCovered", ",", "SNode", "tok", ")", "{", "RelannisNodeFeature", "f", "=", "RelannisNodeFeature", ".", "extract", "(", "tok", ")", ";", "if", "(", "markedAndCovered", ...
Checks if a token is covered by a matched node but not a match by it self. @param markedAndCovered A mapping from node to a matched number. The node must not matched directly, but covered by a matched node. @param tok the checked token. @return Returns null, if token is not covered neither marked.
[ "Checks", "if", "a", "token", "is", "covered", "by", "a", "matched", "node", "but", "not", "a", "match", "by", "it", "self", "." ]
152a2e34832e015f73ac8ce8a7d4c32641641324
https://github.com/korpling/ANNIS/blob/152a2e34832e015f73ac8ce8a7d4c32641641324/annis-visualizers/src/main/java/annis/visualizers/component/grid/GridComponent.java#L424-L430
train
korpling/ANNIS
annis-visualizers/src/main/java/annis/visualizers/component/grid/GridComponent.java
GridComponent.tokenMatch
private Long tokenMatch(SNode tok) { // check if the span is a matched node SFeature featMatched = tok.getFeature(ANNIS_NS, FEAT_MATCHEDNODE); Long matchRaw = featMatched == null ? null : featMatched.getValue_SNUMERIC(); return matchRaw; }
java
private Long tokenMatch(SNode tok) { // check if the span is a matched node SFeature featMatched = tok.getFeature(ANNIS_NS, FEAT_MATCHEDNODE); Long matchRaw = featMatched == null ? null : featMatched.getValue_SNUMERIC(); return matchRaw; }
[ "private", "Long", "tokenMatch", "(", "SNode", "tok", ")", "{", "// check if the span is a matched node", "SFeature", "featMatched", "=", "tok", ".", "getFeature", "(", "ANNIS_NS", ",", "FEAT_MATCHEDNODE", ")", ";", "Long", "matchRaw", "=", "featMatched", "==", "n...
Checks if a token is a marked match @param tok the checked token. @return Returns null, if token is not marked.
[ "Checks", "if", "a", "token", "is", "a", "marked", "match" ]
152a2e34832e015f73ac8ce8a7d4c32641641324
https://github.com/korpling/ANNIS/blob/152a2e34832e015f73ac8ce8a7d4c32641641324/annis-visualizers/src/main/java/annis/visualizers/component/grid/GridComponent.java#L438-L443
train
nebula-plugins/gradle-metrics-plugin
src/main/java/nebula/plugin/metrics/model/BuildMetrics.java
BuildMetrics.getBuildDescription
public String getBuildDescription() { StringBuilder sb = new StringBuilder(); for (String name : startParameter.getExcludedTaskNames()) { sb.append("-x "); sb.append(name); sb.append(" "); } for (String name : startParameter.getTaskNames()) { ...
java
public String getBuildDescription() { StringBuilder sb = new StringBuilder(); for (String name : startParameter.getExcludedTaskNames()) { sb.append("-x "); sb.append(name); sb.append(" "); } for (String name : startParameter.getTaskNames()) { ...
[ "public", "String", "getBuildDescription", "(", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "String", "name", ":", "startParameter", ".", "getExcludedTaskNames", "(", ")", ")", "{", "sb", ".", "append", "(", "\"...
Get a description of this profiled build. It contains info about tasks passed to gradle as targets from the command line.
[ "Get", "a", "description", "of", "this", "profiled", "build", ".", "It", "contains", "info", "about", "tasks", "passed", "to", "gradle", "as", "targets", "from", "the", "command", "line", "." ]
f074e7c2b9a5f5f3ca06bf9fade486e47e80f4a3
https://github.com/nebula-plugins/gradle-metrics-plugin/blob/f074e7c2b9a5f5f3ca06bf9fade486e47e80f4a3/src/main/java/nebula/plugin/metrics/model/BuildMetrics.java#L59-L75
train
nebula-plugins/gradle-metrics-plugin
src/main/java/nebula/plugin/metrics/model/BuildMetrics.java
BuildMetrics.getProjectProfile
public ProjectMetrics getProjectProfile(String projectPath) { ProjectMetrics result = projects.get(projectPath); if (result == null) { result = new ProjectMetrics(projectPath); projects.put(projectPath, result); } return result; }
java
public ProjectMetrics getProjectProfile(String projectPath) { ProjectMetrics result = projects.get(projectPath); if (result == null) { result = new ProjectMetrics(projectPath); projects.put(projectPath, result); } return result; }
[ "public", "ProjectMetrics", "getProjectProfile", "(", "String", "projectPath", ")", "{", "ProjectMetrics", "result", "=", "projects", ".", "get", "(", "projectPath", ")", ";", "if", "(", "result", "==", "null", ")", "{", "result", "=", "new", "ProjectMetrics",...
Get the profiling container for the specified project @param projectPath to look up
[ "Get", "the", "profiling", "container", "for", "the", "specified", "project" ]
f074e7c2b9a5f5f3ca06bf9fade486e47e80f4a3
https://github.com/nebula-plugins/gradle-metrics-plugin/blob/f074e7c2b9a5f5f3ca06bf9fade486e47e80f4a3/src/main/java/nebula/plugin/metrics/model/BuildMetrics.java#L89-L96
train
nebula-plugins/gradle-metrics-plugin
src/main/java/nebula/plugin/metrics/model/BuildMetrics.java
BuildMetrics.getElapsedArtifactTransformTime
public long getElapsedArtifactTransformTime() { long result = 0; for (FragmentedOperation transform : transforms.values()) { result += transform.getElapsedTime(); } return result; }
java
public long getElapsedArtifactTransformTime() { long result = 0; for (FragmentedOperation transform : transforms.values()) { result += transform.getElapsedTime(); } return result; }
[ "public", "long", "getElapsedArtifactTransformTime", "(", ")", "{", "long", "result", "=", "0", ";", "for", "(", "FragmentedOperation", "transform", ":", "transforms", ".", "values", "(", ")", ")", "{", "result", "+=", "transform", ".", "getElapsedTime", "(", ...
Get the total artifact transformation time.
[ "Get", "the", "total", "artifact", "transformation", "time", "." ]
f074e7c2b9a5f5f3ca06bf9fade486e47e80f4a3
https://github.com/nebula-plugins/gradle-metrics-plugin/blob/f074e7c2b9a5f5f3ca06bf9fade486e47e80f4a3/src/main/java/nebula/plugin/metrics/model/BuildMetrics.java#L229-L235
train
nebula-plugins/gradle-metrics-plugin
src/main/java/nebula/plugin/metrics/model/BuildMetrics.java
BuildMetrics.getElapsedTotalExecutionTime
public long getElapsedTotalExecutionTime() { long result = 0; for (ProjectMetrics projectMetrics : projects.values()) { result += projectMetrics.getElapsedTime(); } return result; }
java
public long getElapsedTotalExecutionTime() { long result = 0; for (ProjectMetrics projectMetrics : projects.values()) { result += projectMetrics.getElapsedTime(); } return result; }
[ "public", "long", "getElapsedTotalExecutionTime", "(", ")", "{", "long", "result", "=", "0", ";", "for", "(", "ProjectMetrics", "projectMetrics", ":", "projects", ".", "values", "(", ")", ")", "{", "result", "+=", "projectMetrics", ".", "getElapsedTime", "(", ...
Get the total task execution time from all projects.
[ "Get", "the", "total", "task", "execution", "time", "from", "all", "projects", "." ]
f074e7c2b9a5f5f3ca06bf9fade486e47e80f4a3
https://github.com/nebula-plugins/gradle-metrics-plugin/blob/f074e7c2b9a5f5f3ca06bf9fade486e47e80f4a3/src/main/java/nebula/plugin/metrics/model/BuildMetrics.java#L240-L246
train
nebula-plugins/gradle-metrics-plugin
src/main/java/nebula/plugin/metrics/collector/GradleBuildMetricsCollector.java
GradleBuildMetricsCollector.shutdownIfComplete
private void shutdownIfComplete() { // only shut down if you have updated build results AND profile information if (!buildProfileComplete.get() || !buildResultComplete.get()) { return; } MetricsDispatcher dispatcher = this.dispatcherSupplier.get(); logger.info("Shutt...
java
private void shutdownIfComplete() { // only shut down if you have updated build results AND profile information if (!buildProfileComplete.get() || !buildResultComplete.get()) { return; } MetricsDispatcher dispatcher = this.dispatcherSupplier.get(); logger.info("Shutt...
[ "private", "void", "shutdownIfComplete", "(", ")", "{", "// only shut down if you have updated build results AND profile information", "if", "(", "!", "buildProfileComplete", ".", "get", "(", ")", "||", "!", "buildResultComplete", ".", "get", "(", ")", ")", "{", "retu...
Conditionally shutdown the dispatcher, because Gradle listener event order appears to be non-deterministic.
[ "Conditionally", "shutdown", "the", "dispatcher", "because", "Gradle", "listener", "event", "order", "appears", "to", "be", "non", "-", "deterministic", "." ]
f074e7c2b9a5f5f3ca06bf9fade486e47e80f4a3
https://github.com/nebula-plugins/gradle-metrics-plugin/blob/f074e7c2b9a5f5f3ca06bf9fade486e47e80f4a3/src/main/java/nebula/plugin/metrics/collector/GradleBuildMetricsCollector.java#L299-L319
train
nebula-plugins/gradle-metrics-plugin
src/main/java/nebula/plugin/metrics/model/ProjectMetrics.java
ProjectMetrics.getTaskProfile
public TaskExecution getTaskProfile(String taskPath) { TaskExecution result = tasks.get(taskPath); if (result == null) { result = new TaskExecution(taskPath); tasks.put(taskPath, result); } return result; }
java
public TaskExecution getTaskProfile(String taskPath) { TaskExecution result = tasks.get(taskPath); if (result == null) { result = new TaskExecution(taskPath); tasks.put(taskPath, result); } return result; }
[ "public", "TaskExecution", "getTaskProfile", "(", "String", "taskPath", ")", "{", "TaskExecution", "result", "=", "tasks", ".", "get", "(", "taskPath", ")", ";", "if", "(", "result", "==", "null", ")", "{", "result", "=", "new", "TaskExecution", "(", "task...
Gets the task profiling container for the specified task.
[ "Gets", "the", "task", "profiling", "container", "for", "the", "specified", "task", "." ]
f074e7c2b9a5f5f3ca06bf9fade486e47e80f4a3
https://github.com/nebula-plugins/gradle-metrics-plugin/blob/f074e7c2b9a5f5f3ca06bf9fade486e47e80f4a3/src/main/java/nebula/plugin/metrics/model/ProjectMetrics.java#L38-L45
train
nebula-plugins/gradle-metrics-plugin
src/main/java/nebula/plugin/metrics/model/ProjectMetrics.java
ProjectMetrics.getTasks
public CompositeOperation<TaskExecution> getTasks() { List<TaskExecution> taskExecutions = CollectionUtils.sort(tasks.values(), slowestFirst()); return new CompositeOperation<TaskExecution>(taskExecutions); }
java
public CompositeOperation<TaskExecution> getTasks() { List<TaskExecution> taskExecutions = CollectionUtils.sort(tasks.values(), slowestFirst()); return new CompositeOperation<TaskExecution>(taskExecutions); }
[ "public", "CompositeOperation", "<", "TaskExecution", ">", "getTasks", "(", ")", "{", "List", "<", "TaskExecution", ">", "taskExecutions", "=", "CollectionUtils", ".", "sort", "(", "tasks", ".", "values", "(", ")", ",", "slowestFirst", "(", ")", ")", ";", ...
Returns the task executions for this project.
[ "Returns", "the", "task", "executions", "for", "this", "project", "." ]
f074e7c2b9a5f5f3ca06bf9fade486e47e80f4a3
https://github.com/nebula-plugins/gradle-metrics-plugin/blob/f074e7c2b9a5f5f3ca06bf9fade486e47e80f4a3/src/main/java/nebula/plugin/metrics/model/ProjectMetrics.java#L50-L53
train
codelibs/elasticsearch-cluster-runner
src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java
ElasticsearchClusterRunner.close
@Override public void close() throws IOException { final List<IOException> exceptionList = new ArrayList<>(); for (final Node node : nodeList) { try { node.close(); } catch (final IOException e) { exceptionList.add(e); } } ...
java
@Override public void close() throws IOException { final List<IOException> exceptionList = new ArrayList<>(); for (final Node node : nodeList) { try { node.close(); } catch (final IOException e) { exceptionList.add(e); } } ...
[ "@", "Override", "public", "void", "close", "(", ")", "throws", "IOException", "{", "final", "List", "<", "IOException", ">", "exceptionList", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "final", "Node", "node", ":", "nodeList", ")", "{", ...
Close a cluster runner. @throws IOException i/o exception
[ "Close", "a", "cluster", "runner", "." ]
3fff827dcef95cb2854ee1a95022eafe0ce867f3
https://github.com/codelibs/elasticsearch-cluster-runner/blob/3fff827dcef95cb2854ee1a95022eafe0ce867f3/src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java#L248-L268
train
codelibs/elasticsearch-cluster-runner
src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java
ElasticsearchClusterRunner.clean
public void clean() { final Path bPath = FileSystems.getDefault().getPath(basePath); for (int i = 0; i < 3; i++) { try { final CleanUpFileVisitor visitor = new CleanUpFileVisitor(); Files.walkFileTree(bPath, visitor); if (!visitor.hasErrors()) ...
java
public void clean() { final Path bPath = FileSystems.getDefault().getPath(basePath); for (int i = 0; i < 3; i++) { try { final CleanUpFileVisitor visitor = new CleanUpFileVisitor(); Files.walkFileTree(bPath, visitor); if (!visitor.hasErrors()) ...
[ "public", "void", "clean", "(", ")", "{", "final", "Path", "bPath", "=", "FileSystems", ".", "getDefault", "(", ")", ".", "getPath", "(", "basePath", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "3", ";", "i", "++", ")", "{", "try...
Delete all configuration files and directories.
[ "Delete", "all", "configuration", "files", "and", "directories", "." ]
3fff827dcef95cb2854ee1a95022eafe0ce867f3
https://github.com/codelibs/elasticsearch-cluster-runner/blob/3fff827dcef95cb2854ee1a95022eafe0ce867f3/src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java#L273-L297
train
codelibs/elasticsearch-cluster-runner
src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java
ElasticsearchClusterRunner.build
public void build(final String... args) { if (args != null) { final CmdLineParser parser = new CmdLineParser(this, ParserProperties.defaults().withUsageWidth(80)); try { parser.parseArgument(args); } catch (final CmdLineException e) { throw ne...
java
public void build(final String... args) { if (args != null) { final CmdLineParser parser = new CmdLineParser(this, ParserProperties.defaults().withUsageWidth(80)); try { parser.parseArgument(args); } catch (final CmdLineException e) { throw ne...
[ "public", "void", "build", "(", "final", "String", "...", "args", ")", "{", "if", "(", "args", "!=", "null", ")", "{", "final", "CmdLineParser", "parser", "=", "new", "CmdLineParser", "(", "this", ",", "ParserProperties", ".", "defaults", "(", ")", ".", ...
Create and start Elasticsearch cluster with arguments. @param args artuments for starting a cluster
[ "Create", "and", "start", "Elasticsearch", "cluster", "with", "arguments", "." ]
3fff827dcef95cb2854ee1a95022eafe0ce867f3
https://github.com/codelibs/elasticsearch-cluster-runner/blob/3fff827dcef95cb2854ee1a95022eafe0ce867f3/src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java#L324-L378
train
codelibs/elasticsearch-cluster-runner
src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java
ElasticsearchClusterRunner.getNode
public Node getNode(final int i) { if (i < 0 || i >= nodeList.size()) { return null; } return nodeList.get(i); }
java
public Node getNode(final int i) { if (i < 0 || i >= nodeList.size()) { return null; } return nodeList.get(i); }
[ "public", "Node", "getNode", "(", "final", "int", "i", ")", "{", "if", "(", "i", "<", "0", "||", "i", ">=", "nodeList", ".", "size", "(", ")", ")", "{", "return", "null", ";", "}", "return", "nodeList", ".", "get", "(", "i", ")", ";", "}" ]
Return a node by the node index. @param i A node index @return null if the node is not found
[ "Return", "a", "node", "by", "the", "node", "index", "." ]
3fff827dcef95cb2854ee1a95022eafe0ce867f3
https://github.com/codelibs/elasticsearch-cluster-runner/blob/3fff827dcef95cb2854ee1a95022eafe0ce867f3/src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java#L537-L542
train
codelibs/elasticsearch-cluster-runner
src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java
ElasticsearchClusterRunner.startNode
@SuppressWarnings("resource") public boolean startNode(final int i) { if (i >= nodeList.size()) { return false; } if (!nodeList.get(i).isClosed()) { return false; } final Node node = new ClusterRunnerNode(envList.get(i), pluginList); try { ...
java
@SuppressWarnings("resource") public boolean startNode(final int i) { if (i >= nodeList.size()) { return false; } if (!nodeList.get(i).isClosed()) { return false; } final Node node = new ClusterRunnerNode(envList.get(i), pluginList); try { ...
[ "@", "SuppressWarnings", "(", "\"resource\"", ")", "public", "boolean", "startNode", "(", "final", "int", "i", ")", "{", "if", "(", "i", ">=", "nodeList", ".", "size", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "nodeList", ".", ...
Start a closed node. @param i the number of nodes @return true if the node is started.
[ "Start", "a", "closed", "node", "." ]
3fff827dcef95cb2854ee1a95022eafe0ce867f3
https://github.com/codelibs/elasticsearch-cluster-runner/blob/3fff827dcef95cb2854ee1a95022eafe0ce867f3/src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java#L550-L567
train
codelibs/elasticsearch-cluster-runner
src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java
ElasticsearchClusterRunner.getNode
public Node getNode(final String name) { if (name == null) { return null; } for (final Node node : nodeList) { if (name.equals(node.settings().get(NODE_NAME))) { return node; } } return null; }
java
public Node getNode(final String name) { if (name == null) { return null; } for (final Node node : nodeList) { if (name.equals(node.settings().get(NODE_NAME))) { return node; } } return null; }
[ "public", "Node", "getNode", "(", "final", "String", "name", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "null", ";", "}", "for", "(", "final", "Node", "node", ":", "nodeList", ")", "{", "if", "(", "name", ".", "equals", "(", "...
Return a node by the name. @param name A node name @return null if the node is not found by the name
[ "Return", "a", "node", "by", "the", "name", "." ]
3fff827dcef95cb2854ee1a95022eafe0ce867f3
https://github.com/codelibs/elasticsearch-cluster-runner/blob/3fff827dcef95cb2854ee1a95022eafe0ce867f3/src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java#L575-L585
train
codelibs/elasticsearch-cluster-runner
src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java
ElasticsearchClusterRunner.getNodeIndex
public int getNodeIndex(final Node node) { for (int i = 0; i < nodeList.size(); i++) { if (nodeList.get(i).equals(node)) { return i; } } return -1; }
java
public int getNodeIndex(final Node node) { for (int i = 0; i < nodeList.size(); i++) { if (nodeList.get(i).equals(node)) { return i; } } return -1; }
[ "public", "int", "getNodeIndex", "(", "final", "Node", "node", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nodeList", ".", "size", "(", ")", ";", "i", "++", ")", "{", "if", "(", "nodeList", ".", "get", "(", "i", ")", ".", "equ...
Return a node index. @param node node to check an index @return -1 if the node does not exist.
[ "Return", "a", "node", "index", "." ]
3fff827dcef95cb2854ee1a95022eafe0ce867f3
https://github.com/codelibs/elasticsearch-cluster-runner/blob/3fff827dcef95cb2854ee1a95022eafe0ce867f3/src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java#L593-L600
train
codelibs/elasticsearch-cluster-runner
src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java
ElasticsearchClusterRunner.masterNode
public synchronized Node masterNode() { final ClusterState state = client().admin().cluster().prepareState().execute().actionGet().getState(); final String name = state.nodes().getMasterNode().getName(); return getNode(name); }
java
public synchronized Node masterNode() { final ClusterState state = client().admin().cluster().prepareState().execute().actionGet().getState(); final String name = state.nodes().getMasterNode().getName(); return getNode(name); }
[ "public", "synchronized", "Node", "masterNode", "(", ")", "{", "final", "ClusterState", "state", "=", "client", "(", ")", ".", "admin", "(", ")", ".", "cluster", "(", ")", ".", "prepareState", "(", ")", ".", "execute", "(", ")", ".", "actionGet", "(", ...
Return a master node. @return master node
[ "Return", "a", "master", "node", "." ]
3fff827dcef95cb2854ee1a95022eafe0ce867f3
https://github.com/codelibs/elasticsearch-cluster-runner/blob/3fff827dcef95cb2854ee1a95022eafe0ce867f3/src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java#L649-L653
train
codelibs/elasticsearch-cluster-runner
src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java
ElasticsearchClusterRunner.nonMasterNode
public synchronized Node nonMasterNode() { final ClusterState state = client().admin().cluster().prepareState().execute().actionGet().getState(); final String name = state.nodes().getMasterNode().getName(); for (final Node node : nodeList) { if (!node.isClosed() && !name.equals(node....
java
public synchronized Node nonMasterNode() { final ClusterState state = client().admin().cluster().prepareState().execute().actionGet().getState(); final String name = state.nodes().getMasterNode().getName(); for (final Node node : nodeList) { if (!node.isClosed() && !name.equals(node....
[ "public", "synchronized", "Node", "nonMasterNode", "(", ")", "{", "final", "ClusterState", "state", "=", "client", "(", ")", ".", "admin", "(", ")", ".", "cluster", "(", ")", ".", "prepareState", "(", ")", ".", "execute", "(", ")", ".", "actionGet", "(...
Return a non-master node. @return non-master node
[ "Return", "a", "non", "-", "master", "node", "." ]
3fff827dcef95cb2854ee1a95022eafe0ce867f3
https://github.com/codelibs/elasticsearch-cluster-runner/blob/3fff827dcef95cb2854ee1a95022eafe0ce867f3/src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java#L660-L669
train
codelibs/elasticsearch-cluster-runner
src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java
ElasticsearchClusterRunner.ensureGreen
public ClusterHealthStatus ensureGreen(final String... indices) { final ClusterHealthResponse actionGet = client().admin().cluster().health( Requests.clusterHealthRequest(indices).waitForGreenStatus().waitForEvents(Priority.LANGUID).waitForNoRelocatingShards(true)) .actionGet(); ...
java
public ClusterHealthStatus ensureGreen(final String... indices) { final ClusterHealthResponse actionGet = client().admin().cluster().health( Requests.clusterHealthRequest(indices).waitForGreenStatus().waitForEvents(Priority.LANGUID).waitForNoRelocatingShards(true)) .actionGet(); ...
[ "public", "ClusterHealthStatus", "ensureGreen", "(", "final", "String", "...", "indices", ")", "{", "final", "ClusterHealthResponse", "actionGet", "=", "client", "(", ")", ".", "admin", "(", ")", ".", "cluster", "(", ")", ".", "health", "(", "Requests", ".",...
Wait for green state of a cluster. @param indices indices to check status @return cluster health status
[ "Wait", "for", "green", "state", "of", "a", "cluster", "." ]
3fff827dcef95cb2854ee1a95022eafe0ce867f3
https://github.com/codelibs/elasticsearch-cluster-runner/blob/3fff827dcef95cb2854ee1a95022eafe0ce867f3/src/main/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunner.java#L695-L704
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/MongoDBUtils.java
MongoDBUtils.connect
public void connect() throws DBException { try { LOGGER.debug("Initializing MongoDB client"); mongoClient = new MongoClient(this.host, this.port); } catch (UnknownHostException e) { throw new DBException(e.toString()); } }
java
public void connect() throws DBException { try { LOGGER.debug("Initializing MongoDB client"); mongoClient = new MongoClient(this.host, this.port); } catch (UnknownHostException e) { throw new DBException(e.toString()); } }
[ "public", "void", "connect", "(", ")", "throws", "DBException", "{", "try", "{", "LOGGER", ".", "debug", "(", "\"Initializing MongoDB client\"", ")", ";", "mongoClient", "=", "new", "MongoClient", "(", "this", ".", "host", ",", "this", ".", "port", ")", ";...
Connect to MongoDB Host. @throws DBException
[ "Connect", "to", "MongoDB", "Host", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/MongoDBUtils.java#L61-L69
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/MongoDBUtils.java
MongoDBUtils.exitsMongoDbDataBase
public boolean exitsMongoDbDataBase(String dataBaseName) { List<String> dataBaseList = mongoClient.getDatabaseNames(); return dataBaseList.contains(dataBaseName); }
java
public boolean exitsMongoDbDataBase(String dataBaseName) { List<String> dataBaseList = mongoClient.getDatabaseNames(); return dataBaseList.contains(dataBaseName); }
[ "public", "boolean", "exitsMongoDbDataBase", "(", "String", "dataBaseName", ")", "{", "List", "<", "String", ">", "dataBaseList", "=", "mongoClient", ".", "getDatabaseNames", "(", ")", ";", "return", "dataBaseList", ".", "contains", "(", "dataBaseName", ")", ";"...
Checks if a database exists in MongoDB. @param dataBaseName @return boolean
[ "Checks", "if", "a", "database", "exists", "in", "MongoDB", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/MongoDBUtils.java#L93-L96
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/MongoDBUtils.java
MongoDBUtils.createMongoDBCollection
public void createMongoDBCollection(String colectionName, DataTable options) { BasicDBObject aux = new BasicDBObject(); // Recorremos las options para castearlas y añadirlas a la collection List<List<String>> rowsOp = options.raw(); for (int i = 0; i < rowsOp.size(); i++) { L...
java
public void createMongoDBCollection(String colectionName, DataTable options) { BasicDBObject aux = new BasicDBObject(); // Recorremos las options para castearlas y añadirlas a la collection List<List<String>> rowsOp = options.raw(); for (int i = 0; i < rowsOp.size(); i++) { L...
[ "public", "void", "createMongoDBCollection", "(", "String", "colectionName", ",", "DataTable", "options", ")", "{", "BasicDBObject", "aux", "=", "new", "BasicDBObject", "(", ")", ";", "// Recorremos las options para castearlas y añadirlas a la collection", "List", "<", "L...
Create a MongoDB collection. @param colectionName @param options
[ "Create", "a", "MongoDB", "collection", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/MongoDBUtils.java#L133-L148
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/MongoDBUtils.java
MongoDBUtils.dropAllDataMongoDBCollection
public void dropAllDataMongoDBCollection(String collectionName) { DBCollection db = getMongoDBCollection(collectionName); DBCursor objectsList = db.find(); try { while (objectsList.hasNext()) { db.remove(objectsList.next()); } } finally { ...
java
public void dropAllDataMongoDBCollection(String collectionName) { DBCollection db = getMongoDBCollection(collectionName); DBCursor objectsList = db.find(); try { while (objectsList.hasNext()) { db.remove(objectsList.next()); } } finally { ...
[ "public", "void", "dropAllDataMongoDBCollection", "(", "String", "collectionName", ")", "{", "DBCollection", "db", "=", "getMongoDBCollection", "(", "collectionName", ")", ";", "DBCursor", "objectsList", "=", "db", ".", "find", "(", ")", ";", "try", "{", "while"...
Drop all the data associated to a MongoDB Collection. @param collectionName
[ "Drop", "all", "the", "data", "associated", "to", "a", "MongoDB", "Collection", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/MongoDBUtils.java#L182-L192
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/MongoDBUtils.java
MongoDBUtils.insertIntoMongoDBCollection
public void insertIntoMongoDBCollection(String collection, DataTable table) { // Primero pasamos la fila del datatable a un hashmap de ColumnName-Type List<String[]> colRel = coltoArrayList(table); // Vamos insertando fila a fila for (int i = 1; i < table.raw().size(); i++) { ...
java
public void insertIntoMongoDBCollection(String collection, DataTable table) { // Primero pasamos la fila del datatable a un hashmap de ColumnName-Type List<String[]> colRel = coltoArrayList(table); // Vamos insertando fila a fila for (int i = 1; i < table.raw().size(); i++) { ...
[ "public", "void", "insertIntoMongoDBCollection", "(", "String", "collection", ",", "DataTable", "table", ")", "{", "// Primero pasamos la fila del datatable a un hashmap de ColumnName-Type", "List", "<", "String", "[", "]", ">", "colRel", "=", "coltoArrayList", "(", "tabl...
Insert data in a MongoDB Collection. @param collection @param table
[ "Insert", "data", "in", "a", "MongoDB", "Collection", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/MongoDBUtils.java#L200-L215
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/MongoDBUtils.java
MongoDBUtils.insertDocIntoMongoDBCollection
public void insertDocIntoMongoDBCollection(String collection, String document) { DBObject dbObject = (DBObject) JSON.parse(document); this.dataBase.getCollection(collection).insert(dbObject); }
java
public void insertDocIntoMongoDBCollection(String collection, String document) { DBObject dbObject = (DBObject) JSON.parse(document); this.dataBase.getCollection(collection).insert(dbObject); }
[ "public", "void", "insertDocIntoMongoDBCollection", "(", "String", "collection", ",", "String", "document", ")", "{", "DBObject", "dbObject", "=", "(", "DBObject", ")", "JSON", ".", "parse", "(", "document", ")", ";", "this", ".", "dataBase", ".", "getCollecti...
Insert document in a MongoDB Collection. @param collection @param document
[ "Insert", "document", "in", "a", "MongoDB", "Collection", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/MongoDBUtils.java#L223-L228
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/MongoDBUtils.java
MongoDBUtils.readFromMongoDBCollection
public List<DBObject> readFromMongoDBCollection(String collection, DataTable table) { List<DBObject> res = new ArrayList<DBObject>(); List<String[]> colRel = coltoArrayList(table); DBCollection aux = this.dataBase.getCollection(collection); ...
java
public List<DBObject> readFromMongoDBCollection(String collection, DataTable table) { List<DBObject> res = new ArrayList<DBObject>(); List<String[]> colRel = coltoArrayList(table); DBCollection aux = this.dataBase.getCollection(collection); ...
[ "public", "List", "<", "DBObject", ">", "readFromMongoDBCollection", "(", "String", "collection", ",", "DataTable", "table", ")", "{", "List", "<", "DBObject", ">", "res", "=", "new", "ArrayList", "<", "DBObject", ">", "(", ")", ";", "List", "<", "String",...
Read data from a MongoDB collection. @param collection @param table @return {@code List<DBObjects>}
[ "Read", "data", "from", "a", "MongoDB", "collection", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/MongoDBUtils.java#L237-L262
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java
ElasticSearchUtils.setSettings
public void setSettings(LinkedHashMap<String, Object> settings) { Settings.Builder builder = Settings.settingsBuilder(); for (Map.Entry<String, Object> entry : settings.entrySet()) { builder.put(entry.getKey(), entry.getValue()); } this.settings = builder.build(); }
java
public void setSettings(LinkedHashMap<String, Object> settings) { Settings.Builder builder = Settings.settingsBuilder(); for (Map.Entry<String, Object> entry : settings.entrySet()) { builder.put(entry.getKey(), entry.getValue()); } this.settings = builder.build(); }
[ "public", "void", "setSettings", "(", "LinkedHashMap", "<", "String", ",", "Object", ">", "settings", ")", "{", "Settings", ".", "Builder", "builder", "=", "Settings", ".", "settingsBuilder", "(", ")", ";", "for", "(", "Map", ".", "Entry", "<", "String", ...
Set settings about ES connector. @param settings : LinkedHashMap with all the settings about ES connection
[ "Set", "settings", "about", "ES", "connector", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java#L76-L82
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java
ElasticSearchUtils.connect
public void connect() throws java.net.UnknownHostException { this.client = TransportClient.builder().settings(this.settings).build() .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(this.es_host), this.es_native_port)); }
java
public void connect() throws java.net.UnknownHostException { this.client = TransportClient.builder().settings(this.settings).build() .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(this.es_host), this.es_native_port)); }
[ "public", "void", "connect", "(", ")", "throws", "java", ".", "net", ".", "UnknownHostException", "{", "this", ".", "client", "=", "TransportClient", ".", "builder", "(", ")", ".", "settings", "(", "this", ".", "settings", ")", ".", "build", "(", ")", ...
Connect to ES.
[ "Connect", "to", "ES", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java#L95-L99
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java
ElasticSearchUtils.createSingleIndex
public boolean createSingleIndex(String indexName) throws ElasticsearchException { CreateIndexRequest indexRequest = new CreateIndexRequest(indexName); CreateIndexResponse res = this.client.admin().indices().create(indexRequest).actionGet(); return indexExists(indexName); }
java
public boolean createSingleIndex(String indexName) throws ElasticsearchException { CreateIndexRequest indexRequest = new CreateIndexRequest(indexName); CreateIndexResponse res = this.client.admin().indices().create(indexRequest).actionGet(); return indexExists(indexName); }
[ "public", "boolean", "createSingleIndex", "(", "String", "indexName", ")", "throws", "ElasticsearchException", "{", "CreateIndexRequest", "indexRequest", "=", "new", "CreateIndexRequest", "(", "indexName", ")", ";", "CreateIndexResponse", "res", "=", "this", ".", "cli...
Create an ES Index. @param indexName @return true if the index has been created and false if the index has not been created. @throws ElasticsearchException
[ "Create", "an", "ES", "Index", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java#L118-L123
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java
ElasticSearchUtils.dropSingleIndex
public boolean dropSingleIndex(String indexName) throws ElasticsearchException { DeleteIndexRequest deleteIndexRequest = new DeleteIndexRequest(indexName); DeleteIndexResponse res = this.client.admin().indices().delete(deleteIndexRequest).actionGet(); return indexExists(indexName); ...
java
public boolean dropSingleIndex(String indexName) throws ElasticsearchException { DeleteIndexRequest deleteIndexRequest = new DeleteIndexRequest(indexName); DeleteIndexResponse res = this.client.admin().indices().delete(deleteIndexRequest).actionGet(); return indexExists(indexName); ...
[ "public", "boolean", "dropSingleIndex", "(", "String", "indexName", ")", "throws", "ElasticsearchException", "{", "DeleteIndexRequest", "deleteIndexRequest", "=", "new", "DeleteIndexRequest", "(", "indexName", ")", ";", "DeleteIndexResponse", "res", "=", "this", ".", ...
Drop an ES Index @param indexName @return true if the index exists @throws ElasticsearchException
[ "Drop", "an", "ES", "Index" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java#L132-L137
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java
ElasticSearchUtils.indexExists
public boolean indexExists(String indexName) { return this.client.admin().indices().prepareExists(indexName).execute().actionGet().isExists(); }
java
public boolean indexExists(String indexName) { return this.client.admin().indices().prepareExists(indexName).execute().actionGet().isExists(); }
[ "public", "boolean", "indexExists", "(", "String", "indexName", ")", "{", "return", "this", ".", "client", ".", "admin", "(", ")", ".", "indices", "(", ")", ".", "prepareExists", "(", "indexName", ")", ".", "execute", "(", ")", ".", "actionGet", "(", "...
Check if an index exists in ES @param indexName @return true if the index exists or false if the index does not exits.
[ "Check", "if", "an", "index", "exists", "in", "ES" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java#L161-L163
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java
ElasticSearchUtils.createMapping
public void createMapping(String indexName, String mappingName, ArrayList<XContentBuilder> mappingSource) { IndicesExistsResponse existsResponse = this.client.admin().indices().prepareExists(indexName).execute() .actionGet(); //If the index does not exists, it will be created without opt...
java
public void createMapping(String indexName, String mappingName, ArrayList<XContentBuilder> mappingSource) { IndicesExistsResponse existsResponse = this.client.admin().indices().prepareExists(indexName).execute() .actionGet(); //If the index does not exists, it will be created without opt...
[ "public", "void", "createMapping", "(", "String", "indexName", ",", "String", "mappingName", ",", "ArrayList", "<", "XContentBuilder", ">", "mappingSource", ")", "{", "IndicesExistsResponse", "existsResponse", "=", "this", ".", "client", ".", "admin", "(", ")", ...
Create a mapping over an index @param indexName @param mappingName @param mappingSource the data that has to be inserted in the mapping.
[ "Create", "a", "mapping", "over", "an", "index" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java#L172-L191
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java
ElasticSearchUtils.existsMapping
public boolean existsMapping(String indexName, String mappingName) { ClusterStateResponse resp = this.client.admin().cluster().prepareState().execute().actionGet(); if (resp.getState().getMetaData().index(indexName) == null) { return false; } ImmutableOpenMap<String, Mapping...
java
public boolean existsMapping(String indexName, String mappingName) { ClusterStateResponse resp = this.client.admin().cluster().prepareState().execute().actionGet(); if (resp.getState().getMetaData().index(indexName) == null) { return false; } ImmutableOpenMap<String, Mapping...
[ "public", "boolean", "existsMapping", "(", "String", "indexName", ",", "String", "mappingName", ")", "{", "ClusterStateResponse", "resp", "=", "this", ".", "client", ".", "admin", "(", ")", ".", "cluster", "(", ")", ".", "prepareState", "(", ")", ".", "exe...
Check if a mapping exists in an expecific index. @param indexName @param mappingName @return true if the mapping exists and false in other case
[ "Check", "if", "a", "mapping", "exists", "in", "an", "expecific", "index", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java#L200-L212
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java
ElasticSearchUtils.indexDocument
public void indexDocument(String indexName, String mappingName, String id, XContentBuilder document) throws Exception { client.prepareIndex(indexName, mappingName, id).setSource(document).get(); }
java
public void indexDocument(String indexName, String mappingName, String id, XContentBuilder document) throws Exception { client.prepareIndex(indexName, mappingName, id).setSource(document).get(); }
[ "public", "void", "indexDocument", "(", "String", "indexName", ",", "String", "mappingName", ",", "String", "id", ",", "XContentBuilder", "document", ")", "throws", "Exception", "{", "client", ".", "prepareIndex", "(", "indexName", ",", "mappingName", ",", "id",...
Indexes a document. @param indexName @param mappingName @param id unique identifier of the document @param document @throws Exception
[ "Indexes", "a", "document", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java#L273-L276
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java
ElasticSearchUtils.deleteDocument
public void deleteDocument(String indexName, String mappingName, String id) { client.prepareDelete(indexName, mappingName, id).get(); }
java
public void deleteDocument(String indexName, String mappingName, String id) { client.prepareDelete(indexName, mappingName, id).get(); }
[ "public", "void", "deleteDocument", "(", "String", "indexName", ",", "String", "mappingName", ",", "String", "id", ")", "{", "client", ".", "prepareDelete", "(", "indexName", ",", "mappingName", ",", "id", ")", ".", "get", "(", ")", ";", "}" ]
Deletes a document by its id. @param indexName @param mappingName @param id
[ "Deletes", "a", "document", "by", "its", "id", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java#L285-L287
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/HookGSpec.java
HookGSpec.seleniumTeardown
@After(order = ORDER_20, value = {"@mobile or @web"}) public void seleniumTeardown() { if (commonspec.getDriver() != null) { commonspec.getLogger().debug("Shutdown Selenium client"); commonspec.getDriver().close(); commonspec.getDriver().quit(); } }
java
@After(order = ORDER_20, value = {"@mobile or @web"}) public void seleniumTeardown() { if (commonspec.getDriver() != null) { commonspec.getLogger().debug("Shutdown Selenium client"); commonspec.getDriver().close(); commonspec.getDriver().quit(); } }
[ "@", "After", "(", "order", "=", "ORDER_20", ",", "value", "=", "{", "\"@mobile or @web\"", "}", ")", "public", "void", "seleniumTeardown", "(", ")", "{", "if", "(", "commonspec", ".", "getDriver", "(", ")", "!=", "null", ")", "{", "commonspec", ".", "...
Close selenium web driver.
[ "Close", "selenium", "web", "driver", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/HookGSpec.java#L230-L237
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/ThreadProperty.java
ThreadProperty.set
public static void set(String key, String value) { PROPS.get().setProperty(key, value); }
java
public static void set(String key, String value) { PROPS.get().setProperty(key, value); }
[ "public", "static", "void", "set", "(", "String", "key", ",", "String", "value", ")", "{", "PROPS", ".", "get", "(", ")", ".", "setProperty", "(", "key", ",", "value", ")", ";", "}" ]
Set a string to share in other class. @param key @param value
[ "Set", "a", "string", "to", "share", "in", "other", "class", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/ThreadProperty.java#L40-L42
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/KafkaSpec.java
KafkaSpec.connectKafka
@Given("^I connect to kafka at '(.+)' using path '(.+)'$") public void connectKafka(String zkHost, String zkPath) throws UnknownHostException { String zkPort = zkHost.split(":")[1]; zkHost = zkHost.split(":")[0]; commonspec.getKafkaUtils().setZkHost(zkHost, zkPort, zkPath); commonspe...
java
@Given("^I connect to kafka at '(.+)' using path '(.+)'$") public void connectKafka(String zkHost, String zkPath) throws UnknownHostException { String zkPort = zkHost.split(":")[1]; zkHost = zkHost.split(":")[0]; commonspec.getKafkaUtils().setZkHost(zkHost, zkPort, zkPath); commonspe...
[ "@", "Given", "(", "\"^I connect to kafka at '(.+)' using path '(.+)'$\"", ")", "public", "void", "connectKafka", "(", "String", "zkHost", ",", "String", "zkPath", ")", "throws", "UnknownHostException", "{", "String", "zkPort", "=", "zkHost", ".", "split", "(", "\":...
Connect to Kafka. @param zkHost ZK host @param zkPath ZK port @throws UnknownHostException exception
[ "Connect", "to", "Kafka", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/KafkaSpec.java#L49-L55
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/KafkaSpec.java
KafkaSpec.topicToFile
@When("^I copy the kafka topic '(.*?)' to file '(.*?)' with headers '(.*?)'$") public void topicToFile(String topic_name, String filename, String header) throws Exception { commonspec.getKafkaUtils().resultsToFile(topic_name, filename, header); }
java
@When("^I copy the kafka topic '(.*?)' to file '(.*?)' with headers '(.*?)'$") public void topicToFile(String topic_name, String filename, String header) throws Exception { commonspec.getKafkaUtils().resultsToFile(topic_name, filename, header); }
[ "@", "When", "(", "\"^I copy the kafka topic '(.*?)' to file '(.*?)' with headers '(.*?)'$\"", ")", "public", "void", "topicToFile", "(", "String", "topic_name", ",", "String", "filename", ",", "String", "header", ")", "throws", "Exception", "{", "commonspec", ".", "get...
Copy Kafka Topic content to file @param topic_name @param filename @param header @throws Exception
[ "Copy", "Kafka", "Topic", "content", "to", "file" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/KafkaSpec.java#L85-L88
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/KafkaSpec.java
KafkaSpec.modifyPartitions
@When("^I increase '(.+?)' partitions in a Kafka topic named '(.+?)'") public void modifyPartitions(int numPartitions, String topic_name) throws Exception { commonspec.getKafkaUtils().modifyTopicPartitioning(topic_name, numPartitions); }
java
@When("^I increase '(.+?)' partitions in a Kafka topic named '(.+?)'") public void modifyPartitions(int numPartitions, String topic_name) throws Exception { commonspec.getKafkaUtils().modifyTopicPartitioning(topic_name, numPartitions); }
[ "@", "When", "(", "\"^I increase '(.+?)' partitions in a Kafka topic named '(.+?)'\"", ")", "public", "void", "modifyPartitions", "(", "int", "numPartitions", ",", "String", "topic_name", ")", "throws", "Exception", "{", "commonspec", ".", "getKafkaUtils", "(", ")", "."...
Modify partitions in a Kafka topic. @param topic_name topic name @param numPartitions number of partitions
[ "Modify", "partitions", "in", "a", "Kafka", "topic", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/KafkaSpec.java#L96-L99
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/KafkaSpec.java
KafkaSpec.sendAMessage
@When("^I send a message '(.+?)' to the kafka topic named '(.+?)'") public void sendAMessage(String message, String topic_name) throws Exception { commonspec.getKafkaUtils().sendMessage(message, topic_name); }
java
@When("^I send a message '(.+?)' to the kafka topic named '(.+?)'") public void sendAMessage(String message, String topic_name) throws Exception { commonspec.getKafkaUtils().sendMessage(message, topic_name); }
[ "@", "When", "(", "\"^I send a message '(.+?)' to the kafka topic named '(.+?)'\"", ")", "public", "void", "sendAMessage", "(", "String", "message", ",", "String", "topic_name", ")", "throws", "Exception", "{", "commonspec", ".", "getKafkaUtils", "(", ")", ".", "sendM...
Sending a message in a Kafka topic. @param topic_name topic name @param message string that you send to topic
[ "Sending", "a", "message", "in", "a", "Kafka", "topic", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/KafkaSpec.java#L108-L111
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/KafkaSpec.java
KafkaSpec.kafkaTopicExist
@Then("^A kafka topic named '(.+?)' exists") public void kafkaTopicExist(String topic_name) throws KeeperException, InterruptedException { assert commonspec.getKafkaUtils().getZkUtils().pathExists("/" + topic_name) : "There is no topic with that name"; }
java
@Then("^A kafka topic named '(.+?)' exists") public void kafkaTopicExist(String topic_name) throws KeeperException, InterruptedException { assert commonspec.getKafkaUtils().getZkUtils().pathExists("/" + topic_name) : "There is no topic with that name"; }
[ "@", "Then", "(", "\"^A kafka topic named '(.+?)' exists\"", ")", "public", "void", "kafkaTopicExist", "(", "String", "topic_name", ")", "throws", "KeeperException", ",", "InterruptedException", "{", "assert", "commonspec", ".", "getKafkaUtils", "(", ")", ".", "getZkU...
Check that a kafka topic exist @param topic_name name of topic
[ "Check", "that", "a", "kafka", "topic", "exist" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/KafkaSpec.java#L118-L121
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/KafkaSpec.java
KafkaSpec.checkNumberOfPartitions
@Then("^The number of partitions in topic '(.+?)' should be '(.+?)''?$") public void checkNumberOfPartitions(String topic_name, int numOfPartitions) throws Exception { Assertions.assertThat(commonspec.getKafkaUtils().getPartitions(topic_name)).isEqualTo(numOfPartitions); }
java
@Then("^The number of partitions in topic '(.+?)' should be '(.+?)''?$") public void checkNumberOfPartitions(String topic_name, int numOfPartitions) throws Exception { Assertions.assertThat(commonspec.getKafkaUtils().getPartitions(topic_name)).isEqualTo(numOfPartitions); }
[ "@", "Then", "(", "\"^The number of partitions in topic '(.+?)' should be '(.+?)''?$\"", ")", "public", "void", "checkNumberOfPartitions", "(", "String", "topic_name", ",", "int", "numOfPartitions", ")", "throws", "Exception", "{", "Assertions", ".", "assertThat", "(", "c...
Check that the number of partitions is like expected. @param topic_name Name of kafka topic @param numOfPartitions Number of partitions @throws Exception
[ "Check", "that", "the", "number", "of", "partitions", "is", "like", "expected", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/KafkaSpec.java#L140-L144
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/SeleniumSpec.java
SeleniumSpec.seleniumIdFrame
@Given("^I switch to iframe with '([^:]*?):(.+?)'$") public void seleniumIdFrame(String method, String idframe) throws IllegalAccessException, NoSuchFieldException, ClassNotFoundException { assertThat(commonspec.locateElement(method, idframe, 1)); if (method.equals("id") || method.equals("name")) {...
java
@Given("^I switch to iframe with '([^:]*?):(.+?)'$") public void seleniumIdFrame(String method, String idframe) throws IllegalAccessException, NoSuchFieldException, ClassNotFoundException { assertThat(commonspec.locateElement(method, idframe, 1)); if (method.equals("id") || method.equals("name")) {...
[ "@", "Given", "(", "\"^I switch to iframe with '([^:]*?):(.+?)'$\"", ")", "public", "void", "seleniumIdFrame", "(", "String", "method", ",", "String", "idframe", ")", "throws", "IllegalAccessException", ",", "NoSuchFieldException", ",", "ClassNotFoundException", "{", "ass...
Swith to the iFrame where id matches idframe @param idframe iframe to swith to @throws IllegalAccessException exception @throws NoSuchFieldException exception @throws ClassNotFoundException exception
[ "Swith", "to", "the", "iFrame", "where", "id", "matches", "idframe" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/SeleniumSpec.java#L132-L141
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/SeleniumSpec.java
SeleniumSpec.seleniumGetwindows
@Given("^a new window is opened$") public void seleniumGetwindows() { Set<String> wel = commonspec.getDriver().getWindowHandles(); Assertions.assertThat(wel).as("Element count doesnt match").hasSize(2); }
java
@Given("^a new window is opened$") public void seleniumGetwindows() { Set<String> wel = commonspec.getDriver().getWindowHandles(); Assertions.assertThat(wel).as("Element count doesnt match").hasSize(2); }
[ "@", "Given", "(", "\"^a new window is opened$\"", ")", "public", "void", "seleniumGetwindows", "(", ")", "{", "Set", "<", "String", ">", "wel", "=", "commonspec", ".", "getDriver", "(", ")", ".", "getWindowHandles", "(", ")", ";", "Assertions", ".", "assert...
Get all opened windows and store it.
[ "Get", "all", "opened", "windows", "and", "store", "it", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/SeleniumSpec.java#L162-L167
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/SeleniumSpec.java
SeleniumSpec.seleniumDrag
@When("^I drag '([^:]*?):(.+?)' and drop it to '([^:]*?):(.+?)'$") public void seleniumDrag(String smethod, String source, String dmethod, String destination) throws ClassNotFoundException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { Actions builder = new Acti...
java
@When("^I drag '([^:]*?):(.+?)' and drop it to '([^:]*?):(.+?)'$") public void seleniumDrag(String smethod, String source, String dmethod, String destination) throws ClassNotFoundException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { Actions builder = new Acti...
[ "@", "When", "(", "\"^I drag '([^:]*?):(.+?)' and drop it to '([^:]*?):(.+?)'$\"", ")", "public", "void", "seleniumDrag", "(", "String", "smethod", ",", "String", "source", ",", "String", "dmethod", ",", "String", "destination", ")", "throws", "ClassNotFoundException", ...
Searchs for two webelements dragging the first one to the second @param source @param destination @throws IllegalAccessException @throws IllegalArgumentException @throws SecurityException @throws NoSuchFieldException @throws ClassNotFoundException
[ "Searchs", "for", "two", "webelements", "dragging", "the", "first", "one", "to", "the", "second" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/SeleniumSpec.java#L180-L188
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/SeleniumSpec.java
SeleniumSpec.elementDeSelect
@When("^I de-select every item on the element on index '(\\d+?)'$") public void elementDeSelect(Integer index) { Select sel = null; sel = new Select(commonspec.getPreviousWebElements().getPreviousWebElements().get(index)); if (sel.isMultiple()) { sel.deselectAll(); } ...
java
@When("^I de-select every item on the element on index '(\\d+?)'$") public void elementDeSelect(Integer index) { Select sel = null; sel = new Select(commonspec.getPreviousWebElements().getPreviousWebElements().get(index)); if (sel.isMultiple()) { sel.deselectAll(); } ...
[ "@", "When", "(", "\"^I de-select every item on the element on index '(\\\\d+?)'$\"", ")", "public", "void", "elementDeSelect", "(", "Integer", "index", ")", "{", "Select", "sel", "=", "null", ";", "sel", "=", "new", "Select", "(", "commonspec", ".", "getPreviousWeb...
Choose no option from a select webelement found previously @param index
[ "Choose", "no", "option", "from", "a", "select", "webelement", "found", "previously" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/SeleniumSpec.java#L367-L375
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/SeleniumSpec.java
SeleniumSpec.seleniumChangeWindow
@When("^I change active window$") public void seleniumChangeWindow() { String originalWindowHandle = commonspec.getDriver().getWindowHandle(); Set<String> windowHandles = commonspec.getDriver().getWindowHandles(); for (String window : windowHandles) { if (!window.equals(original...
java
@When("^I change active window$") public void seleniumChangeWindow() { String originalWindowHandle = commonspec.getDriver().getWindowHandle(); Set<String> windowHandles = commonspec.getDriver().getWindowHandles(); for (String window : windowHandles) { if (!window.equals(original...
[ "@", "When", "(", "\"^I change active window$\"", ")", "public", "void", "seleniumChangeWindow", "(", ")", "{", "String", "originalWindowHandle", "=", "commonspec", ".", "getDriver", "(", ")", ".", "getWindowHandle", "(", ")", ";", "Set", "<", "String", ">", "...
Change current window to another opened window.
[ "Change", "current", "window", "to", "another", "opened", "window", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/SeleniumSpec.java#L380-L391
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/SeleniumSpec.java
SeleniumSpec.assertSeleniumTextInSource
@Then("^this text exists '(.+?)'$") public void assertSeleniumTextInSource(String text) { assertThat(this.commonspec, commonspec.getDriver()).as("Expected text not found at page").contains(text); }
java
@Then("^this text exists '(.+?)'$") public void assertSeleniumTextInSource(String text) { assertThat(this.commonspec, commonspec.getDriver()).as("Expected text not found at page").contains(text); }
[ "@", "Then", "(", "\"^this text exists '(.+?)'$\"", ")", "public", "void", "assertSeleniumTextInSource", "(", "String", "text", ")", "{", "assertThat", "(", "this", ".", "commonspec", ",", "commonspec", ".", "getDriver", "(", ")", ")", ".", "as", "(", "\"Expec...
Checks if a text exists in the source of an already loaded URL. @param text
[ "Checks", "if", "a", "text", "exists", "in", "the", "source", "of", "an", "already", "loaded", "URL", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/SeleniumSpec.java#L418-L421
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/SeleniumSpec.java
SeleniumSpec.checkURL
@Then("^we are in page '(.+?)'$") public void checkURL(String url) throws Exception { if (commonspec.getWebHost() == null) { throw new Exception("Web host has not been set"); } if (commonspec.getWebPort() == null) { throw new Exception("Web port has not been set"); ...
java
@Then("^we are in page '(.+?)'$") public void checkURL(String url) throws Exception { if (commonspec.getWebHost() == null) { throw new Exception("Web host has not been set"); } if (commonspec.getWebPort() == null) { throw new Exception("Web port has not been set"); ...
[ "@", "Then", "(", "\"^we are in page '(.+?)'$\"", ")", "public", "void", "checkURL", "(", "String", "url", ")", "throws", "Exception", "{", "if", "(", "commonspec", ".", "getWebHost", "(", ")", "==", "null", ")", "{", "throw", "new", "Exception", "(", "\"W...
Checks that we are in the URL passed @param url @throws Exception
[ "Checks", "that", "we", "are", "in", "the", "URL", "passed" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/SeleniumSpec.java#L552-L567
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/SeleniumSpec.java
SeleniumSpec.getDcosAcsAuthCookie
@Then("^I save selenium dcos acs auth cookie in variable '(.+?)'$") public void getDcosAcsAuthCookie(String envVar) throws Exception { if (commonspec.getSeleniumCookies() != null && commonspec.getSeleniumCookies().size() != 0) { for (Cookie cookie: commonspec.getSeleniumCookies()) { ...
java
@Then("^I save selenium dcos acs auth cookie in variable '(.+?)'$") public void getDcosAcsAuthCookie(String envVar) throws Exception { if (commonspec.getSeleniumCookies() != null && commonspec.getSeleniumCookies().size() != 0) { for (Cookie cookie: commonspec.getSeleniumCookies()) { ...
[ "@", "Then", "(", "\"^I save selenium dcos acs auth cookie in variable '(.+?)'$\"", ")", "public", "void", "getDcosAcsAuthCookie", "(", "String", "envVar", ")", "throws", "Exception", "{", "if", "(", "commonspec", ".", "getSeleniumCookies", "(", ")", "!=", "null", "&&...
Get dcos-auth-cookie
[ "Get", "dcos", "-", "auth", "-", "cookie" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/SeleniumSpec.java#L581-L594
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/SeleniumSpec.java
SeleniumSpec.checkIfCookieExists
@Then("^The cookie '(.+?)' exists in the saved cookies$") public void checkIfCookieExists(String cookieName) { Assertions.assertThat(commonspec.cookieExists(cookieName)).isEqualTo(true); }
java
@Then("^The cookie '(.+?)' exists in the saved cookies$") public void checkIfCookieExists(String cookieName) { Assertions.assertThat(commonspec.cookieExists(cookieName)).isEqualTo(true); }
[ "@", "Then", "(", "\"^The cookie '(.+?)' exists in the saved cookies$\"", ")", "public", "void", "checkIfCookieExists", "(", "String", "cookieName", ")", "{", "Assertions", ".", "assertThat", "(", "commonspec", ".", "cookieExists", "(", "cookieName", ")", ")", ".", ...
Check if a cookie exists @param cookieName string with the name of the cookie
[ "Check", "if", "a", "cookie", "exists" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/SeleniumSpec.java#L619-L623
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/SeleniumSpec.java
SeleniumSpec.getSeleniumCookiesSize
@Then("^I have '(.+?)' selenium cookies saved$") public void getSeleniumCookiesSize(int numberOfCookies) throws Exception { Assertions.assertThat(commonspec.getSeleniumCookies().size()).isEqualTo(numberOfCookies); }
java
@Then("^I have '(.+?)' selenium cookies saved$") public void getSeleniumCookiesSize(int numberOfCookies) throws Exception { Assertions.assertThat(commonspec.getSeleniumCookies().size()).isEqualTo(numberOfCookies); }
[ "@", "Then", "(", "\"^I have '(.+?)' selenium cookies saved$\"", ")", "public", "void", "getSeleniumCookiesSize", "(", "int", "numberOfCookies", ")", "throws", "Exception", "{", "Assertions", ".", "assertThat", "(", "commonspec", ".", "getSeleniumCookies", "(", ")", "...
Check if the length of the cookie set match with the number of cookies thas must be saved @param numberOfCookies number of cookies that must be saved
[ "Check", "if", "the", "length", "of", "the", "cookie", "set", "match", "with", "the", "number", "of", "cookies", "thas", "must", "be", "saved" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/SeleniumSpec.java#L629-L632
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/SeleniumSpec.java
SeleniumSpec.saveContentWebElementInEnvVar
@Then("^I save content of element in index '(\\d+?)' in environment variable '(.+?)'$") public void saveContentWebElementInEnvVar(Integer index, String envVar) { assertThat(this.commonspec, commonspec.getPreviousWebElements()).as("There are less found elements than required") .hasAtLeast(ind...
java
@Then("^I save content of element in index '(\\d+?)' in environment variable '(.+?)'$") public void saveContentWebElementInEnvVar(Integer index, String envVar) { assertThat(this.commonspec, commonspec.getPreviousWebElements()).as("There are less found elements than required") .hasAtLeast(ind...
[ "@", "Then", "(", "\"^I save content of element in index '(\\\\d+?)' in environment variable '(.+?)'$\"", ")", "public", "void", "saveContentWebElementInEnvVar", "(", "Integer", "index", ",", "String", "envVar", ")", "{", "assertThat", "(", "this", ".", "commonspec", ",", ...
Takes the content of a webElement and stores it in the thread environment variable passed as parameter @param index position of the element in the array of webElements found @param envVar name of the thread environment variable where to store the text
[ "Takes", "the", "content", "of", "a", "webElement", "and", "stores", "it", "in", "the", "thread", "environment", "variable", "passed", "as", "parameter" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/SeleniumSpec.java#L640-L646
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/MiscSpec.java
MiscSpec.saveInEnvironment
@Given("^I save \'(.+?)\' in variable \'(.+?)\'$") public void saveInEnvironment(String value, String envVar) { ThreadProperty.set(envVar, value); }
java
@Given("^I save \'(.+?)\' in variable \'(.+?)\'$") public void saveInEnvironment(String value, String envVar) { ThreadProperty.set(envVar, value); }
[ "@", "Given", "(", "\"^I save \\'(.+?)\\' in variable \\'(.+?)\\'$\"", ")", "public", "void", "saveInEnvironment", "(", "String", "value", ",", "String", "envVar", ")", "{", "ThreadProperty", ".", "set", "(", "envVar", ",", "value", ")", ";", "}" ]
Save value for future use. @param value value to be saved @param envVar thread environment variable where to store the value
[ "Save", "value", "for", "future", "use", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/MiscSpec.java#L105-L108
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/MiscSpec.java
MiscSpec.sortElements
@When("^I sort elements in '(.+?)' by '(.+?)' criteria in '(.+?)' order$") public void sortElements(String envVar, String criteria, String order) { String value = ThreadProperty.get(envVar); JsonArray jsonArr = JsonValue.readHjson(value).asArray(); List<JsonValue> jsonValues = new ArrayLis...
java
@When("^I sort elements in '(.+?)' by '(.+?)' criteria in '(.+?)' order$") public void sortElements(String envVar, String criteria, String order) { String value = ThreadProperty.get(envVar); JsonArray jsonArr = JsonValue.readHjson(value).asArray(); List<JsonValue> jsonValues = new ArrayLis...
[ "@", "When", "(", "\"^I sort elements in '(.+?)' by '(.+?)' criteria in '(.+?)' order$\"", ")", "public", "void", "sortElements", "(", "String", "envVar", ",", "String", "criteria", ",", "String", "order", ")", "{", "String", "value", "=", "ThreadProperty", ".", "get"...
Sort elements in envVar by a criteria and order. @param envVar Environment variable to be sorted @param criteria alphabetical,... @param order ascending or descending
[ "Sort", "elements", "in", "envVar", "by", "a", "criteria", "and", "order", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/MiscSpec.java#L128-L165
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/MiscSpec.java
MiscSpec.assertExceptionNotThrown
@Then("^an exception '(.+?)' thrown( with class '(.+?)'( and message like '(.+?)')?)?") public void assertExceptionNotThrown(String exception, String foo, String clazz, String bar, String exceptionMsg) throws ClassNotFoundException { List<Exception> exceptions = commonspec.getExceptions(); ...
java
@Then("^an exception '(.+?)' thrown( with class '(.+?)'( and message like '(.+?)')?)?") public void assertExceptionNotThrown(String exception, String foo, String clazz, String bar, String exceptionMsg) throws ClassNotFoundException { List<Exception> exceptions = commonspec.getExceptions(); ...
[ "@", "Then", "(", "\"^an exception '(.+?)' thrown( with class '(.+?)'( and message like '(.+?)')?)?\"", ")", "public", "void", "assertExceptionNotThrown", "(", "String", "exception", ",", "String", "foo", ",", "String", "clazz", ",", "String", "bar", ",", "String", "excep...
Checks if an exception has been thrown. @param exception : "IS NOT" | "IS" @param foo @param clazz @param bar @param exceptionMsg
[ "Checks", "if", "an", "exception", "has", "been", "thrown", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/MiscSpec.java#L176-L195
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/RestSpec.java
RestSpec.sendRequest
@When("^I send a '(.+?)' request to '(.+?)'( with user and password '(.+:.+?)')? based on '([^:]+?)'( as '(json|string|gov)')? with:$") public void sendRequest(String requestType, String endPoint, String foo, String loginInfo, String baseData, String baz, String type, DataTable modifications) throws Exception { ...
java
@When("^I send a '(.+?)' request to '(.+?)'( with user and password '(.+:.+?)')? based on '([^:]+?)'( as '(json|string|gov)')? with:$") public void sendRequest(String requestType, String endPoint, String foo, String loginInfo, String baseData, String baz, String type, DataTable modifications) throws Exception { ...
[ "@", "When", "(", "\"^I send a '(.+?)' request to '(.+?)'( with user and password '(.+:.+?)')? based on '([^:]+?)'( as '(json|string|gov)')? with:$\"", ")", "public", "void", "sendRequest", "(", "String", "requestType", ",", "String", "endPoint", ",", "String", "foo", ",", "Strin...
Send a request of the type specified @param requestType type of request to be sent. Possible values: GET|DELETE|POST|PUT|CONNECT|PATCH|HEAD|OPTIONS|REQUEST|TRACE @param endPoint end point to be used @param foo parameter generated by cucumber because of the optional expression @param baseData path...
[ "Send", "a", "request", "of", "the", "type", "specified" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/RestSpec.java#L204-L227
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/RestSpec.java
RestSpec.sendRequestNoDataTable
@When("^I send a '(.+?)' request to '(.+?)'( with user and password '(.+:.+?)')?( based on '([^:]+?)')?( as '(json|string|gov)')?$") public void sendRequestNoDataTable(String requestType, String endPoint, String foo, String loginInfo, String bar, String baseData, String baz, String type) throws Exception { ...
java
@When("^I send a '(.+?)' request to '(.+?)'( with user and password '(.+:.+?)')?( based on '([^:]+?)')?( as '(json|string|gov)')?$") public void sendRequestNoDataTable(String requestType, String endPoint, String foo, String loginInfo, String bar, String baseData, String baz, String type) throws Exception { ...
[ "@", "When", "(", "\"^I send a '(.+?)' request to '(.+?)'( with user and password '(.+:.+?)')?( based on '([^:]+?)')?( as '(json|string|gov)')?$\"", ")", "public", "void", "sendRequestNoDataTable", "(", "String", "requestType", ",", "String", "endPoint", ",", "String", "foo", ",", ...
Same sendRequest, but in this case, we do not receive a data table with modifications. Besides, the data and request header are optional as well. In case we want to simulate sending a json request with empty data, we just to avoid baseData @param requestType @param endPoint @param foo @param baseData @param bar @param...
[ "Same", "sendRequest", "but", "in", "this", "case", "we", "do", "not", "receive", "a", "data", "table", "with", "modifications", ".", "Besides", "the", "data", "and", "request", "header", "are", "optional", "as", "well", ".", "In", "case", "we", "want", ...
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/RestSpec.java#L242-L265
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/RemoteSSHConnection.java
RemoteSSHConnection.copyTo
public void copyTo(String localPath, String remotePath) throws Exception { FileInputStream fis = null; String rfile = remotePath; String localfile = localPath; boolean ptimestamp = true; // exec 'scp -t rfile' remotely String command = "scp " + (ptimestamp ? "-p" : "") +...
java
public void copyTo(String localPath, String remotePath) throws Exception { FileInputStream fis = null; String rfile = remotePath; String localfile = localPath; boolean ptimestamp = true; // exec 'scp -t rfile' remotely String command = "scp " + (ptimestamp ? "-p" : "") +...
[ "public", "void", "copyTo", "(", "String", "localPath", ",", "String", "remotePath", ")", "throws", "Exception", "{", "FileInputStream", "fis", "=", "null", ";", "String", "rfile", "=", "remotePath", ";", "String", "localfile", "=", "localPath", ";", "boolean"...
Copy localPath to remotePath using the session created @param localPath @param remotePath
[ "Copy", "localPath", "to", "remotePath", "using", "the", "session", "created" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/RemoteSSHConnection.java#L106-L191
train
Stratio/bdt
src/main/java/com/stratio/qa/utils/RemoteSSHConnection.java
RemoteSSHConnection.runCommand
public void runCommand(String command) throws Exception { String result = ""; String extras = "export PYTHONWARNINGS=\"ignore:Unverified HTTPS request\" && "; Channel channel = session.openChannel("exec"); ((ChannelExec) channel).setCommand(extras + command); channel.setInputSt...
java
public void runCommand(String command) throws Exception { String result = ""; String extras = "export PYTHONWARNINGS=\"ignore:Unverified HTTPS request\" && "; Channel channel = session.openChannel("exec"); ((ChannelExec) channel).setCommand(extras + command); channel.setInputSt...
[ "public", "void", "runCommand", "(", "String", "command", ")", "throws", "Exception", "{", "String", "result", "=", "\"\"", ";", "String", "extras", "=", "\"export PYTHONWARNINGS=\\\"ignore:Unverified HTTPS request\\\" && \"", ";", "Channel", "channel", "=", "session", ...
Execute the command in the session created @param command
[ "Execute", "the", "command", "in", "the", "session", "created" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/RemoteSSHConnection.java#L199-L241
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DcosSpec.java
DcosSpec.authenticateDCOSpem
@Given("^I authenticate to DCOS cluster '(.+?)' using email '(.+?)'( with user '(.+?)'( and password '(.+?)'| and pem file '(.+?)'))?$") public void authenticateDCOSpem(String remoteHost, String email, String foo, String user, String bar, String password, String pemFile) throws Exception { String DCOSsecret...
java
@Given("^I authenticate to DCOS cluster '(.+?)' using email '(.+?)'( with user '(.+?)'( and password '(.+?)'| and pem file '(.+?)'))?$") public void authenticateDCOSpem(String remoteHost, String email, String foo, String user, String bar, String password, String pemFile) throws Exception { String DCOSsecret...
[ "@", "Given", "(", "\"^I authenticate to DCOS cluster '(.+?)' using email '(.+?)'( with user '(.+?)'( and password '(.+?)'| and pem file '(.+?)'))?$\"", ")", "public", "void", "authenticateDCOSpem", "(", "String", "remoteHost", ",", "String", "email", ",", "String", "foo", ",", "...
Authenticate in a DCOS cluster @param remoteHost remote host @param email email for JWT singing @param user remote user @param password (required if pemFile null) @param pemFile (required if password null) @throws Exception exception
[ "Authenticate", "in", "a", "DCOS", "cluster" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DcosSpec.java#L63-L74
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DcosSpec.java
DcosSpec.setGoSecSSOCookie
@Given("^I( do not)? set sso token using host '(.+?)' with user '(.+?)' and password '(.+?)'( and tenant '(.+?)')?$") public void setGoSecSSOCookie(String set, String ssoHost, String userName, String passWord, String foo, String tenant) throws Exception { if (set == null) { HashMap<String, Strin...
java
@Given("^I( do not)? set sso token using host '(.+?)' with user '(.+?)' and password '(.+?)'( and tenant '(.+?)')?$") public void setGoSecSSOCookie(String set, String ssoHost, String userName, String passWord, String foo, String tenant) throws Exception { if (set == null) { HashMap<String, Strin...
[ "@", "Given", "(", "\"^I( do not)? set sso token using host '(.+?)' with user '(.+?)' and password '(.+?)'( and tenant '(.+?)')?$\"", ")", "public", "void", "setGoSecSSOCookie", "(", "String", "set", ",", "String", "ssoHost", ",", "String", "userName", ",", "String", "passWord"...
Generate token to authenticate in gosec SSO @param ssoHost current sso host @param userName username @param passWord password @throws Exception exception
[ "Generate", "token", "to", "authenticate", "in", "gosec", "SSO" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DcosSpec.java#L96-L105
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DcosSpec.java
DcosSpec.getUnusedNode
@Given("^I save the IP of an unused node in hosts '(.+?)' in the in environment variable '(.+?)'?$") public void getUnusedNode(String hosts, String envVar) throws Exception { Set<String> hostList = new HashSet(Arrays.asList(hosts.split(","))); //Get the list of currently used hosts commonsp...
java
@Given("^I save the IP of an unused node in hosts '(.+?)' in the in environment variable '(.+?)'?$") public void getUnusedNode(String hosts, String envVar) throws Exception { Set<String> hostList = new HashSet(Arrays.asList(hosts.split(","))); //Get the list of currently used hosts commonsp...
[ "@", "Given", "(", "\"^I save the IP of an unused node in hosts '(.+?)' in the in environment variable '(.+?)'?$\"", ")", "public", "void", "getUnusedNode", "(", "String", "hosts", ",", "String", "envVar", ")", "throws", "Exception", "{", "Set", "<", "String", ">", "hostL...
Checks if there are any unused nodes in the cluster and returns the IP of one of them. REQUIRES A PREVIOUSLY-ESTABLISHED SSH CONNECTION TO DCOS-CLI TO WORK @param hosts: list of IPs that will be investigated @param envVar: environment variable name @throws Exception
[ "Checks", "if", "there", "are", "any", "unused", "nodes", "in", "the", "cluster", "and", "returns", "the", "IP", "of", "one", "of", "them", ".", "REQUIRES", "A", "PREVIOUSLY", "-", "ESTABLISHED", "SSH", "CONNECTION", "TO", "DCOS", "-", "CLI", "TO", "WORK...
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DcosSpec.java#L126-L144
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DcosSpec.java
DcosSpec.convertJSONSchemaToJSON
@Given("^I convert jsonSchema '(.+?)' to json and save it in variable '(.+?)'") public void convertJSONSchemaToJSON(String jsonSchema, String envVar) throws Exception { String json = commonspec.parseJSONSchema(new JSONObject(jsonSchema)).toString(); ThreadProperty.set(envVar, json); }
java
@Given("^I convert jsonSchema '(.+?)' to json and save it in variable '(.+?)'") public void convertJSONSchemaToJSON(String jsonSchema, String envVar) throws Exception { String json = commonspec.parseJSONSchema(new JSONObject(jsonSchema)).toString(); ThreadProperty.set(envVar, json); }
[ "@", "Given", "(", "\"^I convert jsonSchema '(.+?)' to json and save it in variable '(.+?)'\"", ")", "public", "void", "convertJSONSchemaToJSON", "(", "String", "jsonSchema", ",", "String", "envVar", ")", "throws", "Exception", "{", "String", "json", "=", "commonspec", "....
Convert jsonSchema to json @param jsonSchema jsonSchema to be converted to json @param envVar environment variable where to store json @throws Exception exception *
[ "Convert", "jsonSchema", "to", "json" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DcosSpec.java#L307-L311
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DcosSpec.java
DcosSpec.jsonMatchesSchema
@Given("^json (.+?) matches schema (.+?)$") public void jsonMatchesSchema(String json, String schema) throws Exception { JSONObject jsonschema = new JSONObject(schema); JSONObject jsondeploy = new JSONObject(json); commonspec.matchJsonToSchema(jsonschema, jsondeploy); }
java
@Given("^json (.+?) matches schema (.+?)$") public void jsonMatchesSchema(String json, String schema) throws Exception { JSONObject jsonschema = new JSONObject(schema); JSONObject jsondeploy = new JSONObject(json); commonspec.matchJsonToSchema(jsonschema, jsondeploy); }
[ "@", "Given", "(", "\"^json (.+?) matches schema (.+?)$\"", ")", "public", "void", "jsonMatchesSchema", "(", "String", "json", ",", "String", "schema", ")", "throws", "Exception", "{", "JSONObject", "jsonschema", "=", "new", "JSONObject", "(", "schema", ")", ";", ...
Check if json is validated against a schema @param json json to be validated against schema @param schema schema to be validated against @throws Exception exception *
[ "Check", "if", "json", "is", "validated", "against", "a", "schema" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DcosSpec.java#L320-L326
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DcosSpec.java
DcosSpec.getServiceHealthStatus
@Given("^I get service '(.+?)' health status in cluster '(.+?)' and save it in variable '(.+?)'") public void getServiceHealthStatus(String service, String cluster, String envVar) throws Exception { String health = commonspec.retrieveHealthServiceStatus(service, cluster); ThreadProperty.set(envVar,...
java
@Given("^I get service '(.+?)' health status in cluster '(.+?)' and save it in variable '(.+?)'") public void getServiceHealthStatus(String service, String cluster, String envVar) throws Exception { String health = commonspec.retrieveHealthServiceStatus(service, cluster); ThreadProperty.set(envVar,...
[ "@", "Given", "(", "\"^I get service '(.+?)' health status in cluster '(.+?)' and save it in variable '(.+?)'\"", ")", "public", "void", "getServiceHealthStatus", "(", "String", "service", ",", "String", "cluster", ",", "String", "envVar", ")", "throws", "Exception", "{", "...
Get service health status @param service name of the service to be checked @param cluster URI of the cluster @param envVar environment variable where to store result @throws Exception exception *
[ "Get", "service", "health", "status" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DcosSpec.java#L351-L356
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DcosSpec.java
DcosSpec.destroyService
@Given("^I destroy service '(.+?)' in cluster '(.+?)'") public void destroyService(String service, String cluster) throws Exception { String endPoint = "/service/deploy-api/deploy/uninstall?app=" + service; Future response; this.commonspec.setRestProtocol("https://"); this.commonspe...
java
@Given("^I destroy service '(.+?)' in cluster '(.+?)'") public void destroyService(String service, String cluster) throws Exception { String endPoint = "/service/deploy-api/deploy/uninstall?app=" + service; Future response; this.commonspec.setRestProtocol("https://"); this.commonspe...
[ "@", "Given", "(", "\"^I destroy service '(.+?)' in cluster '(.+?)'\"", ")", "public", "void", "destroyService", "(", "String", "service", ",", "String", "cluster", ")", "throws", "Exception", "{", "String", "endPoint", "=", "\"/service/deploy-api/deploy/uninstall?app=\"", ...
Destroy specified service @param service name of the service to be destroyed @param cluster URI of the cluster @throws Exception exception *
[ "Destroy", "specified", "service" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DcosSpec.java#L365-L378
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DcosSpec.java
DcosSpec.checkResources
@When("^All resources from service '(.+?)' have been freed$") public void checkResources(String service) throws Exception { Future<Response> response = commonspec.generateRequest("GET", true, null, null, "/mesos/state-summary", null, null); String json = "[" + response.get().getResponseBody() + "]"...
java
@When("^All resources from service '(.+?)' have been freed$") public void checkResources(String service) throws Exception { Future<Response> response = commonspec.generateRequest("GET", true, null, null, "/mesos/state-summary", null, null); String json = "[" + response.get().getResponseBody() + "]"...
[ "@", "When", "(", "\"^All resources from service '(.+?)' have been freed$\"", ")", "public", "void", "checkResources", "(", "String", "service", ")", "throws", "Exception", "{", "Future", "<", "Response", ">", "response", "=", "commonspec", ".", "generateRequest", "("...
Check if resources are released after uninstall and framework doesn't appear as inactive on mesos @param service service @throws Exception exception
[ "Check", "if", "resources", "are", "released", "after", "uninstall", "and", "framework", "doesn", "t", "appear", "as", "inactive", "on", "mesos" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DcosSpec.java#L386-L395
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DcosSpec.java
DcosSpec.sendAppendRequest
@Then("^I add a new DCOS label with key '(.+?)' and value '(.+?)' to the service '(.+?)'?$") public void sendAppendRequest(String key, String value, String service) throws Exception { commonspec.runCommandAndGetResult("touch " + service + ".json && dcos marathon app show " + service + " > /dcos/" + service ...
java
@Then("^I add a new DCOS label with key '(.+?)' and value '(.+?)' to the service '(.+?)'?$") public void sendAppendRequest(String key, String value, String service) throws Exception { commonspec.runCommandAndGetResult("touch " + service + ".json && dcos marathon app show " + service + " > /dcos/" + service ...
[ "@", "Then", "(", "\"^I add a new DCOS label with key '(.+?)' and value '(.+?)' to the service '(.+?)'?$\"", ")", "public", "void", "sendAppendRequest", "(", "String", "key", ",", "String", "value", ",", "String", "service", ")", "throws", "Exception", "{", "commonspec", ...
A PUT request over the body value. @param key @param value @param service @throws Exception
[ "A", "PUT", "request", "over", "the", "body", "value", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DcosSpec.java#L405-L426
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DcosSpec.java
DcosSpec.setMarathonProperty
@Then("^I modify marathon environment variable '(.+?)' with value '(.+?)' for service '(.+?)'?$") public void setMarathonProperty(String key, String value, String service) throws Exception { commonspec.runCommandAndGetResult("touch " + service + "-env.json && dcos marathon app show " + service + " > /dcos/"...
java
@Then("^I modify marathon environment variable '(.+?)' with value '(.+?)' for service '(.+?)'?$") public void setMarathonProperty(String key, String value, String service) throws Exception { commonspec.runCommandAndGetResult("touch " + service + "-env.json && dcos marathon app show " + service + " > /dcos/"...
[ "@", "Then", "(", "\"^I modify marathon environment variable '(.+?)' with value '(.+?)' for service '(.+?)'?$\"", ")", "public", "void", "setMarathonProperty", "(", "String", "key", ",", "String", "value", ",", "String", "service", ")", "throws", "Exception", "{", "commonsp...
Set a environment variable in marathon and deploy again. @param key @param value @param service @throws Exception
[ "Set", "a", "environment", "variable", "in", "marathon", "and", "deploy", "again", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DcosSpec.java#L436-L449
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DcosSpec.java
DcosSpec.serviceStatusCheck
@Then("^service '(.+?)' status in cluster '(.+?)' is '(suspended|running|deploying)'( in less than '(\\d+?)' seconds checking every '(\\d+?)' seconds)?") public void serviceStatusCheck(String service, String cluster, String status, String foo, Integer totalWait, Integer interval) throws Exception { String r...
java
@Then("^service '(.+?)' status in cluster '(.+?)' is '(suspended|running|deploying)'( in less than '(\\d+?)' seconds checking every '(\\d+?)' seconds)?") public void serviceStatusCheck(String service, String cluster, String status, String foo, Integer totalWait, Integer interval) throws Exception { String r...
[ "@", "Then", "(", "\"^service '(.+?)' status in cluster '(.+?)' is '(suspended|running|deploying)'( in less than '(\\\\d+?)' seconds checking every '(\\\\d+?)' seconds)?\"", ")", "public", "void", "serviceStatusCheck", "(", "String", "service", ",", "String", "cluster", ",", "String", ...
Check service status has value specified @param service name of the service to be checked @param cluster URI of the cluster @param status status expected @throws Exception exception *
[ "Check", "service", "status", "has", "value", "specified" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DcosSpec.java#L459-L479
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DcosSpec.java
DcosSpec.checkComponentConstraints
@Then("^The role '(.+?)' of the service '(.+?)' with instance '(.+?)' complies the constraints '(.+?)'$") public void checkComponentConstraints(String role, String service, String instance, String constraints) throws Exception { checkComponentConstraint(role, service, instance, constraints.split(",")); ...
java
@Then("^The role '(.+?)' of the service '(.+?)' with instance '(.+?)' complies the constraints '(.+?)'$") public void checkComponentConstraints(String role, String service, String instance, String constraints) throws Exception { checkComponentConstraint(role, service, instance, constraints.split(",")); ...
[ "@", "Then", "(", "\"^The role '(.+?)' of the service '(.+?)' with instance '(.+?)' complies the constraints '(.+?)'$\"", ")", "public", "void", "checkComponentConstraints", "(", "String", "role", ",", "String", "service", ",", "String", "instance", ",", "String", "constraints"...
Check if a role of a service complies the established constraints @param role name of role of a service @param service name of service of exhibitor @param instance name of instance of a service @param constraints all stablished contraints separated by a semicolumn. Example: constraint1,constraint2,... @t...
[ "Check", "if", "a", "role", "of", "a", "service", "complies", "the", "established", "constraints" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DcosSpec.java#L536-L539
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java
CommandExecutionSpec.openSSHConnection
@Given("^I open a ssh connection to '(.+?)'( in port '(.+?)')? with user '(.+?)'( and password '(.+?)')?( using pem file '(.+?)')?$") public void openSSHConnection(String remoteHost, String tmp, String remotePort, String user, String foo, String password, String bar, String pemFile) throws Exception { if ((...
java
@Given("^I open a ssh connection to '(.+?)'( in port '(.+?)')? with user '(.+?)'( and password '(.+?)')?( using pem file '(.+?)')?$") public void openSSHConnection(String remoteHost, String tmp, String remotePort, String user, String foo, String password, String bar, String pemFile) throws Exception { if ((...
[ "@", "Given", "(", "\"^I open a ssh connection to '(.+?)'( in port '(.+?)')? with user '(.+?)'( and password '(.+?)')?( using pem file '(.+?)')?$\"", ")", "public", "void", "openSSHConnection", "(", "String", "remoteHost", ",", "String", "tmp", ",", "String", "remotePort", ",", "...
Opens a ssh connection to remote host @param remoteHost remote host @param user remote user @param password (required if pemFile null) @param pemFile (required if password null) @throws Exception exception
[ "Opens", "a", "ssh", "connection", "to", "remote", "host" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java#L52-L68
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java
CommandExecutionSpec.executeLocalCommand
@Given("^I run '(.+?)' locally( with exit status '(.+?)')?( and save the value in environment variable '(.+?)')?$") public void executeLocalCommand(String command, String foo, Integer exitStatus, String bar, String envVar) throws Exception { if (exitStatus == null) { exitStatus = 0; } ...
java
@Given("^I run '(.+?)' locally( with exit status '(.+?)')?( and save the value in environment variable '(.+?)')?$") public void executeLocalCommand(String command, String foo, Integer exitStatus, String bar, String envVar) throws Exception { if (exitStatus == null) { exitStatus = 0; } ...
[ "@", "Given", "(", "\"^I run '(.+?)' locally( with exit status '(.+?)')?( and save the value in environment variable '(.+?)')?$\"", ")", "public", "void", "executeLocalCommand", "(", "String", "command", ",", "String", "foo", ",", "Integer", "exitStatus", ",", "String", "bar", ...
Executes the command specified in local system @param command command to be run locally @param foo regex needed to match method @param exitStatus command exit status @param bar regex needed to match method @param envVar environment variable name @throws Exception exception
[ "Executes", "the", "command", "specified", "in", "local", "system" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java#L107-L117
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java
CommandExecutionSpec.findShellOutput
@Then("^the command output contains '(.+?)'$") public void findShellOutput(String search) throws Exception { assertThat(commonspec.getCommandResult()).as("Contains " + search + ".").contains(search); }
java
@Then("^the command output contains '(.+?)'$") public void findShellOutput(String search) throws Exception { assertThat(commonspec.getCommandResult()).as("Contains " + search + ".").contains(search); }
[ "@", "Then", "(", "\"^the command output contains '(.+?)'$\"", ")", "public", "void", "findShellOutput", "(", "String", "search", ")", "throws", "Exception", "{", "assertThat", "(", "commonspec", ".", "getCommandResult", "(", ")", ")", ".", "as", "(", "\"Contains ...
Check the existence of a text at a command output @param search
[ "Check", "the", "existence", "of", "a", "text", "at", "a", "command", "output" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java#L187-L190
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java
CommandExecutionSpec.notFindShellOutput
@Then("^the command output does not contain '(.+?)'$") public void notFindShellOutput(String search) throws Exception { assertThat(commonspec.getCommandResult()).as("NotContains " + search + ".").doesNotContain(search); }
java
@Then("^the command output does not contain '(.+?)'$") public void notFindShellOutput(String search) throws Exception { assertThat(commonspec.getCommandResult()).as("NotContains " + search + ".").doesNotContain(search); }
[ "@", "Then", "(", "\"^the command output does not contain '(.+?)'$\"", ")", "public", "void", "notFindShellOutput", "(", "String", "search", ")", "throws", "Exception", "{", "assertThat", "(", "commonspec", ".", "getCommandResult", "(", ")", ")", ".", "as", "(", "...
Check the non existence of a text at a command output @param search
[ "Check", "the", "non", "existence", "of", "a", "text", "at", "a", "command", "output" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java#L206-L209
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java
CommandExecutionSpec.checkShellExitStatus
@Deprecated @Then("^the command exit status is '(.+?)'$") public void checkShellExitStatus(int expectedExitStatus) throws Exception { assertThat(commonspec.getCommandExitStatus()).as("Is equal to " + expectedExitStatus + ".").isEqualTo(expectedExitStatus); }
java
@Deprecated @Then("^the command exit status is '(.+?)'$") public void checkShellExitStatus(int expectedExitStatus) throws Exception { assertThat(commonspec.getCommandExitStatus()).as("Is equal to " + expectedExitStatus + ".").isEqualTo(expectedExitStatus); }
[ "@", "Deprecated", "@", "Then", "(", "\"^the command exit status is '(.+?)'$\"", ")", "public", "void", "checkShellExitStatus", "(", "int", "expectedExitStatus", ")", "throws", "Exception", "{", "assertThat", "(", "commonspec", ".", "getCommandExitStatus", "(", ")", "...
Check the exitStatus of previous command execution matches the expected one @param expectedExitStatus @deprecated Success exit status is directly checked in the "execute remote command" method, so this is not needed anymore.
[ "Check", "the", "exitStatus", "of", "previous", "command", "execution", "matches", "the", "expected", "one" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java#L218-L222
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.createBasicMapping
@Given("^I create a Cassandra index named '(.+?)' in table '(.+?)' using magic_column '(.+?)' using keyspace '(.+?)'$") public void createBasicMapping(String index_name, String table, String column, String keyspace) throws Exception { String query = "CREATE INDEX " + index_name + " ON " + table + " (" + col...
java
@Given("^I create a Cassandra index named '(.+?)' in table '(.+?)' using magic_column '(.+?)' using keyspace '(.+?)'$") public void createBasicMapping(String index_name, String table, String column, String keyspace) throws Exception { String query = "CREATE INDEX " + index_name + " ON " + table + " (" + col...
[ "@", "Given", "(", "\"^I create a Cassandra index named '(.+?)' in table '(.+?)' using magic_column '(.+?)' using keyspace '(.+?)'$\"", ")", "public", "void", "createBasicMapping", "(", "String", "index_name", ",", "String", "table", ",", "String", "column", ",", "String", "key...
Create a basic Index. @param index_name index name @param table the table where index will be created. @param column the column where index will be saved @param keyspace keyspace used @throws Exception exception
[ "Create", "a", "basic", "Index", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L80-L84
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.connect
@Given("^I( securely)? connect to '(Cassandra|Mongo|Elasticsearch)' cluster at '(.+)'$") public void connect(String secured, String clusterType, String url) throws DBException, UnknownHostException { switch (clusterType) { case "Cassandra": commonspec.getCassandraClient().setHost...
java
@Given("^I( securely)? connect to '(Cassandra|Mongo|Elasticsearch)' cluster at '(.+)'$") public void connect(String secured, String clusterType, String url) throws DBException, UnknownHostException { switch (clusterType) { case "Cassandra": commonspec.getCassandraClient().setHost...
[ "@", "Given", "(", "\"^I( securely)? connect to '(Cassandra|Mongo|Elasticsearch)' cluster at '(.+)'$\"", ")", "public", "void", "connect", "(", "String", "secured", ",", "String", "clusterType", ",", "String", "url", ")", "throws", "DBException", ",", "UnknownHostException"...
Connect to cluster. @param clusterType DB type (Cassandra|Mongo|Elasticsearch) @param url url where is started Cassandra cluster
[ "Connect", "to", "cluster", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L102-L121
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.connectToElasticSearch
@Given("^I connect to Elasticsearch cluster at host '(.+?)'( using native port '(.+?)')?( using cluster name '(.+?)')?$") public void connectToElasticSearch(String host, String foo, String nativePort, String bar, String clusterName) throws DBException, UnknownHostException, NumberFormatException { LinkedHas...
java
@Given("^I connect to Elasticsearch cluster at host '(.+?)'( using native port '(.+?)')?( using cluster name '(.+?)')?$") public void connectToElasticSearch(String host, String foo, String nativePort, String bar, String clusterName) throws DBException, UnknownHostException, NumberFormatException { LinkedHas...
[ "@", "Given", "(", "\"^I connect to Elasticsearch cluster at host '(.+?)'( using native port '(.+?)')?( using cluster name '(.+?)')?$\"", ")", "public", "void", "connectToElasticSearch", "(", "String", "host", ",", "String", "foo", ",", "String", "nativePort", ",", "String", "b...
Connect to ElasticSearch using custom parameters @param host ES host @param foo regex needed to match method @param nativePort ES port @param bar regex needed to match method @param clusterName ES clustername @throws DBException exception @throws UnknownHostException exception @throw...
[ "Connect", "to", "ElasticSearch", "using", "custom", "parameters" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L135-L151
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.saveElasticCluster
@Given("^I obtain elasticsearch cluster name in '([^:]+?)(:.+?)?' and save it in variable '(.+?)'?$") public void saveElasticCluster(String host, String port, String envVar) throws Exception { commonspec.setRestProtocol("http://"); commonspec.setRestHost(host); commonspec.setRestPort(port);...
java
@Given("^I obtain elasticsearch cluster name in '([^:]+?)(:.+?)?' and save it in variable '(.+?)'?$") public void saveElasticCluster(String host, String port, String envVar) throws Exception { commonspec.setRestProtocol("http://"); commonspec.setRestHost(host); commonspec.setRestPort(port);...
[ "@", "Given", "(", "\"^I obtain elasticsearch cluster name in '([^:]+?)(:.+?)?' and save it in variable '(.+?)'?$\"", ")", "public", "void", "saveElasticCluster", "(", "String", "host", ",", "String", "port", ",", "String", "envVar", ")", "throws", "Exception", "{", "common...
Save clustername of elasticsearch in an environment varible for future use. @param host elasticsearch connection @param port elasticsearch port @param envVar thread variable where to store the value @throws IllegalAccessException exception @throws IllegalArgumentException exception @throws SecurityException ...
[ "Save", "clustername", "of", "elasticsearch", "in", "an", "environment", "varible", "for", "future", "use", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L229-L254
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.insertOnMongoTable
@Given("^I insert into a MongoDB database '(.+?)' and table '(.+?)' this values:$") public void insertOnMongoTable(String dataBase, String tabName, DataTable table) { commonspec.getMongoDBClient().connectToMongoDBDataBase(dataBase); commonspec.getMongoDBClient().insertIntoMongoDBCollection(tabName, ...
java
@Given("^I insert into a MongoDB database '(.+?)' and table '(.+?)' this values:$") public void insertOnMongoTable(String dataBase, String tabName, DataTable table) { commonspec.getMongoDBClient().connectToMongoDBDataBase(dataBase); commonspec.getMongoDBClient().insertIntoMongoDBCollection(tabName, ...
[ "@", "Given", "(", "\"^I insert into a MongoDB database '(.+?)' and table '(.+?)' this values:$\"", ")", "public", "void", "insertOnMongoTable", "(", "String", "dataBase", ",", "String", "tabName", ",", "DataTable", "table", ")", "{", "commonspec", ".", "getMongoDBClient", ...
Insert data in a MongoDB table. @param dataBase Mongo database @param tabName Mongo table @param table Datatable used for insert elements
[ "Insert", "data", "in", "a", "MongoDB", "table", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L313-L317
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.truncateTableInMongo
@Given("^I drop every document at a MongoDB database '(.+?)' and table '(.+?)'") public void truncateTableInMongo(String database, String table) { commonspec.getMongoDBClient().connectToMongoDBDataBase(database); commonspec.getMongoDBClient().dropAllDataMongoDBCollection(table); }
java
@Given("^I drop every document at a MongoDB database '(.+?)' and table '(.+?)'") public void truncateTableInMongo(String database, String table) { commonspec.getMongoDBClient().connectToMongoDBDataBase(database); commonspec.getMongoDBClient().dropAllDataMongoDBCollection(table); }
[ "@", "Given", "(", "\"^I drop every document at a MongoDB database '(.+?)' and table '(.+?)'\"", ")", "public", "void", "truncateTableInMongo", "(", "String", "database", ",", "String", "table", ")", "{", "commonspec", ".", "getMongoDBClient", "(", ")", ".", "connectToMon...
Truncate table in MongoDB. @param database Mongo database @param table Mongo table
[ "Truncate", "table", "in", "MongoDB", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L325-L329
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.insertOnMongoTable
@Given("^I insert into MongoDB database '(.+?)' and collection '(.+?)' the document from schema '(.+?)'$") public void insertOnMongoTable(String dataBase, String collection, String document) throws Exception { String retrievedDoc = commonspec.retrieveData(document, "json"); commonspec.getMongoDBClie...
java
@Given("^I insert into MongoDB database '(.+?)' and collection '(.+?)' the document from schema '(.+?)'$") public void insertOnMongoTable(String dataBase, String collection, String document) throws Exception { String retrievedDoc = commonspec.retrieveData(document, "json"); commonspec.getMongoDBClie...
[ "@", "Given", "(", "\"^I insert into MongoDB database '(.+?)' and collection '(.+?)' the document from schema '(.+?)'$\"", ")", "public", "void", "insertOnMongoTable", "(", "String", "dataBase", ",", "String", "collection", ",", "String", "document", ")", "throws", "Exception",...
Insert document in a MongoDB table. @param dataBase Mongo database @param collection Mongo collection @param document document used for schema
[ "Insert", "document", "in", "a", "MongoDB", "table", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L338-L343
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.sendQueryOfType
@When("^I execute a query over fields '(.+?)' with schema '(.+?)' of type '(json|string)' with magic_column '(.+?)' from table: '(.+?)' using keyspace: '(.+?)' with:$") public void sendQueryOfType(String fields, String schema, String type, String magic_column, String table, String keyspace, DataTable modifications)...
java
@When("^I execute a query over fields '(.+?)' with schema '(.+?)' of type '(json|string)' with magic_column '(.+?)' from table: '(.+?)' using keyspace: '(.+?)' with:$") public void sendQueryOfType(String fields, String schema, String type, String magic_column, String table, String keyspace, DataTable modifications)...
[ "@", "When", "(", "\"^I execute a query over fields '(.+?)' with schema '(.+?)' of type '(json|string)' with magic_column '(.+?)' from table: '(.+?)' using keyspace: '(.+?)' with:$\"", ")", "public", "void", "sendQueryOfType", "(", "String", "fields", ",", "String", "schema", ",", "Str...
Execute a query with schema over a cluster @param fields columns on which the query is executed. Example: "latitude,longitude" or "*" or "count(*)" @param schema the file of configuration (.conf) with the options of mappin. If schema is the word "empty", method will not add a where clause. @param type ...
[ "Execute", "a", "query", "with", "schema", "over", "a", "cluster" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L389-L424
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.elasticSearchQueryWithFilter
@When("^I execute an elasticsearch query over index '(.*?)' and mapping '(.*?)' and column '(.*?)' with value '(.*?)' to '(.*?)'$") public void elasticSearchQueryWithFilter(String indexName, String mappingName, String columnName, String filterType, String value) { try { commonspec.se...
java
@When("^I execute an elasticsearch query over index '(.*?)' and mapping '(.*?)' and column '(.*?)' with value '(.*?)' to '(.*?)'$") public void elasticSearchQueryWithFilter(String indexName, String mappingName, String columnName, String filterType, String value) { try { commonspec.se...
[ "@", "When", "(", "\"^I execute an elasticsearch query over index '(.*?)' and mapping '(.*?)' and column '(.*?)' with value '(.*?)' to '(.*?)'$\"", ")", "public", "void", "elasticSearchQueryWithFilter", "(", "String", "indexName", ",", "String", "mappingName", ",", "String", "columnN...
Execute query with filter over elasticsearch @param indexName @param mappingName @param columnName @param filterType it could be equals, gt, gte, lt and lte. @param value value of the column to be filtered.
[ "Execute", "query", "with", "filter", "over", "elasticsearch" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L459-L474
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.createCustomMapping
@When("^I create a Cassandra index named '(.+?)' with schema '(.+?)' of type '(json|string)' in table '(.+?)' using magic_column '(.+?)' using keyspace '(.+?)' with:$") public void createCustomMapping(String index_name, String schema, String type, String table, String magic_column, String keyspace, DataTable modifi...
java
@When("^I create a Cassandra index named '(.+?)' with schema '(.+?)' of type '(json|string)' in table '(.+?)' using magic_column '(.+?)' using keyspace '(.+?)' with:$") public void createCustomMapping(String index_name, String schema, String type, String table, String magic_column, String keyspace, DataTable modifi...
[ "@", "When", "(", "\"^I create a Cassandra index named '(.+?)' with schema '(.+?)' of type '(json|string)' in table '(.+?)' using magic_column '(.+?)' using keyspace '(.+?)' with:$\"", ")", "public", "void", "createCustomMapping", "(", "String", "index_name", ",", "String", "schema", ","...
Create a Cassandra index. @param index_name index name @param schema the file of configuration (.conf) with the options of mappin @param type type of the changes in schema (string or json) @param table table for create the index @param magic_column magic column where index will be saved @pa...
[ "Create", "a", "Cassandra", "index", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L488-L496
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.createElasticsearchIndex
@When("^I create an elasticsearch index named '(.+?)'( removing existing index if exist)?$") public void createElasticsearchIndex(String index, String removeIndex) { if (removeIndex != null && commonspec.getElasticSearchClient().indexExists(index)) { commonspec.getElasticSearchClient().dropSingl...
java
@When("^I create an elasticsearch index named '(.+?)'( removing existing index if exist)?$") public void createElasticsearchIndex(String index, String removeIndex) { if (removeIndex != null && commonspec.getElasticSearchClient().indexExists(index)) { commonspec.getElasticSearchClient().dropSingl...
[ "@", "When", "(", "\"^I create an elasticsearch index named '(.+?)'( removing existing index if exist)?$\"", ")", "public", "void", "createElasticsearchIndex", "(", "String", "index", ",", "String", "removeIndex", ")", "{", "if", "(", "removeIndex", "!=", "null", "&&", "c...
Create an elasticsearch index. @param index
[ "Create", "an", "elasticsearch", "index", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L539-L545
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.indexElasticsearchDocument
@When("^I index a document in the index named '(.+?)' using the mapping named '(.+?)' with key '(.+?)' and value '(.+?)'$") public void indexElasticsearchDocument(String indexName, String mappingName, String key, String value) throws Exception { ArrayList<XContentBuilder> mappingsource = new ArrayList<XCont...
java
@When("^I index a document in the index named '(.+?)' using the mapping named '(.+?)' with key '(.+?)' and value '(.+?)'$") public void indexElasticsearchDocument(String indexName, String mappingName, String key, String value) throws Exception { ArrayList<XContentBuilder> mappingsource = new ArrayList<XCont...
[ "@", "When", "(", "\"^I index a document in the index named '(.+?)' using the mapping named '(.+?)' with key '(.+?)' and value '(.+?)'$\"", ")", "public", "void", "indexElasticsearchDocument", "(", "String", "indexName", ",", "String", "mappingName", ",", "String", "key", ",", "S...
Index a document within a mapping type. @param indexName @param mappingName @param key @param value @throws Exception
[ "Index", "a", "document", "within", "a", "mapping", "type", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L556-L562
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.assertKeyspaceOnCassandraExists
@Then("^a Cassandra keyspace '(.+?)' exists$") public void assertKeyspaceOnCassandraExists(String keyspace) { assertThat(commonspec.getCassandraClient().getKeyspaces()).as("The keyspace " + keyspace + " exists on cassandra").contains(keyspace); }
java
@Then("^a Cassandra keyspace '(.+?)' exists$") public void assertKeyspaceOnCassandraExists(String keyspace) { assertThat(commonspec.getCassandraClient().getKeyspaces()).as("The keyspace " + keyspace + " exists on cassandra").contains(keyspace); }
[ "@", "Then", "(", "\"^a Cassandra keyspace '(.+?)' exists$\"", ")", "public", "void", "assertKeyspaceOnCassandraExists", "(", "String", "keyspace", ")", "{", "assertThat", "(", "commonspec", ".", "getCassandraClient", "(", ")", ".", "getKeyspaces", "(", ")", ")", "....
Checks if a keyspaces exists in Cassandra. @param keyspace
[ "Checks", "if", "a", "keyspaces", "exists", "in", "Cassandra", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L636-L639
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.assertKeyspaceOnCassandraDoesNotExist
@Then("^a Cassandra keyspace '(.+?)' does not exist$") public void assertKeyspaceOnCassandraDoesNotExist(String keyspace) { assertThat(commonspec.getCassandraClient().getKeyspaces()).as("The keyspace " + keyspace + " does not exist on cassandra").doesNotContain(keyspace); }
java
@Then("^a Cassandra keyspace '(.+?)' does not exist$") public void assertKeyspaceOnCassandraDoesNotExist(String keyspace) { assertThat(commonspec.getCassandraClient().getKeyspaces()).as("The keyspace " + keyspace + " does not exist on cassandra").doesNotContain(keyspace); }
[ "@", "Then", "(", "\"^a Cassandra keyspace '(.+?)' does not exist$\"", ")", "public", "void", "assertKeyspaceOnCassandraDoesNotExist", "(", "String", "keyspace", ")", "{", "assertThat", "(", "commonspec", ".", "getCassandraClient", "(", ")", ".", "getKeyspaces", "(", ")...
Checks a keyspace does not exist in Cassandra. @param keyspace
[ "Checks", "a", "keyspace", "does", "not", "exist", "in", "Cassandra", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L646-L649
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.assertTableExistsOnCassandraKeyspace
@Then("^a Cassandra keyspace '(.+?)' contains a table '(.+?)'$") public void assertTableExistsOnCassandraKeyspace(String keyspace, String tableName) { assertThat(commonspec.getCassandraClient().getTables(keyspace)).as("The table " + tableName + "exists on cassandra").contains(tableName); }
java
@Then("^a Cassandra keyspace '(.+?)' contains a table '(.+?)'$") public void assertTableExistsOnCassandraKeyspace(String keyspace, String tableName) { assertThat(commonspec.getCassandraClient().getTables(keyspace)).as("The table " + tableName + "exists on cassandra").contains(tableName); }
[ "@", "Then", "(", "\"^a Cassandra keyspace '(.+?)' contains a table '(.+?)'$\"", ")", "public", "void", "assertTableExistsOnCassandraKeyspace", "(", "String", "keyspace", ",", "String", "tableName", ")", "{", "assertThat", "(", "commonspec", ".", "getCassandraClient", "(", ...
Checks if a cassandra keyspace contains a table. @param keyspace @param tableName
[ "Checks", "if", "a", "cassandra", "keyspace", "contains", "a", "table", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L657-L660
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.assertTableDoesNotExistOnCassandraKeyspace
@Then("^a Cassandra keyspace '(.+?)' does not contain a table '(.+?)'$") public void assertTableDoesNotExistOnCassandraKeyspace(String keyspace, String tableName) { assertThat(commonspec.getCassandraClient().getTables(keyspace)).as("The table " + tableName + "exists on cassandra").doesNotContain(tableName);...
java
@Then("^a Cassandra keyspace '(.+?)' does not contain a table '(.+?)'$") public void assertTableDoesNotExistOnCassandraKeyspace(String keyspace, String tableName) { assertThat(commonspec.getCassandraClient().getTables(keyspace)).as("The table " + tableName + "exists on cassandra").doesNotContain(tableName);...
[ "@", "Then", "(", "\"^a Cassandra keyspace '(.+?)' does not contain a table '(.+?)'$\"", ")", "public", "void", "assertTableDoesNotExistOnCassandraKeyspace", "(", "String", "keyspace", ",", "String", "tableName", ")", "{", "assertThat", "(", "commonspec", ".", "getCassandraCl...
Checks a cassandra keyspace does not contain a table. @param keyspace @param tableName
[ "Checks", "a", "cassandra", "keyspace", "does", "not", "contain", "a", "table", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L668-L671
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.assertRowNumberOfTableOnCassandraKeyspace
@Then("^a Cassandra keyspace '(.+?)' contains a table '(.+?)' with '(.+?)' rows$") public void assertRowNumberOfTableOnCassandraKeyspace(String keyspace, String tableName, String numberRows) { Long numberRowsLong = Long.parseLong(numberRows); commonspec.getCassandraClient().useKeyspace(keyspace); ...
java
@Then("^a Cassandra keyspace '(.+?)' contains a table '(.+?)' with '(.+?)' rows$") public void assertRowNumberOfTableOnCassandraKeyspace(String keyspace, String tableName, String numberRows) { Long numberRowsLong = Long.parseLong(numberRows); commonspec.getCassandraClient().useKeyspace(keyspace); ...
[ "@", "Then", "(", "\"^a Cassandra keyspace '(.+?)' contains a table '(.+?)' with '(.+?)' rows$\"", ")", "public", "void", "assertRowNumberOfTableOnCassandraKeyspace", "(", "String", "keyspace", ",", "String", "tableName", ",", "String", "numberRows", ")", "{", "Long", "number...
Checks the number of rows in a cassandra table. @param keyspace @param tableName @param numberRows
[ "Checks", "the", "number", "of", "rows", "in", "a", "cassandra", "table", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L680-L686
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.assertValuesOfTable
@Then("^a Cassandra keyspace '(.+?)' contains a table '(.+?)' with values:$") public void assertValuesOfTable(String keyspace, String tableName, DataTable data) throws InterruptedException { // USE of Keyspace commonspec.getCassandraClient().useKeyspace(keyspace); // Obtain the types and co...
java
@Then("^a Cassandra keyspace '(.+?)' contains a table '(.+?)' with values:$") public void assertValuesOfTable(String keyspace, String tableName, DataTable data) throws InterruptedException { // USE of Keyspace commonspec.getCassandraClient().useKeyspace(keyspace); // Obtain the types and co...
[ "@", "Then", "(", "\"^a Cassandra keyspace '(.+?)' contains a table '(.+?)' with values:$\"", ")", "public", "void", "assertValuesOfTable", "(", "String", "keyspace", ",", "String", "tableName", ",", "DataTable", "data", ")", "throws", "InterruptedException", "{", "// USE ...
Checks if a cassandra table contains the values of a DataTable. @param keyspace @param tableName @param data @throws InterruptedException
[ "Checks", "if", "a", "cassandra", "table", "contains", "the", "values", "of", "a", "DataTable", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L696-L720
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.assertValuesOfTableMongo
@Then("^a Mongo dataBase '(.+?)' contains a table '(.+?)' with values:") public void assertValuesOfTableMongo(String dataBase, String tableName, DataTable data) { commonspec.getMongoDBClient().connectToMongoDBDataBase(dataBase); ArrayList<DBObject> result = (ArrayList<DBObject>) commonspec.getMongoD...
java
@Then("^a Mongo dataBase '(.+?)' contains a table '(.+?)' with values:") public void assertValuesOfTableMongo(String dataBase, String tableName, DataTable data) { commonspec.getMongoDBClient().connectToMongoDBDataBase(dataBase); ArrayList<DBObject> result = (ArrayList<DBObject>) commonspec.getMongoD...
[ "@", "Then", "(", "\"^a Mongo dataBase '(.+?)' contains a table '(.+?)' with values:\"", ")", "public", "void", "assertValuesOfTableMongo", "(", "String", "dataBase", ",", "String", "tableName", ",", "DataTable", "data", ")", "{", "commonspec", ".", "getMongoDBClient", "(...
Checks the values of a MongoDB table. @param dataBase @param tableName @param data
[ "Checks", "the", "values", "of", "a", "MongoDB", "table", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L786-L793
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.aMongoDataBaseContainsaTable
@Then("^a Mongo dataBase '(.+?)' doesnt contains a table '(.+?)'$") public void aMongoDataBaseContainsaTable(String database, String tableName) { commonspec.getMongoDBClient().connectToMongoDBDataBase(database); Set<String> collectionsNames = commonspec.getMongoDBClient().getMongoDBCollections(); ...
java
@Then("^a Mongo dataBase '(.+?)' doesnt contains a table '(.+?)'$") public void aMongoDataBaseContainsaTable(String database, String tableName) { commonspec.getMongoDBClient().connectToMongoDBDataBase(database); Set<String> collectionsNames = commonspec.getMongoDBClient().getMongoDBCollections(); ...
[ "@", "Then", "(", "\"^a Mongo dataBase '(.+?)' doesnt contains a table '(.+?)'$\"", ")", "public", "void", "aMongoDataBaseContainsaTable", "(", "String", "database", ",", "String", "tableName", ")", "{", "commonspec", ".", "getMongoDBClient", "(", ")", ".", "connectToMong...
Checks if a MongoDB database contains a table. @param database @param tableName
[ "Checks", "if", "a", "MongoDB", "database", "contains", "a", "table", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L801-L806
train
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.resultsMustBe
@Then("^There are results found with:$") public void resultsMustBe(DataTable expectedResults) throws Exception { String type = commonspec.getResultsType(); assertThat(type).isNotEqualTo("").overridingErrorMessage("It's necessary to define the result type"); switch (type) { case ...
java
@Then("^There are results found with:$") public void resultsMustBe(DataTable expectedResults) throws Exception { String type = commonspec.getResultsType(); assertThat(type).isNotEqualTo("").overridingErrorMessage("It's necessary to define the result type"); switch (type) { case ...
[ "@", "Then", "(", "\"^There are results found with:$\"", ")", "public", "void", "resultsMustBe", "(", "DataTable", "expectedResults", ")", "throws", "Exception", "{", "String", "type", "=", "commonspec", ".", "getResultsType", "(", ")", ";", "assertThat", "(", "ty...
Checks the different results of a previous query @param expectedResults A DataTable Object with all data needed for check the results. The DataTable must contains at least 2 columns: a) A field column from the result b) Occurrences column (Integer type) <p> Example: |latitude| longitude|place |occurrences| |12.5 ...
[ "Checks", "the", "different", "results", "of", "a", "previous", "query" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L823-L844
train