Details

    1. TestCaseForPOReceipts.patch
      5 kB
      Sumit Pandit
    2. TestCaseForPOReceipts.patch
      5 kB
      Sumit Pandit
    3. TestCaseForPOReceipts.patch
      7 kB
      Parimal Gain

      Issue Links

        Activity

        Hide
        Sumit Pandit added a comment - - edited

        The purpose of the test case is to verify Automatic Accounting transactions

        it follows the following process :-

        1) Create purchase order for a 'n' number of Product 'X' , approve it.
        2) create the in coming shipment and receive n units of X into facility, the QOH = n will be created.

        Expected output :
        Cr in account 214000 - UNINVOICED ITEM RECEIPT amount = grand total of order.
        Dr in account 140000- INVENTORY amount = grand total of order.

        These write-ups are provided by Jacopo.

        Show
        Sumit Pandit added a comment - - edited The purpose of the test case is to verify Automatic Accounting transactions it follows the following process :- 1) Create purchase order for a 'n' number of Product 'X' , approve it. 2) create the in coming shipment and receive n units of X into facility, the QOH = n will be created. Expected output : Cr in account 214000 - UNINVOICED ITEM RECEIPT amount = grand total of order. Dr in account 140000- INVENTORY amount = grand total of order. These write-ups are provided by Jacopo.
        Hide
        Sumit Pandit added a comment -

        Here is the patch for the test case. Kindly have a look on it.

        Show
        Sumit Pandit added a comment - Here is the patch for the test case. Kindly have a look on it.
        Hide
        Vikas Mayur added a comment -

        Thanks Sumit,

        Your patch is in trunk rev. 658672

        • Vikas
        Show
        Vikas Mayur added a comment - Thanks Sumit, Your patch is in trunk rev. 658672 Vikas
        Hide
        Jacques Le Roux added a comment - - edited

        I gave it a try but I got (sorry Postgres is installed in french)

        [java] DÚtailá: La cl? (order_id,order_item_seq_id)=(WS10000,00001) n'est pas pr?sente dans la table ? order_item ?.))] calling service createShipmentReceipt in receiveInventoryProduct calling service
        receiveInventoryProduct in testAcctgTransOnPOReceipts
        [java] 2008-05-21 10:14:29,390 (main) [ TestRunContainer.java:138:INFO ] [JUNIT] Pass: false | # Tests: 4 | # Failed: 1 # Errors: 0
        [java] 2008-05-21 10:14:29,390 (main) [ TestRunContainer.java:141:INFO ] [JUNIT] ----------------------------- ERRORS ----------------------------- [JUNIT]
        [java] 2008-05-21 10:14:29,390 (main) [ TestRunContainer.java:144:INFO ] None
        [java] 2008-05-21 10:14:29,390 (main) [ TestRunContainer.java:154:INFO ] [JUNIT] ------------------------------------------------------------------ [JUNIT]
        [java] 2008-05-21 10:14:29,406 (main) [ TestRunContainer.java:155:INFO ] [JUNIT] ---------------------------- FAILURES ---------------------------- [JUNIT]
        [java] 2008-05-21 10:14:29,406 (main) [ TestRunContainer.java:162:INFO ] --> org.ofbiz.testtools.SimpleMethodTest@47e8f3: Erreur :Erreur :ERROR: Could not complete the Create a ShipmentReceipt [file:/D
        :/workspace/ofbizRun/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml#createShipmentReceipt] process [problem creating the newEntity value: Error while inserting: [GenericEnt
        ity:ShipmentReceipt][createdStamp,2008-05-21 10:14:29.281(java.sql.Timestamp)][createdTxStamp,2008-05-21 10:14:28.546(java.sql.Timestamp)][datetimeReceived,2008-05-21 10:14:29.281(java.sql.Timestamp)][invento
        ryItemId,10022(java.lang.String)][lastUpdatedStamp,2008-05-21 10:14:29.281(java.sql.Timestamp)][lastUpdatedTxStamp,2008-05-21 10:14:28.546(java.sql.Timestamp)][orderId,WS10000(java.lang.String)][orderItemSeqI
        d,00001(java.lang.String)][productId,WG-1111(java.lang.String)][quantityAccepted,10.0(java.lang.Double)][quantityRejected,0.0(java.lang.Double)][receiptId,10000(java.lang.String)][receivedByUserLoginId,system
        (java.lang.String)][shipmentId,10000(java.lang.String)] (SQL Exception while executing the following:INSERT INTO public.SHIPMENT_RECEIPT (RECEIPT_ID, INVENTORY_ITEM_ID, PRODUCT_ID, SHIPMENT_ID, SHIPMENT_PACKA
        GE_SEQ_ID, ORDER_ID, ORDER_ITEM_SEQ_ID, RETURN_ID, RETURN_ITEM_SEQ_ID, REJECTION_ID, RECEIVED_BY_USER_LOGIN_ID, DATETIME_RECEIVED, ITEM_DESCRIPTION, QUANTITY_ACCEPTED, QUANTITY_REJECTED, LAST_UPDATED_STAMP, L
        AST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERREUR: une instruction insert ou update sur la table ? shipment_receipt ? viole la con
        trainte de cl?
        [java] ?trang?re ? shp_rcpt_orditm ?
        [java] DÚtailá: La cl? (order_id,order_item_seq_id)=(WS10000,00001) n'est pas pr?sente dans la table ? order_item ?.))] calling service createShipmentReceipt in receiveInventoryProduct calling service
        receiveInventoryProduct in testAcctgTransOnPOReceipts
        [java] 2008-05-21 10:14:29,406 (main) [ TestRunContainer.java:164:INFO ] junit.framework.AssertionFailedError: Erreur :Erreur :ERROR: Could not complete the Create a ShipmentReceipt [file:/D:/workspace
        /ofbizRun/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml#createShipmentReceipt] process [problem creating the newEntity value: Error while inserting: [GenericEntity:Shipmen
        tReceipt][createdStamp,2008-05-21 10:14:29.281(java.sql.Timestamp)][createdTxStamp,2008-05-21 10:14:28.546(java.sql.Timestamp)][datetimeReceived,2008-05-21 10:14:29.281(java.sql.Timestamp)][inventoryItemId,10
        022(java.lang.String)][lastUpdatedStamp,2008-05-21 10:14:29.281(java.sql.Timestamp)][lastUpdatedTxStamp,2008-05-21 10:14:28.546(java.sql.Timestamp)][orderId,WS10000(java.lang.String)][orderItemSeqId,00001(jav
        a.lang.String)][productId,WG-1111(java.lang.String)][quantityAccepted,10.0(java.lang.Double)][quantityRejected,0.0(java.lang.Double)][receiptId,10000(java.lang.String)][receivedByUserLoginId,system(java.lang.
        String)][shipmentId,10000(java.lang.String)] (SQL Exception while executing the following:INSERT INTO public.SHIPMENT_RECEIPT (RECEIPT_ID, INVENTORY_ITEM_ID, PRODUCT_ID, SHIPMENT_ID, SHIPMENT_PACKAGE_SEQ_ID,
        ORDER_ID, ORDER_ITEM_SEQ_ID, RETURN_ID, RETURN_ITEM_SEQ_ID, REJECTION_ID, RECEIVED_BY_USER_LOGIN_ID, DATETIME_RECEIVED, ITEM_DESCRIPTION, QUANTITY_ACCEPTED, QUANTITY_REJECTED, LAST_UPDATED_STAMP, LAST_UPDATED
        _TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERREUR: une instruction insert ou update sur la table ? shipment_receipt ? viole la contrainte de
        cl?
        [java] ?trang?re ? shp_rcpt_orditm ?
        [java] DÚtailá: La cl? (order_id,order_item_seq_id)=(WS10000,00001) n'est pas pr?sente dans la table ? order_item ?.))] calling service createShipmentReceipt in receiveInventoryProduct calling service
        receiveInventoryProduct in testAcctgTransOnPOReceipts
        [java] at org.ofbiz.testtools.SimpleMethodTest.run(SimpleMethodTest.java:70)
        [java] at junit.framework.TestSuite.runTest(TestSuite.java:208)
        [java] at junit.framework.TestSuite.run(TestSuite.java:203)
        [java] at org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:134)
        [java] at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:101)
        [java] at org.ofbiz.base.start.Start.startStartLoaders(Start.java:263)
        [java] at org.ofbiz.base.start.Start.startServer(Start.java:312)
        [java] at org.ofbiz.base.start.Start.start(Start.java:316)
        [java] at org.ofbiz.base.start.Start.main(Start.java:399)
        [java]

        Do I am missing something ? (Note: I tested it with the 1st patch, I retry right now)

        Show
        Jacques Le Roux added a comment - - edited I gave it a try but I got (sorry Postgres is installed in french) [java] DÚtailá: La cl? (order_id,order_item_seq_id)=(WS10000,00001) n'est pas pr?sente dans la table ? order_item ?.))] calling service createShipmentReceipt in receiveInventoryProduct calling service receiveInventoryProduct in testAcctgTransOnPOReceipts [java] 2008-05-21 10:14:29,390 (main) [ TestRunContainer.java:138:INFO ] [JUNIT] Pass: false | # Tests: 4 | # Failed: 1 # Errors: 0 [java] 2008-05-21 10:14:29,390 (main) [ TestRunContainer.java:141:INFO ] [JUNIT] ----------------------------- ERRORS ----------------------------- [JUNIT] [java] 2008-05-21 10:14:29,390 (main) [ TestRunContainer.java:144:INFO ] None [java] 2008-05-21 10:14:29,390 (main) [ TestRunContainer.java:154:INFO ] [JUNIT] ------------------------------------------------------------------ [JUNIT] [java] 2008-05-21 10:14:29,406 (main) [ TestRunContainer.java:155:INFO ] [JUNIT] ---------------------------- FAILURES ---------------------------- [JUNIT] [java] 2008-05-21 10:14:29,406 (main) [ TestRunContainer.java:162:INFO ] --> org.ofbiz.testtools.SimpleMethodTest@47e8f3: Erreur :Erreur :ERROR: Could not complete the Create a ShipmentReceipt [file:/D :/workspace/ofbizRun/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml#createShipmentReceipt] process [problem creating the newEntity value: Error while inserting: [GenericEnt ity:ShipmentReceipt] [createdStamp,2008-05-21 10:14:29.281(java.sql.Timestamp)] [createdTxStamp,2008-05-21 10:14:28.546(java.sql.Timestamp)] [datetimeReceived,2008-05-21 10:14:29.281(java.sql.Timestamp)] [invento ryItemId,10022(java.lang.String)] [lastUpdatedStamp,2008-05-21 10:14:29.281(java.sql.Timestamp)] [lastUpdatedTxStamp,2008-05-21 10:14:28.546(java.sql.Timestamp)] [orderId,WS10000(java.lang.String)] [orderItemSeqI d,00001(java.lang.String)] [productId,WG-1111(java.lang.String)] [quantityAccepted,10.0(java.lang.Double)] [quantityRejected,0.0(java.lang.Double)] [receiptId,10000(java.lang.String)] [receivedByUserLoginId,system (java.lang.String)] [shipmentId,10000(java.lang.String)] (SQL Exception while executing the following:INSERT INTO public.SHIPMENT_RECEIPT (RECEIPT_ID, INVENTORY_ITEM_ID, PRODUCT_ID, SHIPMENT_ID, SHIPMENT_PACKA GE_SEQ_ID, ORDER_ID, ORDER_ITEM_SEQ_ID, RETURN_ID, RETURN_ITEM_SEQ_ID, REJECTION_ID, RECEIVED_BY_USER_LOGIN_ID, DATETIME_RECEIVED, ITEM_DESCRIPTION, QUANTITY_ACCEPTED, QUANTITY_REJECTED, LAST_UPDATED_STAMP, L AST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERREUR: une instruction insert ou update sur la table ? shipment_receipt ? viole la con trainte de cl? [java] ?trang?re ? shp_rcpt_orditm ? [java] DÚtailá: La cl? (order_id,order_item_seq_id)=(WS10000,00001) n'est pas pr?sente dans la table ? order_item ?.))] calling service createShipmentReceipt in receiveInventoryProduct calling service receiveInventoryProduct in testAcctgTransOnPOReceipts [java] 2008-05-21 10:14:29,406 (main) [ TestRunContainer.java:164:INFO ] junit.framework.AssertionFailedError: Erreur :Erreur :ERROR: Could not complete the Create a ShipmentReceipt [file:/D:/workspace /ofbizRun/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml#createShipmentReceipt] process [problem creating the newEntity value: Error while inserting: [GenericEntity:Shipmen tReceipt] [createdStamp,2008-05-21 10:14:29.281(java.sql.Timestamp)] [createdTxStamp,2008-05-21 10:14:28.546(java.sql.Timestamp)] [datetimeReceived,2008-05-21 10:14:29.281(java.sql.Timestamp)] [inventoryItemId,10 022(java.lang.String)] [lastUpdatedStamp,2008-05-21 10:14:29.281(java.sql.Timestamp)] [lastUpdatedTxStamp,2008-05-21 10:14:28.546(java.sql.Timestamp)] [orderId,WS10000(java.lang.String)] [orderItemSeqId,00001(jav a.lang.String)] [productId,WG-1111(java.lang.String)] [quantityAccepted,10.0(java.lang.Double)] [quantityRejected,0.0(java.lang.Double)] [receiptId,10000(java.lang.String)] [receivedByUserLoginId,system(java.lang. String)] [shipmentId,10000(java.lang.String)] (SQL Exception while executing the following:INSERT INTO public.SHIPMENT_RECEIPT (RECEIPT_ID, INVENTORY_ITEM_ID, PRODUCT_ID, SHIPMENT_ID, SHIPMENT_PACKAGE_SEQ_ID, ORDER_ID, ORDER_ITEM_SEQ_ID, RETURN_ID, RETURN_ITEM_SEQ_ID, REJECTION_ID, RECEIVED_BY_USER_LOGIN_ID, DATETIME_RECEIVED, ITEM_DESCRIPTION, QUANTITY_ACCEPTED, QUANTITY_REJECTED, LAST_UPDATED_STAMP, LAST_UPDATED _TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERREUR: une instruction insert ou update sur la table ? shipment_receipt ? viole la contrainte de cl? [java] ?trang?re ? shp_rcpt_orditm ? [java] DÚtailá: La cl? (order_id,order_item_seq_id)=(WS10000,00001) n'est pas pr?sente dans la table ? order_item ?.))] calling service createShipmentReceipt in receiveInventoryProduct calling service receiveInventoryProduct in testAcctgTransOnPOReceipts [java] at org.ofbiz.testtools.SimpleMethodTest.run(SimpleMethodTest.java:70) [java] at junit.framework.TestSuite.runTest(TestSuite.java:208) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:134) [java] at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:101) [java] at org.ofbiz.base.start.Start.startStartLoaders(Start.java:263) [java] at org.ofbiz.base.start.Start.startServer(Start.java:312) [java] at org.ofbiz.base.start.Start.start(Start.java:316) [java] at org.ofbiz.base.start.Start.main(Start.java:399) [java] Do I am missing something ? (Note: I tested it with the 1st patch, I retry right now)
        Hide
        Jacques Le Roux added a comment -

        I suppose it's because I assumed the <!-- Precondition : shipment is created from supplier and order items are issued --> was already included(from demo data). I retry creating it by hand before.

        Show
        Jacques Le Roux added a comment - I suppose it's because I assumed the <!-- Precondition : shipment is created from supplier and order items are issued --> was already included(from demo data). I retry creating it by hand before.
        Hide
        Jacques Le Roux added a comment -

        Same problem, I guess it's because I used a DB which has already orders in it. I suppose it's ok...

        Show
        Jacques Le Roux added a comment - Same problem, I guess it's because I used a DB which has already orders in it. I suppose it's ok...
        Hide
        Jacques Le Roux added a comment -

        Finally has I had some time to better know how to use this I tried to create a new fresh DB with run-install and then ran run-tests. Logically I got the same error since there are no Order with orderId WS10000. I then tried to create a new PO but then I got OOTB a PO with orderId WS10010. So I wonder how this should be used. May I have some explanations please ?

        Thanks

        Show
        Jacques Le Roux added a comment - Finally has I had some time to better know how to use this I tried to create a new fresh DB with run-install and then ran run-tests. Logically I got the same error since there are no Order with orderId WS10000. I then tried to create a new PO but then I got OOTB a PO with orderId WS10010. So I wonder how this should be used. May I have some explanations please ? Thanks
        Hide
        Jacques Le Roux added a comment -

        OK, forget it. I was wrong. I did not reproduce this error (nor found if it was ok though) but I found some inconsistencies in the receiveInventoryProduct screen, mostly french translations for now...

        Show
        Jacques Le Roux added a comment - OK, forget it. I was wrong. I did not reproduce this error (nor found if it was ok though) but I found some inconsistencies in the receiveInventoryProduct screen, mostly french translations for now...
        Hide
        Vikas Mayur added a comment -

        Hi Jacques,

        Please make sure few things before running a test case:
        1) Use fresh db
        2) Comment other test cases in a file under testdef folder.
        2) Few variables might need to be changed, orderId in your case is coming out to be different as used in test case.
        Please set variables under comment <!-- set few variables so that they can be changed easily to test with different values -->

        Let me know if it still does did not work.

        • Vikas
        Show
        Vikas Mayur added a comment - Hi Jacques, Please make sure few things before running a test case: 1) Use fresh db 2) Comment other test cases in a file under testdef folder. 2) Few variables might need to be changed, orderId in your case is coming out to be different as used in test case. Please set variables under comment <!-- set few variables so that they can be changed easily to test with different values --> Let me know if it still does did not work. Vikas
        Hide
        Anil K Patel added a comment -

        Vikas,
        Point #2 and #3 require user intervention before running tests. This is not the right way. JUnit tests are supposed to run automatic. I think we need to figure out way to automate these tests. Also if similar thing applies to other tests implemented recently or in past then we should find and fix them.

        Regards
        Anil

        Show
        Anil K Patel added a comment - Vikas, Point #2 and #3 require user intervention before running tests. This is not the right way. JUnit tests are supposed to run automatic. I think we need to figure out way to automate these tests. Also if similar thing applies to other tests implemented recently or in past then we should find and fix them. Regards Anil
        Hide
        Parimal Gain added a comment -

        Here I have prepared demo purchase order data for Automation of this test Case.

        Thanks to Ratnesh Upadhyay for helping.

        Thanks & Regards

        • Parimal Gain
        Show
        Parimal Gain added a comment - Here I have prepared demo purchase order data for Automation of this test Case. Thanks to Ratnesh Upadhyay for helping. Thanks & Regards Parimal Gain
        Hide
        Adam Heath added a comment -

        This test has never run automatically, reopening.

        Show
        Adam Heath added a comment - This test has never run automatically, reopening.
        Hide
        Adam Heath added a comment -

        This works now as of revision 750163.

        Show
        Adam Heath added a comment - This works now as of revision 750163.
        Hide
        Vikas Mayur added a comment -

        The data committed in the last patch need to be revisited again. This is causing issues as mentioned in the OFBIZ-2810

        Show
        Vikas Mayur added a comment - The data committed in the last patch need to be revisited again. This is causing issues as mentioned in the OFBIZ-2810
        Hide
        Jacques Le Roux added a comment -

        Any chances to get this fixed?

        Show
        Jacques Le Roux added a comment - Any chances to get this fixed?
        Hide
        Jacques Le Roux added a comment -

        With OFBIZ-2810 fixed this does not need to be opened any longer: all tests passed successfully locally

        Show
        Jacques Le Roux added a comment - With OFBIZ-2810 fixed this does not need to be opened any longer: all tests passed successfully locally
        Hide
        Sumit Pandit added a comment -

        Thanks Jacques for taking care of this

        Show
        Sumit Pandit added a comment - Thanks Jacques for taking care of this

          People

          • Assignee:
            Jacques Le Roux
            Reporter:
            Sumit Pandit
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development