Coder Social home page Coder Social logo

the-serenity-book's Introduction

This repo contains the asciidoctor files that make up the book which can be found at https://serenity-bdd.github.io/theserenitybook/latest/index.html

Contributing

You can add and improve on this documentation. To build the site locally:

# create a folder to hold both required repositories
mkdir $project-root
cd $project-root

# clone
git clone https://github.com/serenity-bdd/serenity-docs
git clone https://github.com/serenity-bdd/the-serenity-book

# build the book from your local sources, requires antora: https://antora.org/
cd serenity-docs
antora generate --clean local.yml

# open your browser at ./build/site-local/theserenitybook/2.1.4/index.html

the-serenity-book's People

Contributors

amuradyan avatar arhohuttunen avatar axiopisty avatar cliviu avatar dallon avatar daniilmatafonov avatar gaeshi avatar gitbook-bot avatar globalworming avatar hertzsprung avatar jacobnguyenn avatar jan-molak avatar jumal avatar nmyers322 avatar rodrigojmartin avatar tobiasverhoog avatar vivganes avatar wakaleo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

the-serenity-book's Issues

howto report on WIP and manual test in screenplay

https://sqa.stackexchange.com/questions/39311/manual-test-steps-with-serenity-screenplay-pattern

@ChrisVanBael
Hi, just a question: is it correct that when we set the @manual testing tag to scenarios that if steps are implemented as an automated step they are still executed?

todo: check how @Manual behaves in screenplay reports, maybe describe workaround with tags and dry run
requirements to check:

  • @Manual tags test as manual
  • test steps show up in the report
  • when executing test, steps are not executed, only reported
  • when setting manual result and reason, they show up in the report

problems modeling complex controls

I am having problems modelling slightly complex controls, and the documentation has only trivial buttons and links.

I have a situation like this:

  1. Our app has navigation tabs along the top of the page for different sections of the app. As an example, we can use stackoverflow.com and the tabs (buttons?) along the top: "Interesting", "Bountied", "Hot", "Week", "Month".
  2. I wanted to have one method, to which I can pass the name of the tab as a param. Something like NavigateTo.page(String), as in actor.attemptsTo(NavigateTo.page("Interesting")).

As a hint I was able to find this, but it is not clear where the find(...) static import comes from.

I constantly find myself struggling to model something in Screenplay, that I used to whip up without a second thought using PageObjects:

public class NavigateTo implements Task {

    private String pageLabel;

    public NavigateTo(String pageLabel) {
	this.pageLabel = pageLabel;
    }

    @Step("{0} navigates to page #pageLabel")
    @Override
    public <T extends Actor> void performAs(T actor) {
	// TODO: all this should be some kind of PageObject thing?
	List<WebElementFacade> labels = BrowseTheWeb.as(actor).findAll(By.className("s-btn"));
	for (WebElementFacade label : labels) {
	    if (label.getText().contains(pageLabel)) {
		actor.attemptsTo(Click.on(label));
		return;
	    }
	}
	throw new NavigationPageNotFound(pageLabel);
    }

    public static NavigateTo page(String pageLabel) {
	return Instrumented.instanceOf(NavigateTo.class).withProperties(pageLabel);
    }
}

Can you help?

Add how to handle with SSL certificate in SerenityRest

Hi @wakaleo

I was looking for a Serenity configuration for disable SSL certificates validation using SerenityRest (rest assured).

I'm facing the same error related here: rest-assured/rest-assured#967 . I'm trying at first to disable the SSL verification. The approach that suggested at the related forum not gonna works fine for me because I have a complex environment running my tests.

In short I was trying to figure out how to disable SSL verification for rest API tests using Serenity, but I didn't find anything at serenity documentation.

Is there anyway to do this in serenity.conf or apply others configurations?

Thanks.

Feedback on index.adoc

