Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    siddhagalaxy
    @siddhagalaxy
    @ashishMal , this sounds similar to your question, but defined in the config file instead of system-env.
    Can you check this answer - https://stackoverflow.com/questions/54716763/reading-extra-properties-or-host-addresses-inside-the-json-test-case/55077950#55077950
    authorjapps
    @authorjapps

    Basically, you can define the properties like this and access as token in the test-cases. e.g.

    host=https://abc.local.uk

    Then you use them as below

    {
            "scenarioName": "Test ...",
            "steps": [
                {
                    "name": "test",
                    "url": "${host}/test/xxx",
                    "operation": "GET",
                    "request": {},
                    "assertions": {
                        "status": 200
                     }
                }
            ]
    }

    Are you looking for host to be supplied as system-env? so that you can execute the test for different hosts in runtime ?

    e.g.

    -Dhost=https://dev1.local.uk

    or

    -Dhost=https://sit1.local.uk

    Is that correct assumption ?

    If so, then that sounds legitimate, we will add that feature soon(will raise an issue for this).

    There is another way also, you can switch env - https://github.com/authorjapps/zerocode/wiki/After-you-have-written-all-the-tests,-what's-next
    (Note- this may not be the answer to your qn. But this is just FYI only in case you need :-) . Just another facility -Denv=ci1 or -Denv=sst1 to switch)

    authorjapps
    @authorjapps

    Check this stackoverflow link- https://stackoverflow.com/questions/56252109/zerocode-set-system-property-in-host-configuration-file

    I see you have worked it out correctly, which is great! :+1: (which unblocks you)

    We will make it more straight forward soonish...

    (Checking with other committers for the best approach... Probably you can pick this ticket and contribute. This shd be a minor code change only)

    authorjapps
    @authorjapps
    authorjapps
    @authorjapps

    FYI All-
    New release published- https://github.com/authorjapps/zerocode/releases/tag/zerocode-tdd-parent-1.3.8

    <dependency>
      <groupId>org.jsmart</groupId>
      <artifactId>zerocode-tdd</artifactId>
      <version>1.3.8</version>
    </dependency>

    Maven -
    https://search.maven.org/artifact/org.jsmart/zerocode-tdd/1.3.8/jar
    https://search.maven.org/artifact/org.jsmart/zerocode-tdd-jupiter/1.3.8/jar

    Bart Robeyns
    @BartRobeyns
    Hi, I'd like to try contributing a feature (retry on rest-requests). Bit worried about the current state of the tests: mvn clean install always (tried current master, zerocode-tdd-parent-1.3.8, zerocode-tdd-parent-1.3.7, zerocode-tdd-parent-1.2.18) fails because of failing tests. Is there a way to get a successfull build with tests executed?
    Bart Robeyns
    @BartRobeyns
    Figured it out: I'll create two issues with PR's to fix it.
    authorjapps
    @authorjapps

    Hi, I'd like to try contributing a feature (retry on rest-requests). Bit worried about the current state of the tests: mvn clean install always (tried current master, zerocode-tdd-parent-1.3.8, zerocode-tdd-parent-1.3.7, zerocode-tdd-parent-1.2.18) fails because of failing tests. Is there a way to get a successfull build with tests executed?

    Hi, I'd like to try contributing a feature (retry on rest-requests).

    Thanks!

    mvn clean install always... failing tests

    Yes, there is an easy way out bypassing Kafka. Thanks for raising this point. This is a long pending Wiki task on us. But, we will amend your PR(Thanks! i.e. BUILDING.md file) with more details, which will be a good nice and quick one pager help for everyone. :+1:

    James Neate
    @jneate
    Hey guys, I posted a potential solution for #248 - be good to get your thoughts
    authorjapps
    @authorjapps
    @ashishMal , can you review the solution please(when u get chance) ? Cheers
    James Neate
    @jneate
    Potential solution posted for #245 - Be good to see your thoughts, are there any other people I should be tagging along with @authorjapps and the OP for any future solutions?
    authorjapps
    @authorjapps
    Thanks James, will take a look soon. Apologies for the delay! All committers are watchers on this repo, they get notified anyways(via gitter as well as the github repo). All seems to be busy in their day job, but will have a quick review soon...
    James Neate
    @jneate
    Fair one, just didn't want to keep spamming you if there were others around also
    officiallysameer
    @officiallysameer

    FYI folks-
    New release published:
    https://search.maven.org/artifact/org.jsmart/zerocode-tdd/1.3.9/jar

    Release notes:
    https://github.com/authorjapps/zerocode/releases/tag/zerocode-tdd-parent-1.3.9

    Maven artefact:

    <dependency>
      <groupId>org.jsmart</groupId>
      <artifactId>zerocode-tdd</artifactId>
      <version>1.3.9</version>
    </dependency>
    Ahnaf Ahmed
    @Ahnaf-Ahmed
    A bit of an odd question but I was wondering about the automated testing of this project itself if there is any
    vkjha2000
    @vkjha2000
    Trying to understand... Did you mean automating the automation itself? Can you shed some more light please?
    Ahnaf Ahmed
    @Ahnaf-Ahmed
    Yes, is there any testing to make sure zerocode itself is working properly in each version?
    authorjapps
    @authorjapps

    automated testing of this project itself

    Understood the Qn now. It's a good question and very valid for every project or OSS lib incl Zerocode. The short answer is Yes, from day1 of the project due to TDD methodology.

    Yes, Zerocode has been developed using TDD approach. This means, every functionality/feature has been covered by (1)one or more unit tests, (2)then feature-tests(sometimes called local-integration tests), then (3)actual integration tests after deployment.

    Then the question arises "how" and "where"?

    Please look at the "src/test/java" package- It has close to 200+ running test-cases just for the core module. Which means- Everytime a PR is raised or a branch is built, all these tests run. Then these are (1) and (2) of the above. After these run completed, the (3) i.e. post-deployment test run.

    • For Http module - We use service virtualization by bringing up REST endpoints in a local container and fire the e2e REST/SOAP/Security tests
    • For Kafka module - We bring up dockerized Kafka containers, then file e2e Kafka tests.

    Other than the above, the HelloWorld project has its own CI job. In this project, we run test coverages for many usecase scenarios to make sure that our new released Zerocode artefact is backward compatible and not breaking any existing customer's contract(zerocode DSL features) intentionally.

    Why we have this?
    Because this is mostly downloaded by folks(testers/developers) just to try out the Zerocode features independently. That's why a separate pipe-line job has been set up to ensure it is green always.

    Only after all the tests are Green, we release the artefact to Maven Nexus Repository.

    To view all the setup above, just have a look at the build YAML files, you will get some more ideas which I might have missed out to answer here.

    Hope it clarifies your Qn.

    bc-nikhil
    @bc-nikhil
    Hi, Can you please help for Re: [authorjapps/zerocode-hello-world] How to handle dynamic indexed values in an array? (#16)
    bc-nikhil
    @bc-nikhil
    @authorjapps Not helpful, How can we use if condition in JSON?
    itsazoo
    @itsazoo
    (sorry this is a repeat of the email I sent @authorjapps) I'm wondering if there's a process in place for determining when a version of zerocode is ready for release, such as an user acceptance test plan or a threshold for outstanding defects.
    authorjapps
    @authorjapps

    @authorjapps Not helpful, How can we use if condition in JSON?

    @bc-nikhil , That SOF page was only to show that the return type is always an array. We have sorted it already anyways :-)

    (sorry this is a repeat of the email I sent @authorjapps) I'm wondering if there's a process in place for determining when a version of zerocode is ready for release, such as an user acceptance test plan or a threshold for outstanding defects.

    @itsazoo , Hello mate, appreciate your Qn. There is no automated process yet. Do you think this will help us or is there anyway we can establish a process around it?

    officiallysameer
    @officiallysameer

    FYI folks-
    New release published:
    https://search.maven.org/artifact/org.jsmart/zerocode-tdd/1.3.11/jar

    Release notes:
    https://github.com/authorjapps/zerocode/releases/tag/zerocode-tdd-parent-1.3.11

    Maven artefact:

    <dependency>
      <groupId>org.jsmart</groupId>
      <artifactId>zerocode-tdd</artifactId>
      <version>1.3.11</version>
    </dependency>
    bc-nikhil
    @bc-nikhil
    Hey Guys, Is there any way to implement implicit wait?
    authorjapps
    @authorjapps
    Invoking Thread.sleep(miliSec*1000) should do. e.g. sleep(2000) will wait for 2 sec.
    What did you mean by implicit wait? Are you trying to achieve every REST API invocation to wait for a certain amount of time implicitly?
    bc-nikhil
    @bc-nikhil
    I mean few API's respond within a few seconds and sometimes the same API's take long like 1 min. So, is there any way to define implicit time as we can maybe define 2 min max and whenever I get the response we will move to the next step.
    santhoshkumar
    @santhoshTpixler
    @bc-nikhil are you looking for a timeout for a request?
    bc-nikhil
    @bc-nikhil
    No, I am looking to add implicit wait time in our code.
    authorjapps
    @authorjapps

    retry mechanism will help you certainly which is due for release v 1.3.12.

    But your usecase if a slightly more than that. That's again not a Zerocode challenge. But it's testing challenge.
    Here again Zerocode shoud help you to solve this easily.

    But you need to explain it a bit more to exactly understand the problem and propose a solution.

    Q1. What happens if the API take more than 2mins as you have set max timeout as 2min? Just FAIL this step n move to next step?

    Q2. Because there was no response received in the earlier step, you can't use the response or any fields of the response as JSON Path in the net steps. Have you thought of this?

    Q3. 2min for a API call sounds bit unreasonable. Has the SLA been defined like that? Can't the API server just send an Ack-Message with 200(OK) that it's doing it's job and send a push-notification or do a DB state-change once done? This is just a proposal - Your architects might know better why they have designed this kind of APIs. Why not go with Async implemenation(MQ based or Kafka based...)? Just a thought...

    Q1 and Q2 - These can be achieved definitely and easily. You just need a timeout mechanism configured. That's it.
    Q3 - This is a design issue and design decission.
    bc-nikhil
    @bc-nikhil
    Can you please read about the implicit wait you will get an idea what I am expecting.
    authorjapps
    @authorjapps

    please read about the implicit wait

    Read where? Do you have a link ?

    authorjapps
    @authorjapps

    @bc-ninkil , Still trying to understand your requirement?
    Can we discuss over web meeting? That will be much quicker to solve...
    Can you please join our MailingList first, then we(incl. @santhoshTpixler ) will be able to invite you to the web meeting?
    MailingList link : click here

    Also propose a timing of your choice as most of us are in different timezones in this month.

    authorjapps
    @authorjapps
    Hello All, can you please join our Slack channel please?
    Link: https://app.slack.com/client/TM8D8URQD/CM2267MLZ/details/info
    Channel name: zerocode-help-and-support
    Wilfredo Aguilar
    @waguilar101010_twitter
    can somebody help me with a java lab
    is about musical note frequency
    i have code.. but is not workign
    officiallysameer
    @officiallysameer
    @waguilar101010_twitter
    Can you describe in detail what you are trying to do
    Patrick Mannion
    @tophat63_gitlab
    is this still active or has zerocode/help-and-usage moved to Slack ?
    suwadkar
    @suwadkar
    Hello. I wanted to know if there is a possibility to change the report generation path from target folder to something else. Reason to this is that we have tests return and available in bitbucket rep. The jenkins job pulls the code from the repo and runs the test class. but it is unable to access the report from the target folder
    ghilainm
    @ghilainm
    Hello guys, i am using zerocode-tdd is it possible to make it output test report in another folder than target (I am using gradle)