Skip to content

Commit

Permalink
Merge pull request #271 from Xceptance/develop
Browse files Browse the repository at this point in the history
5.0.1 release
  • Loading branch information
oomelianchuk authored Jul 16, 2024
2 parents 7608631 + d0e6ed4 commit a485327
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 151 deletions.
78 changes: 0 additions & 78 deletions config/ai.properties

This file was deleted.

72 changes: 0 additions & 72 deletions config/visualassertion.properties

This file was deleted.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.xceptance</groupId>
<artifactId>neodymium-library</artifactId>
<version>5.0.0</version>
<version>5.0.1</version>

<name>neodymium-library</name>
<url>https://github.com/Xceptance/neodymium-library</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.xceptance.neodymium.junit5.filtering.FilterTestMethodCallback;
import com.xceptance.neodymium.junit5.filtering.WipTestMethodCallback;
import com.xceptance.neodymium.junit5.testdata.TestdataCallback;
import com.xceptance.neodymium.util.Neodymium;

public class TemplateInvocationContext implements TestTemplateInvocationContext
{
Expand Down Expand Up @@ -40,6 +41,7 @@ public String getDisplayName(int invocationIndex)
@Override
public List<Extension> getAdditionalExtensions()
{
Neodymium.clearThreadContext();
List<Extension> extentions = new LinkedList<>();
if (browser != null)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.xceptance.neodymium.junit4.testclasses.data;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;

import com.xceptance.neodymium.junit4.NeodymiumRunner;
import com.xceptance.neodymium.util.DataUtils;

@RunWith(NeodymiumRunner.class)
public class ClearedContextBetweenMethods
{
@Test
public void test()
{
if (DataUtils.asString("testId").equals("fist set"))
{
Assert.assertEquals("Test data is not matching the test expectations", "val1", DataUtils.asString("key1"));
Assert.assertEquals("Test data is not matching the test expectations", "val2", DataUtils.asString("key2"));
}
else
{
Assert.assertEquals("Test data is not overwritten", "new val", DataUtils.asString("key1"));
Assert.assertNull("Test data context is not cleared", DataUtils.asString("key2", null));
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.xceptance.neodymium.junit5.testclasses.data;

import org.junit.Assert;

import com.xceptance.neodymium.junit5.NeodymiumTest;
import com.xceptance.neodymium.util.DataUtils;

public class CleanedContextBetweenMethods
{
@NeodymiumTest
public void test()
{
if (DataUtils.asString("testId").equals("fist set"))
{
Assert.assertEquals("Test data is not matching the test expectations", "val1", DataUtils.asString("key1"));
Assert.assertEquals("Test data is not matching the test expectations", "val2", DataUtils.asString("key2"));
}
else
{
Assert.assertEquals("Test data is not overwritten", "new val", DataUtils.asString("key1"));
Assert.assertNull("Test data context is not cleared", DataUtils.asString("key2", null));
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"testId": "fist set",
"key1": "val1",
"key2": "val2"
},
{
"testId": "second set",
"key1": "new val"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"testId": "fist set",
"key1": "val1",
"key2": "val2"
},
{
"testId": "second set",
"key1": "new val"
}
]

0 comments on commit a485327

Please sign in to comment.