Can we have indexing like first pages of most the books

  1. Web Automation
  2. Mobile Automation
  3. RESTful API Automation
  4. User Stories ( Test Cases ) management
  5. Smooth collaboration with PM, Dev without blame game & finger pointing

inconsistent Task examples

Most of the example code for writing a Task return something like:

return Instrumented.instanceOf(StartWithATodoListContaining.class).withProperties(Lists.newArrayList(todos));

citation

The example code that is created with the command mvn archetype:generate -Dfilter=screenplay has:

return Tasks.instrumented(Search.class, searchTerm);

Both forms seem to work, at least in version 2.2.2 of serenity-core. Is one preferred over the other?

building the-serenity-book locally

This is a bit of a basic question but perhaps I'll write out my investigations so far as a logged issue to hopefully help others in future. I'm in the process of contributing to the serenity book but I want to be able to preview the book locally with my pre-committed changes, so I can check for formatting and errors.

I understand that the book uses antora to generate the book as a whole, as the book is written in Asciidoctor. So I think these were the installation steps I eventually needed:

  • Checked out the following git repos into my workspace as siblings to each other:
  • Installed (at least) node version 8
    • nvm install 8
    • nvm use 8
  • globally installed asciidoctor and antora:
    • brew install asciidoctor
    • npm i -g @antora/cli
  • from the-serenity-book git directory:
    • npm i @antora/site-generator-default
  • from serenity-docs git directory:
    • npm i @antora/site-generator-default

Then I set to work on the content by making adoc changes locally in the-serenity-book project:

  • modules/ROOT/assets/images
  • modules/ROOT/pages/
  • modules/ROOT/examples/

Then I tried to build it locally:

  • ran this command in the-serenity-book directory to generate content into the build folder:
    • asciidoctor modules/ROOT/pages/*.adoc -D build -a imagesdir=assets/images
  • temporarily edited url property in serenity-docs project site.yml to point to my local project as follows:
site:
  title: The Serenity BDD Book
content:
  sources:
#  - url: https://github.com/serenity-bdd/the-serenity-book.git
   - url: ../the-serenity-book
#    branches: master
ui:
  bundle:
    # url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/master/raw/build/ui-bundle.zip?job=bundle-stable
    url: themes/serenity-antora-theme.zip
    snapshot: true

runtime:
  pull: true
  • ran the command in the serenity-docs project as follows:
    • antora site.yml

But the content output to serenity-docs/build/site/theserenitybook/0.1.0 is still not the up to date content!

Please can you point out the error of my ways? Oddly enough my recent PRs #5 and #4 found their way successfully to the published output, so this is just a local build problem I'm having ๐Ÿ˜ž

maintain.session and @Steps(shared=true) documentation is wrong

In the section "Configuring Cucumber and Serenity":

Maintaining state between scenarios
You may also wish to maintain state between scenarios. By default, Serenity will use new step libraries and action classes for each scenario. However, if you want to share data between the scenarios of a feature, you can use the following option:
serenity.maintain.session = true
With this value set, you can now use either the @Shared annotation, or @Steps(shared=true).

I haven't done anything to test the @Shared annotation, but in my testing:

  1. serenity.maintain.session = true appears to have no effect.
  2. @Steps(shared=true) does not behave as described.

I will discuss my findings here:

Within a single Definition class-instance, all @Steps beans are shared across all of the steps within Scenario, but not within a Feature. Adding (shared=true) has no effect on the creating of new Steps beans between Scenarios within a Feature. When a new Feature is run, every definition used will create new instances of each required Steps bean.

If a Scenario uses multiple Definition classes, then the default behavior is for each Definition class-instance to instantiate new Steps beans on each run.

However, if multiple Definition instances (the behavior is one instance-per-class-per-scenario) use the same Steps bean class with the (shared = true) property, then the Definition instances will share the same Steps bean. This is a very useful feature for persisting data for the duration of a Scenario, but across multiple Definition classes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.