-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(#1049): Starting JBang script support
- Introduce TestSource model that holds polyglot test sources (.xml, .yaml, .groovy, .feature) - Enhance TestNG TestEngine implementation to support running polyglot Citrus tests (xml, yaml, groovy) - Enhance Cucumber TestEngine to properly handle feature files passed to the run command - Introduce citrus-jbang module in tools - Add JBang catalog pointing to Citrus JBang CLI script - Add CitrusJBangMain script with following commands - Init command to create test template (.yaml, .xml, .groovy, .feature) - ListTests command list all running tests - Run command able to run tests via TestEngine API - Fix java util logging to send all log events to SLF4J
- Loading branch information
1 parent
1aabea7
commit 2a87abe
Showing
43 changed files
with
1,809 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
core/citrus-api/src/main/java/org/citrusframework/TestSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Copyright 2006-2018 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.citrusframework; | ||
|
||
/** | ||
* @author Christoph Deppisch | ||
* @since 4.0 | ||
*/ | ||
public class TestSource { | ||
|
||
/** Test type, name and optional sourceFile */ | ||
private final String type; | ||
private final String name; | ||
private final String filePath; | ||
|
||
public TestSource(String type, String name) { | ||
this(type, name, null); | ||
} | ||
|
||
public TestSource(String type, String name, String filePath) { | ||
this.type = type; | ||
this.name = name; | ||
this.filePath = filePath; | ||
} | ||
|
||
public TestSource(Class<?> testClass) { | ||
this("java", testClass.getName()); | ||
} | ||
|
||
/** | ||
* The test source type. Usually one of java, xml, groovy, yaml. | ||
* @return | ||
*/ | ||
public String getType() { | ||
return type; | ||
} | ||
|
||
/** | ||
* Gets the name. | ||
* @return | ||
*/ | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
/** | ||
* Optional source file path. | ||
* @return | ||
*/ | ||
public String getFilePath() { | ||
return filePath; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"catalogs": {}, | ||
"aliases": { | ||
"citrus": { | ||
"script-ref": "tools/jbang/dist/CitrusJBang.java", | ||
"description": "Run Citrus tests" | ||
} | ||
} | ||
} |
Oops, something went wrong.