fitnesse-jdbc-slim

FitNesse JDBC fixture in slim format. Allows running SQL commands on multiple database connections.

License

License

GroupId

GroupId

com.github.andreptb
ArtifactId

ArtifactId

fitnesse-jdbc-slim
Last Version

Last Version

0.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

fitnesse-jdbc-slim
FitNesse JDBC fixture in slim format. Allows running SQL commands on multiple database connections.
Project URL

Project URL

https://github.com/andreptb/fitnesse-jdbc-slim
Source Code Management

Source Code Management

https://github.com/andreptb/fitnesse-jdbc-slim

Download fitnesse-jdbc-slim

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.andreptb/fitnesse-jdbc-slim/ -->
<dependency>
    <groupId>com.github.andreptb</groupId>
    <artifactId>fitnesse-jdbc-slim</artifactId>
    <version>0.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.andreptb/fitnesse-jdbc-slim/
implementation 'com.github.andreptb:fitnesse-jdbc-slim:0.0.2'
// https://jarcasting.com/artifacts/com.github.andreptb/fitnesse-jdbc-slim/
implementation ("com.github.andreptb:fitnesse-jdbc-slim:0.0.2")
'com.github.andreptb:fitnesse-jdbc-slim:jar:0.0.2'
<dependency org="com.github.andreptb" name="fitnesse-jdbc-slim" rev="0.0.2">
  <artifact name="fitnesse-jdbc-slim" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.andreptb', module='fitnesse-jdbc-slim', version='0.0.2')
)
libraryDependencies += "com.github.andreptb" % "fitnesse-jdbc-slim" % "0.0.2"
[com.github.andreptb/fitnesse-jdbc-slim "0.0.2"]

Dependencies

compile (1)

Group / Artifact Type Version
org.springframework : spring-jdbc jar 4.1.4.RELEASE

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.hsqldb : hsqldb jar 2.3.2

Project Modules

There are no modules declared in this project.

fitnesse-jdbc-slim Build Status Coverage Status Maven Central

FitNesse JDBC fixture in slim format. Allows running SQL commands on multiple database connections. This project is licensed under MIT.

Installation

  • This module and spring dependencies must be in FitNesse classpath. You can download the jar from here or with maven (see below).
  • The jdbc driver which the fixture will be used to connect also must be on FitNesse classpath.
<dependency>
  <groupId>com.github.andreptb</groupId>
  <artifactId>fitnesse-jdbc-slim</artifactId>
  <version>0.0.2</version>
</dependency>

Sample:

|import|
|com.github.andreptb.fitnesse| 
 
|library|
|jdbc fixture|

|script|
|connect jdbc on | ${DATABASE_NAME} | with url | ${DATABASE_URL} | and driver | ${DRIVER_CLASS_NAME} | and username | ${DATABASE_USERNAME} | and password | ${DATABASE_PASSWORD} | # registers the ${DATABASE_NAME} database, must be the done before running SQL commands 
|run in | ${DATABASE_NAME} | CREATE TABLE USER (ID BIGINT IDENTITY, NAME VARCHAR(255) NOT NULL, PASSWORD VARCHAR(255) NOT NULL) | # runs the command CREATE TABLE, only fails if an exception occurs.
|run in | ${DATABASE_NAME} | INSERT INTO USER (NAME, PASSWORD) VALUES ('user1', 'password1') | # runs the command INSERT, only fails if an exception occurs.
|$usernameId= | query in | ${DATABASE_NAME} | SELECT ID FROM USER WHERE NAME = 'user1' | # runs a SELECT command, assigns the value of the first column of the first row to the variable $usernameId. If was an UPDATE command, would return the updated rows count.

Versions

Version
0.0.2