Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Michal Losiewicz
    @mlosiewicz-pl
    Hi there, I started using cornichon and the experience was mostly positive. I have one question though, does it support something like tagging tests or skipping tests conditionally? I don't want to run all the tests that work on dev environment on staging or production, but I would like to have same project for all environments.
    Arnaud Gourlay
    @agourlay
    @mlosiewicz-pl there are two interesting functions defined on both feature and scenario.
    def ignoredBecause(reason: String)
    def ignoredIfDefined(reason: Option[String])
    the first one always ignores and the second one ignores only if the reason is defined
    the second one can be used to ignore conditionally based for instance on a config knob
    at my employer we have a custom tags system built on top of this
    maybe one day it will find its way in mainline Cornichon
    but for the time being you should be able to do something similar
    the experience was mostly positive
    I would love to hear about the bad parts :pray:
    Michal Losiewicz
    @mlosiewicz-pl
    @agourlay awesome, thank you very much.
    I haven't seen any really bad things, the worst probably being missing dsl for http requests, but we have very specific http integrations not really following any REST principles, so overall we're very happy to use the Cornichon
    Arnaud Gourlay
    @agourlay
    the worst probably being missing dsl for http requests,
    can this be improved on Cornichon side maybe?
    do you have an example?
    Michal Losiewicz
    @mlosiewicz-pl
    it could, when I have more time I'll try to dig more into the http dsl and see if I can add it to the dsl
    Arnaud Gourlay
    @agourlay
    Sounds great :plus1:
    Arnaud Gourlay
    @agourlay
    @/all I am really happy to announce the release of cornichon 0.18.0 :tada:
    https://github.com/agourlay/cornichon/releases/tag/v0.18.0
    As usual please report any issues with this new shiny version.
    Srepfler Srdan
    @schrepfler
    :clap:
    Srepfler Srdan
    @schrepfler
    @agourlay any plans to publish cornichon for scala 2.13?
    mikhail-g
    @mikhail-g
    Hi guys, does somebody has experience with integration of Cornichon with a test management tool?
    I want to get the metadata of feature/scenario/step like name, parameters, results etc
    Arnaud Gourlay
    @agourlay
    @schrepfler I am waiting for a release of Sangria targeting 2.13.
    @mikhail-g I am not sure what you mean by a test management tool. Do you have some examples of products?
    FYI at work I am using TeamCity to run Cornichon tests and it gives a lot of metadata about the runs.
    mikhail-g
    @mikhail-g
    @agourlay I mean test management tool like qTest, TestRail, Zephyr, Rally etc the system that stores test cases and test run results.
    Basically what I need is to dynamically get the status, name, and parameters of feature/scenario/step in afterEachScenario or afterFeature in order to post them to test management tools API
    Arnaud Gourlay
    @agourlay
    Sorry I have zero experience with those tools.
    How do you talk with such systems? Via an HTTP API?
    mikhail-g
    @mikhail-g
    Yes, API of those tools is not a problem. The broblem is to get information about cornichon scenario dynamically and I don't know how could I do that
    Arnaud Gourlay
    @agourlay
    Ok one thing to try.
    SBT generates a junit.xml file containing a lot of information about the scenarios.
    You could check if those tools handle this format.
    Arnaud Gourlay
    @agourlay
    Second idea, if you are using cornichon-scalatest, it is possible to inject a custom reporter.
    I am not a big fan of this because I want to deprecated the cornichon-scalatest module.
    There is the backlog this issue that sounds similar agourlay/cornichon#232
    Otherwise I would need to develop a new system of hooks similar to the Scalatest reporter to expose internals to the users.
    But TBH this is currently not a priority for me so it would to be a contribution coming from the community.
    mikhail-g
    @mikhail-g
    Thank you for the clarification @agourlay
    Is there a way to run a subset of tests by tags or groups like in Cucumber or Junit?
    I found only testOnly *CornichonExamplesSpec, but it's not the desired solution if you want to run smoke or regression tests only
    Arnaud Gourlay
    @agourlay
    there is currently not official system for tagging tests
    it is a popular request though, so it is strongly gaining priority in the list of next development
    Michal Losiewicz
    @mlosiewicz-pl
    Hello @agourlay, is there a way to replace the http client in cornichon? or build it differently? I was going through the code and couldn't find an easy way to do it.
    Arnaud Gourlay
    @agourlay
    @mlosiewicz-pl no there is no way to to do that currently.
    The internal of http4s are slowly creeping in the HttpService.
    What are you trying to achieve?
    Michal Losiewicz
    @mlosiewicz-pl
    I wanted to check if the http client is causing issues with retries but it looks like the problem was elsewhere, thanks for the answer
    Arnaud Gourlay
    @agourlay
    Thanks for the update :)
    SStepanoFF
    @SStepanoFF
    Hello @agourlay . Is it possible to store in session List of objects inside the EffectStep?
    Arnaud Gourlay
    @agourlay
    @SStepanoFF Session stores String.
    This means you would like to have a List[String] instead?
    What are you trying to do exactly? :)
    SStepanoFF
    @SStepanoFF
    @agourlay yes, for example, I want to store List[String] or list of any other objects.
    Arnaud Gourlay
    @agourlay
    I don't feel good about saving random objects in the Session for the moment, don't expect String to go away soon.
    Are you using JSON for your payloads?
    You could serialize an array of JSON object and get it done.
    SStepanoFF
    @SStepanoFF
    It's not a JSON but anyway thank you for the answers
    Arnaud Gourlay
    @agourlay
    May I ask what type it is?
    SStepanoFF
    @SStepanoFF
    It is a list of objects of my custom class
    Arnaud Gourlay
    @agourlay
    is it coming from the network?
    SStepanoFF
    @SStepanoFF
    sorry, i think I made a misunderstanding. I don't need this session storage for the payloads. I just wont to store data