Releases: bastion-dev/Bastion
Version 0.7 (Beta)
Release notes:
#63, #77: Improved Bastion's ability to guess the file's MIME type when using FileRequest
. This fix also changes the default MIME type used in case the file type cannot be determined. The new MIME type that is used for these kind of files is application/octet-stream
(was plain/text
previously).
Happy Birthday Bastion! 😸
Version 0.6 (Beta)
Release notes:
- #61: Removed the JUnit
BastionRunner
as it was causing too many issues. It might be back in the future. - #44: Implemented a new system of Views. Each response is now bound to multiple views (one of which is possibly the model specified by
.bind()
). This should make it easier to use.bind()
now without having to guess the type of object returned by Bastion. - #21:
JsonRequest
andJsonResponseAssertions
can now be initialised by providing any Java object. Bastion will then use the JacksonObjectMapper
to generate the appropriate JSON string to send/expect. - #71: Removed the
thenDo()
method when constructing a Bastion test.
Version 0.5.2 (Beta)
Release notes:
- #19: User guide and JavaDocs have been published! User guide is available on http://bastion-dev.github.io/Bastion/reference/index.html. JavaDocs are available on http://bastion-dev.github.io/Bastion/javadocs/index.html.
- #52: Bastion will enforce the call ordering of the methods available on the
Bastion
class. This means you cannot callwithAssertions()
beforebind()
, for example, if you keep a reference to the previous builder interface.
Version 0.5.1 (Beta)
Version 0.5 (Beta)
Upgrading to this version from 0.4 might break your build. Please read through the notes below for more details.
In this version:
- #64: We have removed an ambiguous method:
StatusCodeAssertions.expecting()
. This method accepted either an array ofint
or an array ofInteger
. When these are passed as literals, compilation fails because the compiler could not determine which method to call. Since this is a public API change, you need to check anywhere you were using this method and ensure that your code compiles. - #59:
JsonSchemaAssertions
will now also assert that the response received from the server hasContent-type
header ofapplication/json
. If you want to change the expected content type, use theoverrideContentType()
method. - #24: New request class:
FileRequest
. This class lets you upload a file's content as the HTTP entity body. Think of it as the file version ofGeneralRequest
. Bastion will even try to guess theContent-type
header to send by looking at the filename.- Known Issue: On MacOS systems, a JDK bug prevents Bastion from guessing the MIME type of given files. You will need to use the
setContentType()
method if you need to set the content type.
- Known Issue: On MacOS systems, a JDK bug prevents Bastion from guessing the MIME type of given files. You will need to use the
Verison 0.4 (Beta)
Version 0.4 adds the following features:
- #34: A new overloaded
Bastion.request()
method which does not take descriptive text. You are free to immediately provide a request without specified a name for your request. - #14: Bastion requests now support setting a different timeout. Custom request implementation can specify their timeout using
timeout()
. For built-in requests, usesetTimeout()
method, after initialising the request, to set a different timeout. - #12: You can now set global HTTP attributes. These attributes will apply to all requests you send using Bastion. For example,
Bastion.globals().addHeader()
adds an HTTP header which is sent with all HTTP requests sent by Bastion. You can also specify this configuration in a YAML file and load it usingBastion.loadConfiguration()
.
Also, in this release:
- #33: Bastion has a new logo! Check it out on http://bastion.rocks.
- #31: We've set up TravisCI to build every commit and pull request automatically. This will run the tests for Bastion before merging feature branches into the main branch.
Version 0.3 (Beta)
Version 0.3 release adds the following features:
- #27:
StatusCodeAssertions
which takes a set of expected response status codes. The assertions pass if the actual response status code is one of those expected. - #30: The HTTP request/response content (including headers) will be output to the console when a Bastion request fails or does not pass its assertions.
- #40:
ignoreOrderForArrayProperties()
forJsonResponseAssertions
which will ignore the element ordering in JSON arrays. The assertion will still check that the array exists and that all the expected values in the array have been returned. (Thanks @tyronegrech for this contribution.)
Version 0.2.2 (Beta)
Bug fixes:
#37: Fixed an issue related to the model bound by default after calling Bastion.request()
.
Version 0.2.1 (Beta)
Patch version 0.2.1 includes:
- Corrected the return type of
GeneralRequest.get()
to return the actual constructedGeneralRequest
.
Version 0.2 (Beta)
New Beta version for Bastion. Changes include:
- A new type of Request,
FormUrlEncodedRequest
, which sends data using anapplication/x-www-form-urlencoded
content-type. - A new type of Assertions object,
JsonSchemaAssertions
, which will assert that the received JSON response conforms to the given JSON schema. - Improvements to
JsonRequest
andJsonResponseAssertions
to support templating functionality. Load a template from a file (containing placeholders for data) and then fill in with real data during runtime. This allows the same template to be reused across multiple Bastion tests.