JBehave
  1. JBehave
  2. JBEHAVE-842

Not entering in @Given for multiple table with multiple variable

    Details

    • Type: Wish Wish
    • Status: Resolved Resolved
    • Priority: Critical Critical
    • Resolution: Not A Bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Eclipse Support
    • Labels:
      None
    • Number of attachments :
      0

      Description

      I am not entering to @Given. Please advise.

      Story:
      Given a data of members
      MemberID|FName| LName|CarrierID| GroupID| DOB| Address1| Address2| City| State| ZipCode|
      100000000|PINKIE PIE|PONY| | | | | | | | | |
      100000001|Rainbow|Dash| | | | | | | | | | |

      and providers
      ProviderID|FName| LName| Address1| Address2| City| State| ZipCode|
      100000000|PINKIE PIE|PONY| | | | | |
      100000001|Rainbow|Dash| | | | | |

      and claims
      ClaimID| MemberID| ProviderID| ClaimStatus|DaysSupply |GPI |Qty|ClaimDt|DrugName|DiagnosisCode|ProviderID| PFName| PLastName| PartyID|
      100000000|100000000| 100000002|P| 30|62053550100330|60| | | | | | | |

      When AP_Dementia is the program to run with 2 DTPcount

      Then match output file in this file location

      Steps:
      @Given("a data of $members and $providers and $claims ")
      public void TestFixtures(ExamplesTable members, ExamplesTable claims,
      ExamplesTable providers)

      { dataHelper.createMembers(members.getRows()); dataHelper.createProviders(providers.getRows()); dataHelper.createClaims(claims.getRows()); }

      @When("AP_Dementia is the program to run with 2 DTPcount")
      public void runGuidedHealth()

      { // TODO: call guidedhealth DrugSafetyTests dst = new DrugSafetyTests(); dst.executeTest(); }

      @Then("match output file in this file location")
      public void CheckFileOutput() {

      }

      ------Console output -----

      Processing system properties {}
      Using controls EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=true,ignoreFailureInView=true,verboseFailures=false,verboseFiltering=false,storyTimeoutInSecs=60,threads=2]
      Running story com/story/DrugSafetyTest.story

      (com/story/DrugSafetyTest.story)
      Scenario: Retrieve member information by member ID and running rule
      Given a data of members
      MemberID|FName| LName|CarrierID| GroupID| DOB| Address1| Address2| City| State| ZipCode|
      100000000|PINKIE PIE|PONY| | | | | | | | | |
      100000001|Rainbow|Dash| | | | | | | | | | |

      and providers
      ProviderID|FName| LName| Address1| Address2| City| State| ZipCode|
      100000000|PINKIE PIE|PONY| | | | | |
      100000001|Rainbow|Dash| | | | | |

      and claims
      ClaimID| MemberID| ProviderID| ClaimStatus|DaysSupply |GPI |Qty|ClaimDt|DrugName|DiagnosisCode|ProviderID| PFName| PLastName| PartyID|
      100000000|100000000| 100000002|P| 30|62053550100330|60| | | | | | | | (PENDING)
      When AP_Dementia is the program to run with 2 DTPcount (NOT PERFORMED)
      Then match output file in this file location (NOT PERFORMED)
      @Given("a data of members \r\nMemberID|FName| LName|CarrierID| GroupID| DOB| Address1| Address2| City| State| ZipCode| \r\n100000000|PINKIE PIE|PONY|\t|\t|\t|\t|\t|\t|\t|\t|\t|\r\n100000001|Rainbow|Dash|\t|\t|\t|\t|\t|\t|\t|\t|\t|\t|\r\n\r\nand providers \r\nProviderID|FName| LName| Address1| Address2| City| State| ZipCode| \r\n100000000|PINKIE PIE|PONY|\t|\t|\t|\t|\t|\r\n100000001|Rainbow|Dash|\t\t|\t|\t|\t|\t|\r\n\r\nand claims \r\nClaimID| MemberID| ProviderID| ClaimStatus|DaysSupply |GPI |Qty|ClaimDt|DrugName|DiagnosisCode|ProviderID| PFName| PLastName| PartyID|\r\n100000000|100000000| 100000002|P| 30|62053550100330|60|\t|\t|\t|\t|\t|\t|\t|")
      @Pending
      public void givenADataOfMembersMemberIDFNameLNameCarrierIDGroupIDDOBAddress1Address2CityStateZipCode100000000PINKIEPIEPONY100000001RainbowDashAndProvidersProviderIDFNameLNameAddress1Address2CityStateZipCode100000000PINKIEPIEPONY100000001RainbowDashAndClaimsClaimIDMemberIDProviderIDClaimStatusDaysSupplyGPIQtyClaimDtDrugNameDiagnosisCodeProviderIDPFNamePLastNamePartyID100000000100000000100000002P306205355010033060()

      { // PENDING }

        Activity

        Hide
        Mauro Talevi added a comment -

        You're using the wrong matching pattern. Instead of

        @Given("a data of $members and $providers and $claims ")
        

        you should use

        @Given("a data of members $members and providers $providers and claims $claims")
        

        Or change the language in your textual story.

        Also, bear in mind that the Eclipse plugin does not recognise for the moment "partial tables", i.e. table rows must start and end with "|".

        Show
        Mauro Talevi added a comment - You're using the wrong matching pattern. Instead of @Given( "a data of $members and $providers and $claims " ) you should use @Given( "a data of members $members and providers $providers and claims $claims" ) Or change the language in your textual story. Also, bear in mind that the Eclipse plugin does not recognise for the moment "partial tables", i.e. table rows must start and end with "|".
        Mauro Talevi made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Not A Bug [ 6 ]
        Hide
        Goops Shre added a comment -

        I tried with the syntax of @Given (you recommended) including all tables as well as individual table. No progress.
        1. New thing I added is "|" while starting as well as ending. No good news..
        2. Addition to that I kept empty field exactly as per the field, my previous table filed was less than the empty columns. No good news...

        Any Advise???

        Revised Code:
        @Given("a data of members $members and providers $providers and claims $claims")
        public void TestFixtures(ExamplesTable members, ExamplesTable claims,
        ExamplesTable providers)

        { dataHelper.createMembers(members.getRows()); dataHelper.createProviders(providers.getRows()); dataHelper.createClaims(claims.getRows()); }

        Revised Story:
        Given a data of members
        MemberID |FName |LName |CarrierID| GroupID| DOB| Address1| Address2| City| State| ZipCode|

        100000000 PINKIE PIE PONY                
        100000001 Rainbow Dash                

        and providers

        ProviderID FName LName Address1 Address2 City State ZipCode
        100000000 PINKIE PIE PONY          
        100000001 Rainbow Dash          

        and claims

        ClaimID MemberID ProviderID ClaimStatus DaysSupply GPI Qty ClaimDt DrugName DiagnosisCode ProviderID PFName PLastName PartyID
        100000000 100000000 100000002 P 30 62053550100330 60              

        here is the result...

        (com/story/DrugSafetyTest.story)
        Scenario: Retrieve member information by member ID and rule Rule name
        Given a data of members
        MemberID |FName |LName |CarrierID| GroupID| DOB| Address1| Address2| City| State| ZipCode|

        100000000 PINKIE PIE PONY                
        100000001 Rainbow Dash                

        and providers

        ProviderID FName LName Address1 Address2 City State ZipCode
        100000000 PINKIE PIE PONY          
        100000001 Rainbow Dash          

        and claims

        ClaimID MemberID ProviderID ClaimStatus DaysSupply GPI Qty ClaimDt DrugName DiagnosisCode ProviderID PFName PLastName PartyID
        100000000 100000000 100000002 P 30 62053550100330 60               (PENDING)
        When AP_Dementia is the program to run with 2 DTPcount (NOT PERFORMED)
        Then match output file in this file location (NOT PERFORMED)
        @Given("a data of members \r\nMemberID\t
        FName\t\t LName\t CarrierID GroupID DOB Address1 Address2 City State ZipCode \r\n 100000000\t PINKIE PIE\t PONY\t \t \t \t \t \t \t \t \t \r\n 100000001\t Rainbow\t Dash\t \t \t \t \t \t \t \t \t \r\n\r\nand providers \r\n ProviderID FName\t LName\t Address1 Address2 City State ZipCode \r\n 100000000 PINKIE PIE PONY \t \t \t \t \t \r\n 100000001 Rainbow Dash \t\t \t \t \t \t \r\n\r\nand claims \r\n ClaimID MemberID ProviderID ClaimStatus DaysSupply GPI Qty ClaimDt DrugName DiagnosisCode ProviderID PFName PLastName PartyID \r\n 100000000 100000000 100000002 P 30 62053550100330 60 \t \t \t \t \t \t \t ")
        @Pending
        public void givenADataOfMembersMemberIDFNameLNameCarrierIDGroupIDDOBAddress1Address2CityStateZipCode100000000PINKIEPIEPONY100000001RainbowDashAndProvidersProviderIDFNameLNameAddress1Address2CityStateZipCode100000000PINKIEPIEPONY100000001RainbowDashAndClaimsClaimIDMemberIDProviderIDClaimStatusDaysSupplyGPIQtyClaimDtDrugNameDiagnosisCodeProviderIDPFNamePLastNamePartyID100000000100000000100000002P306205355010033060() { // PENDING }
        Show
        Goops Shre added a comment - I tried with the syntax of @Given (you recommended) including all tables as well as individual table. No progress. 1. New thing I added is "|" while starting as well as ending. No good news.. 2. Addition to that I kept empty field exactly as per the field, my previous table filed was less than the empty columns. No good news... Any Advise??? Revised Code: @Given("a data of members $members and providers $providers and claims $claims") public void TestFixtures(ExamplesTable members, ExamplesTable claims, ExamplesTable providers) { dataHelper.createMembers(members.getRows()); dataHelper.createProviders(providers.getRows()); dataHelper.createClaims(claims.getRows()); } Revised Story: Given a data of members MemberID |FName |LName |CarrierID| GroupID| DOB| Address1| Address2| City| State| ZipCode| 100000000 PINKIE PIE PONY                 100000001 Rainbow Dash                 and providers ProviderID FName LName Address1 Address2 City State ZipCode 100000000 PINKIE PIE PONY           100000001 Rainbow Dash           and claims ClaimID MemberID ProviderID ClaimStatus DaysSupply GPI Qty ClaimDt DrugName DiagnosisCode ProviderID PFName PLastName PartyID 100000000 100000000 100000002 P 30 62053550100330 60               here is the result... (com/story/DrugSafetyTest.story) Scenario: Retrieve member information by member ID and rule Rule name Given a data of members MemberID |FName |LName |CarrierID| GroupID| DOB| Address1| Address2| City| State| ZipCode| 100000000 PINKIE PIE PONY                 100000001 Rainbow Dash                 and providers ProviderID FName LName Address1 Address2 City State ZipCode 100000000 PINKIE PIE PONY           100000001 Rainbow Dash           and claims ClaimID MemberID ProviderID ClaimStatus DaysSupply GPI Qty ClaimDt DrugName DiagnosisCode ProviderID PFName PLastName PartyID 100000000 100000000 100000002 P 30 62053550100330 60               (PENDING) When AP_Dementia is the program to run with 2 DTPcount (NOT PERFORMED) Then match output file in this file location (NOT PERFORMED) @Given("a data of members \r\nMemberID\t FName\t\t LName\t CarrierID GroupID DOB Address1 Address2 City State ZipCode \r\n 100000000\t PINKIE PIE\t PONY\t \t \t \t \t \t \t \t \t \r\n 100000001\t Rainbow\t Dash\t \t \t \t \t \t \t \t \t \r\n\r\nand providers \r\n ProviderID FName\t LName\t Address1 Address2 City State ZipCode \r\n 100000000 PINKIE PIE PONY \t \t \t \t \t \r\n 100000001 Rainbow Dash \t\t \t \t \t \t \r\n\r\nand claims \r\n ClaimID MemberID ProviderID ClaimStatus DaysSupply GPI Qty ClaimDt DrugName DiagnosisCode ProviderID PFName PLastName PartyID \r\n 100000000 100000000 100000002 P 30 62053550100330 60 \t \t \t \t \t \t \t ") @Pending public void givenADataOfMembersMemberIDFNameLNameCarrierIDGroupIDDOBAddress1Address2CityStateZipCode100000000PINKIEPIEPONY100000001RainbowDashAndProvidersProviderIDFNameLNameAddress1Address2CityStateZipCode100000000PINKIEPIEPONY100000001RainbowDashAndClaimsClaimIDMemberIDProviderIDClaimStatusDaysSupplyGPIQtyClaimDtDrugNameDiagnosisCodeProviderIDPFNamePLastNamePartyID100000000100000000100000002P306205355010033060() { // PENDING }

          People

          • Assignee:
            Unassigned
            Reporter:
            Goops Shre
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: