Click here to Skip to main content
15,794,593 members
Home / Discussions / Java
   

Java

 
GeneralRe: Sending file though socket as byte[] Pin
jschell13-Oct-23 8:19
jschell13-Oct-23 8:19 
Question[Solved] Getting and setting a File's all attributes Pin
Valentinor24-Sep-23 23:47
Valentinor24-Sep-23 23:47 
AnswerRe: Getting and setting a File's all attributes Pin
Victor Nijegorodov25-Sep-23 0:04
Victor Nijegorodov25-Sep-23 0:04 
GeneralRe: Getting and setting a File's all attributes Pin
Valentinor25-Sep-23 0:17
Valentinor25-Sep-23 0:17 
Answer[Solution] Re: Getting and setting a File's all attributes Pin
Valentinor25-Sep-23 7:26
Valentinor25-Sep-23 7:26 
QuestionGetting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Member 160852744-Sep-23 6:46
Member 160852744-Sep-23 6:46 
AnswerRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Richard Deeming4-Sep-23 22:21
mveRichard Deeming4-Sep-23 22:21 
AnswerRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Member 160852745-Sep-23 0:55
Member 160852745-Sep-23 0:55 
here is the file 11_Test.zero

{
"scenarioName": "Cleanup dr network",
"steps": [


// source1
{
"name": "step1_source1",
"url": "com.storvisor.backup.TestPreconditions",
"operation": "drNetworkCleanup",
"request": {
"____test_step": "1a_p001_cleanup_network_step1_source1",
"X-OperationID": "${RANDOM.NUMBER}", // actually System.currentTimeMillis()
"stdatasvcmgr": "http://10.198.74.45:9339/stdatasvcmgr",
"user": "[:]",
"rootsessionid": "564d1ec7-b0ec-e9d0-445f-7455b4d1bcdd-12532"
},
"assertions": {
"result": true
}
},

// source2
{
"name": "step1_source2",
"url": "com.storvisor.backup.TestPreconditions",
"operation": "drNetworkCleanup",
"request": {
"____test_step": "1a_p001_cleanup_network_step1_source2",
"X-OperationID": "${RANDOM.NUMBER}", // actually System.currentTimeMillis()
"stdatasvcmgr": "http://10.198.73.61:9339/stdatasvcmgr",
"user": "[:]",
"rootsessionid": "564dc67c-1f45-7270-6795-32a72f436514-23376"
},
"assertions": {
"result": true
}
},

// target
{
"name": "step1_target",
"url": "com.storvisor.backup.TestPreconditions",
"operation": "drNetworkCleanup",
"request": {
"____test_step": "1a_p001_cleanup_network_step1_target",
"X-OperationID": "${RANDOM.NUMBER}", // actually System.currentTimeMillis()
"stdatasvcmgr": "http://10.198.73.67:9339/stdatasvcmgr",
"user": "[:]",
"rootsessionid": "564dc295-844a-89ad-091e-6033987ce14b-29868"
},
"assertions": {
"result": true
}
}

]
}

under zerocode directory

File :myTest.java
------------------

package com.storvisor.backup;

import static org.junit.Assert.*;
import org.jsmart.zerocode.core.domain.JsonTestCase;
import org.jsmart.zerocode.core.domain.TargetEnv;
import org.jsmart.zerocode.core.runner.ZeroCodeUnitRunner;

import org.junit.FixMethodOrder;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Timeout;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;

@TargetEnv("test.properties")
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@RunWith(PolicyTestUnitRunner.class)
public class myTest {

@Rule
public Timeout globalTimeout = Timeout.seconds(120);

@Test @JsonTestCase("zerocode/11_Test.zero")
public void _11_Test() throws Exception {}


}

---------------------------
PolicyTestUnitRunner.java
----------------------------
package com.storvisor.backup;

import org.jsmart.zerocode.core.runner.ZeroCodeUnitRunner;
import org.junit.runner.notification.RunNotifier;
import org.junit.runners.model.InitializationError;

public class PolicyTestUnitRunner extends ZeroCodeUnitRunner
{
public PolicyTestUnitRunner(Class klass) throws InitializationError
{
super(klass);
}

@Override
public void run(RunNotifier notifier)
{
PolicyTestListener failFastListener = new PolicyTestListener(notifier);
notifier.addListener(failFastListener);
super.run(notifier);
}
}

Thanks
GeneralRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Member 160852745-Sep-23 0:58
Member 160852745-Sep-23 0:58 
GeneralRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Member 160852745-Sep-23 1:09
Member 160852745-Sep-23 1:09 
GeneralRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Richard MacCutchan5-Sep-23 1:21
mveRichard MacCutchan5-Sep-23 1:21 
AnswerRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
jschell5-Sep-23 3:34
jschell5-Sep-23 3:34 
GeneralRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Member 160852745-Sep-23 6:11
Member 160852745-Sep-23 6:11 
GeneralRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Richard Deeming5-Sep-23 22:23
mveRichard Deeming5-Sep-23 22:23 
GeneralRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Richard MacCutchan5-Sep-23 23:43
mveRichard MacCutchan5-Sep-23 23:43 
QuestionWhat is the difference between a static and an instance variable in Java? Pin
Ashley OP8-Aug-23 0:31
Ashley OP8-Aug-23 0:31 
AnswerRe: What is the difference between a static and an instance variable in Java? Pin
Richard MacCutchan8-Aug-23 0:33
mveRichard MacCutchan8-Aug-23 0:33 
QuestionJavaFX multithreading operation changing GUI elements Pin
JohnCodding21-Jul-23 7:37
JohnCodding21-Jul-23 7:37 
AnswerRe: JavaFX multithreading operation changing GUI elements Pin
JudyL_MD21-Jul-23 10:01
JudyL_MD21-Jul-23 10:01 
GeneralRe: JavaFX multithreading operation changing GUI elements Pin
JohnCodding21-Jul-23 10:44
JohnCodding21-Jul-23 10:44 
GeneralRe: JavaFX multithreading operation changing GUI elements Pin
JudyL_MD21-Jul-23 11:46
JudyL_MD21-Jul-23 11:46 
AnswerRe: JavaFX multithreading operation changing GUI elements Pin
JohnCodding21-Jul-23 10:49
JohnCodding21-Jul-23 10:49 
QuestionOperator precedence Pin
darek2902198812-Jul-23 6:41
darek2902198812-Jul-23 6:41 
AnswerRe: Operator precedence Pin
Dave Kreskowiak12-Jul-23 7:11
mveDave Kreskowiak12-Jul-23 7:11 
QuestionOperator precedence Pin
darek2902198811-Jul-23 4:06
darek2902198811-Jul-23 4:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.