-
Notifications
You must be signed in to change notification settings - Fork 12
Quick Start Guide
CA CodeSV is available on Maven repository or for installation from GitHub. You can clone the example project or download the product directly from the CodeSV GitHub page.
Choose from one of the setup options below to configure CodeSV:
To add the CodeSV product dependency to your Maven project follow these steps:
- Modify your
pom.xml
by adding the CA repository:
<repositories>
<!-- your other repositories -->
<repository>
<id>bintray-ca-sv</id>
<name>bintray-ca</name>
<url>http://ca.bintray.com/sv</url>
</repository>
</repositories>
- Add the CodeSV product dependency:
<dependency>
<groupId>com.broadcom.codesv</groupId>
<artifactId>codesv-dist-jar</artifactId>
<version>2.0.0</version>
</dependency>
To add CodeSV product dependency to your Gradle project follow these steps:
- Modify your
build.gradle
by adding the CA repository:
repositories {
maven {
url "http://ca.bintray.com/sv"
}
}
- Add the CodeSV product dependency:
dependencies {
compile 'com.broadcom.codesv:codesv-dist-jar:2.0.0'
}
The example below will allow you to run a jUnit test running an embedded virtual service using CodeSV.
-
Add the following imports to your jUnit test class:
import static com.ca.codesv.protocols.http.fluent.HttpFluentInterface.*; import com.ca.codesv.engine.junit4.VirtualServerRule;
-
Create a jUnit Rule and a test method with the specification of a new virtualized service.
@Rule
public VirtualServerRule vs = new VirtualServerRule();
@Test
public void testBasicExample() throws IOException {
forGet("http://customUrl:8542/test/url").doReturn(
okMessage()
.withStringBody("Success")
);
}
For more code examples, see Code Library
For API documentation, see Javadoc
For more information, to share ideas, or to raise issues, see the CA Service Virtualization/DevTest community page at the following URL: https://communities.ca.com/community/ca-devtest-community