Odoo Help

0

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

By
Luis Filipe Castanheira
on 7/2/14, 11:00 AM 2,039 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 :)

 

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

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