Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Received Error: Field 'executiontype' not present. #3

Closed
kengsenghor opened this issue Oct 25, 2018 · 7 comments
Closed

Received Error: Field 'executiontype' not present. #3

kengsenghor opened this issue Oct 25, 2018 · 7 comments
Labels
question Further information is requested

Comments

@kengsenghor
Copy link

kengsenghor commented Oct 25, 2018

Nyaran,

UPDATED MESSAGE CONTENTS:

After I'd created test case with below codes:

testlink.createTestCase({
    testcasename: "Test Case #5", // Test Case name.
    testsuiteid: 851, // TestSuite id in TestLink.
    testprojectid: 850, // Project id in TestLink.
    status: 3,
    importance: 3,
    execution: 2,
    authorlogin: "ks", // Author of Test Case.
    summary: "This Test Case is an example created from TestLink API", // Test Case description.
    steps: [{
    	step_number: 1,
    	actions: "Action 1",
    	execution_type: 2
    }] // Array containing the Test Case steps.
});

Then, I tried to update test case execution type, as follows:

testlink.setTestCaseExecutionType({
	testcaseexternalid: 4,
	version: 1,
	testprojectid: 850,
	executiontype: 2
});
@kengsenghor
Copy link
Author

kengsenghor commented Oct 25, 2018

When tried update executiontype via setTestCaseExecutionType function, below error returned.
Error: Field 'executiontype' not present.

Also tried changed to execution_type both in my calling codes and in testlink.js file, another error received.
Error: Field 'execution_type' not present.

@kengsenghor kengsenghor changed the title Received Error: Invalid XML-RPC message Received Error: Field 'executiontype' not present. Oct 25, 2018
@Nyaran
Copy link
Owner

Nyaran commented Oct 25, 2018

About setTestCaseExecutionType (First message)

testcaseexternalid: This MUST include the project prefix. (TestLink requirement)

About executiontype & execution_type (Second message)

  • executiontype (without underscore):Belongs to Test Case object
  • execution_type (with underscore): Belongs to the Steps object (contained in Test Case)

@Nyaran Nyaran closed this as completed in 80276d3 Oct 25, 2018
@Nyaran Nyaran reopened this Oct 25, 2018
@kengsenghor
Copy link
Author

Cool. It is working now.

When I update executiontype, I also want to update execution_type but not the way currently doing for setTestCaseExecutionType function.

@Nyaran
Copy link
Owner

Nyaran commented Oct 25, 2018

I think you must set the execution type for Test Case and for each step inside. This is how TestLink works.

BTW, you can include the constants file to use it easly

const constants = require('testlink-xmlrpc/lib/constants');

testlink.createTestCase({
 ...
	executiontype: constants.ExecutionType.AUTOMATED,
 ...
});

@kengsenghor
Copy link
Author

kengsenghor commented Oct 25, 2018

Thanks! I will try this out later. My question was if we update executiontype, in each step should also update to what had been set in executiontype for steps[].execution_type, agree? Or, at least this setTestCaseExecutionType function capable to also handle steps[].execution_type optionally?

@kengsenghor
Copy link
Author

There is one option called "Apply To All Steps" on the Test Case GUI. Could setTestCaseExecutionType function include this option whenever there is update on executiontype, it also able to alter all steps execution_type by enable this "Apply To All Steps" option?

@Nyaran
Copy link
Owner

Nyaran commented Oct 26, 2018

I think there is not an option like that exposed on TestLink API (https://github.com/TestLinkOpenSourceTRMS/testlink-code/blob/testlink_1_9/lib/api/xmlrpc/v1/xmlrpc.class.php)

Anyway I will study to implemented useful functions like that on the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants