Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to create / update test records on OpenERP 7, using JMeter?

By
Luis Filipe Castanheira
on 7/2/14, 11:00 AM 1,881 views

Hi!

I'm trying to test the load response of an OpenERP module that I've been developing. I've managed to authenticate and read from my model thanks to this tutorial http://selvam4u.wordpress.com/2011/05/25/load-testing-openerp-with-jmeter/ and the kind help of Delphine Lemire!

I'd like now test the creation and update of existing records, but I can't find anywhere the syntax to do such actions. Where can I find any working example or is anyone willing to share knowledge about how to call the create and/or the write methods?

Thanks in advance!

 

 

1

Finally got it to work. Found a thread on Lauchpad reporting a bug on creation partners with JMeter and the code there helped me understand how this should work, so I'll leave here the XML configuration file to create records on a custom module on OpenERP.

    <?xml version='1.0'?>
    <methodCall>
        <methodName>execute</methodName>
        <params>
            <param>
                <!-- Select your database -->
                <value><string>may_9</string></value>
            </param>
            <param>
                <!-- User uid, 1, why not? -->
                <value><int>1</int></value>
            </param>
            <param>
                <!-- user login -->
                <value><string>admin</string></value>
            </param>
            <param>
                <!-- identify your object -->
                <value><string>generic.request</string></value>
            </param>
            <param>
                <!-- and your action -->
                <value><string>create</string></value>
            </param>
            <param>
                <!-- here comes the values to insert -->
                <value>
                <!-- create a struct where you identify the field name, the field type and the value you want to insert in it -->
                <struct>
                    <member>
                        <name>name</name>
                        <value><string>JMeter Request</string></value>
                    </member>
                    <member>
                        <name>subject_type</name>
                        <value><int>1</int></value>
                    </member>
                    <member>
                        <name>responsible_name</name>
                        <value><int>4</int></value>
                    </member>
                    <member>
                        <name>request_description</name>
                        <value><string>Desc</string></value>
                    </member>
                    <member>
                        <name>stating_reasons</name>
                        <value><string>stating reasons</string></value>
                    </member>
                    <member>
                        <name>expected_date</name>
                        <value><string>08/31/2014</string></value>
                    </member>
                    </struct>
                </value>
            </param>
        </params>
    </methodCall>

And that should work fine!  
Hope this helps :)

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 7/2/14, 11:00 AM
Seen: 1881 times
Last updated: 3/16/15, 8:10 AM