Simple graphql api to grab spec files in order: new specs -> longest specs -> short specs
Could be used to make concurrent machines that run your tests much equal in duration times
- Register user or login with existing one
- Create new session (it will be attached to existing project or will create new)
- Get nextSpec for your sessionID and machineID, every query will finish previous spec for this session + machine and return next. Final query will return message "session finished" and finish spec and session for specific machineID. in case machineID is not passed it will be "default"
- clone this repository
cd split-specsmake deps- download dependenciesmake keys- generate private and public keys for authexport ENV=dev- to use in memory storage instead of real dbmake api- build binary and execute- open
http://localhost:8080/playgroundfor GraphQL playground - use
http://localhost:8080/queryfor Altair/Postman/Insomnia api clients - use
http://localhost:8080/for ui interface
make web-deps- install dependencies from npm (yarn required)make web-dev- open ui at localhost for developmentmake web-build- build page from sources (before deployment) As UI is served by golang backend fromweb/buildfolder, it could be accessed by spawning just backend instance, however without features like hot-reload, thus not so convenient for development
- install Python 2.7, Google Cloud SDK and follow the docs
- Quickstart - for using go with appengine
make dev- run dev server with file watcher, app.yaml should have runtime go111, but changed to go115 when deployingmake deploy- deploy app to app enginemake browse- open deployed app in local browser
- mutation register - create new user and receive jwt token
mutation {
register(input: { email: "[email protected]", password: "admin" })
}- mutation login - receive jwt token for existing user
mutation {
login(input: { email: "[email protected]", password: "admin" })
}- mutation addSession(session) - initialize new session for your project (session will be attached to existing project or create a new one) and receive sessionId
mutation {
addSession(
session: {
projectName: "test"
specFiles: [{ filePath: "1" }, { filePath: "2" }, { filePath: "3" }]
}
) {
sessionId
projectName
}
}- query nextSpec(sessionID, machineID?) - receive next spec file to run for specific session and for specific machineID. In case only one machine is used - no need to pass it
query {
nextSpec(sessionId: "3e1295e4-b044-4a7a-82a7-b0e71afe70e7")
}- query project(name): get your project and all sessions info
query {
project(name: "test") {
projectName
sessions {
id
start
end
backlog {
file
estimatedDuration
start
end
}
}
}
}- query session(sessionId): get session by id
query {
session(sessionId: "3e1295e4-b044-4a7a-82a7-b0e71afe70e7") {
id
start
end
backlog {
file
start
end
estimatedDuration
assignedTo
}
}
}- query projects: get list of project names available for current user
query {
projects
}- mutation shareProject: make your project available for other existing user
mutation {
inviteUser(email: "admin2", projectName: "test")
}- mutation changePassword: change password for signed in user
mutation {
changePassword(input: { password: "admin", newPassword: "ababagalamaga" })
}- mutation deleteSession: delete existing session by id for current user
mutation {
deleteSession(sessionId: "vcV8iLiN_Z5rEsMlF8ur1")
}- mutation deleteProject: delete existing project by name for current user
mutation {
deleteProject(projectName: "test")
}