diff --git a/tests/hardware_ietf-hardware.cpp b/tests/hardware_ietf-hardware.cpp
index f6d4ff4..bbcf647 100644
--- a/tests/hardware_ietf-hardware.cpp
+++ b/tests/hardware_ietf-hardware.cpp
@@ -411,10 +411,10 @@
         {
             const auto xpath = modulePrefix + "/component[name='ne:ctrl:emmc:lifetime']/class";
             client.switchDatastore(sysrepo::Datastore::Operational);
-            auto val = client.getData(xpath.c_str());
+            auto val = client.getData(xpath);
             client.switchDatastore(sysrepo::Datastore::Running);
             REQUIRE(val);
-            REQUIRE(val->findPath(xpath.c_str())->asTerm().valueStr() == "iana-hardware:sensor"s);
+            REQUIRE(val->findPath(xpath)->asTerm().valueStr() == "iana-hardware:sensor"s);
         }
     }
 }
diff --git a/tests/sysrepo_system-ietfinterfaces.cpp b/tests/sysrepo_system-ietfinterfaces.cpp
index e20503e..2a54676 100644
--- a/tests/sysrepo_system-ietfinterfaces.cpp
+++ b/tests/sysrepo_system-ietfinterfaces.cpp
@@ -89,8 +89,8 @@
                                              {"osc", "iana-if-type:ethernetCsmacd"},
                                              {"oscW", "iana-if-type:ethernetCsmacd"},
                                              {"oscE", "iana-if-type:ethernetCsmacd"}}) {
-                client.setItem(("/ietf-interfaces:interfaces/interface[name='"s + name + "']/type").c_str(), type);
-                client.setItem(("/ietf-interfaces:interfaces/interface[name='"s + name + "']/enabled").c_str(), "false");
+                client.setItem("/ietf-interfaces:interfaces/interface[name='"s + name + "']/type", type);
+                client.setItem("/ietf-interfaces:interfaces/interface[name='"s + name + "']/enabled", "false");
             }
             client.applyChanges();
         }
diff --git a/tests/sysrepo_system-leds.cpp b/tests/sysrepo_system-leds.cpp
index 3d4dce3..923ed40 100644
--- a/tests/sysrepo_system-leds.cpp
+++ b/tests/sysrepo_system-leds.cpp
@@ -101,7 +101,7 @@
             expectedBrightness = "256";
         }
 
-        auto rpcInput = client.getContext().newPath("/czechlight-system:leds/uid/state", state.c_str());
+        auto rpcInput = client.getContext().newPath("/czechlight-system:leds/uid/state", state);
 
         auto res = client.sendRPC(rpcInput);
         REQUIRE(res.child() == std::nullopt);
diff --git a/tests/sysrepo_two-daemons_daemon.cpp b/tests/sysrepo_two-daemons_daemon.cpp
index 39ed864..d58928d 100644
--- a/tests/sysrepo_two-daemons_daemon.cpp
+++ b/tests/sysrepo_two-daemons_daemon.cpp
@@ -18,9 +18,9 @@
 {
     for (const auto& [propertyName, value] : values) {
         if (!parent) {
-            parent = session.getContext().newPath((prefix + propertyName).c_str(), value.c_str(), libyang::CreationOptions::Output);
+            parent = session.getContext().newPath(prefix + propertyName, value, libyang::CreationOptions::Output);
         } else {
-            parent->newPath((prefix + propertyName).c_str(), value.c_str(), libyang::CreationOptions::Output);
+            parent->newPath(prefix + propertyName, value, libyang::CreationOptions::Output);
         }
     }
 }
@@ -65,9 +65,9 @@
 
 
         srSub = srSess.onOperGet(
-            MODULE_NAME.c_str(),
+            MODULE_NAME,
             cb,
-            (MODULE_PREFIX + "/*").c_str(),
+            MODULE_PREFIX + "/*",
             sysrepo::SubscribeOptions::Passive | sysrepo::SubscribeOptions::OperMerge);
     } else if (isDaemonSetItem) {
         data = {
@@ -77,7 +77,7 @@
 
         srSess.switchDatastore(sysrepo::Datastore::Operational);
         for (const auto& [k, v] : data) {
-            srSess.setItem((MODULE_PREFIX + k).c_str(), v.c_str());
+            srSess.setItem(MODULE_PREFIX + k, v);
         }
         srSess.applyChanges();
         srSess.switchDatastore(sysrepo::Datastore::Running);
diff --git a/tests/test_sysrepo_helpers.h b/tests/test_sysrepo_helpers.h
index 1df3dc9..b1959a7 100644
--- a/tests/test_sysrepo_helpers.h
+++ b/tests/test_sysrepo_helpers.h
@@ -17,9 +17,9 @@
 {
     spdlog::get("main")->error("dataFrom {}", xpath);
     std::map<std::string, std::string> res;
-    auto data = session.getData((xpath + "/*").c_str());
+    auto data = session.getData(xpath + "/*");
     REQUIRE(data);
-    for (const auto& sibling : data->findXPath(xpath.c_str())) { // Use findXPath here in case the xpath is list without keys.
+    for (const auto& sibling : data->findXPath(xpath)) { // Use findXPath here in case the xpath is list without keys.
         for (const auto& node : sibling.childrenDfs()) {
             const auto briefXPath = std::string(node.path()).substr(boost::algorithm::ends_with(xpath, ":*") ? xpath.size() - 1 : xpath.size());
 
@@ -37,9 +37,9 @@
 auto rpcFromSysrepo(sysrepo::Session session, const std::string& rpcPath, std::map<std::string, std::string> input)
 {
     spdlog::get("main")->info("rpcFromSysrepo {}", rpcPath);
-    auto inputNode = session.getContext().newPath(rpcPath.c_str(), nullptr);
+    auto inputNode = session.getContext().newPath(rpcPath, std::nullopt);
     for (const auto& [k, v] : input) {
-        inputNode.newPath((rpcPath + "/" + k).c_str(), v.c_str());
+        inputNode.newPath(rpcPath + "/" + k, v);
     }
 
     auto output = session.sendRPC(inputNode);
